forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-31 f70575805708cabdedea7498aaa3f710fde4d920
kernel/drivers/gpu/drm/nouveau/nouveau_vga.c
....@@ -1,8 +1,7 @@
1
-// SPDX-License-Identifier: GPL-2.0
1
+// SPDX-License-Identifier: MIT
22 #include <linux/vgaarb.h>
33 #include <linux/vga_switcheroo.h>
44
5
-#include <drm/drmP.h>
65 #include <drm/drm_crtc_helper.h>
76 #include <drm/drm_fb_helper.h>
87
....@@ -73,7 +72,7 @@
7372 * locking inversion with the driver load path. And the access here is
7473 * completely racy anyway. So don't bother with locking for now.
7574 */
76
- return dev->open_count == 0;
75
+ return atomic_read(&dev->open_count) == 0;
7776 }
7877
7978 static const struct vga_switcheroo_client_ops