.. | .. |
---|
1 | | -// SPDX-License-Identifier: GPL-2.0 |
---|
| 1 | +// SPDX-License-Identifier: MIT |
---|
2 | 2 | #include <linux/vgaarb.h> |
---|
3 | 3 | #include <linux/vga_switcheroo.h> |
---|
4 | 4 | |
---|
5 | | -#include <drm/drmP.h> |
---|
6 | 5 | #include <drm/drm_crtc_helper.h> |
---|
7 | 6 | #include <drm/drm_fb_helper.h> |
---|
8 | 7 | |
---|
.. | .. |
---|
73 | 72 | * locking inversion with the driver load path. And the access here is |
---|
74 | 73 | * completely racy anyway. So don't bother with locking for now. |
---|
75 | 74 | */ |
---|
76 | | - return dev->open_count == 0; |
---|
| 75 | + return atomic_read(&dev->open_count) == 0; |
---|
77 | 76 | } |
---|
78 | 77 | |
---|
79 | 78 | static const struct vga_switcheroo_client_ops |
---|