summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2020-06-17 02:58:16 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2020-06-17 02:58:16 +0000
commite69384fa96e3cf8e8debf6a1a7a572baecbaf5a6 (patch)
treef73d4e79aa9d7ba0b86a3ba76ca34c2bdf303c67
parent1a59d80a2cc17e57e0808e8b40e5636674544200 (diff)
use atomic_set() in kref_init()
-rw-r--r--sys/dev/pci/drm/include/linux/kref.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/pci/drm/include/linux/kref.h b/sys/dev/pci/drm/include/linux/kref.h
index 5f5ca9f47ba..6c9b48bd37f 100644
--- a/sys/dev/pci/drm/include/linux/kref.h
+++ b/sys/dev/pci/drm/include/linux/kref.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: kref.h,v 1.3 2020/06/17 02:06:05 jsg Exp $ */
+/* $OpenBSD: kref.h,v 1.4 2020/06/17 02:58:15 jsg Exp $ */
/*
* Copyright (c) 2015 Mark Kettenis
*
@@ -32,7 +32,7 @@ struct kref {
static inline void
kref_init(struct kref *ref)
{
- ref->refcount = 1;
+ atomic_set(&ref->refcount, 1);
}
static inline unsigned int