diff options
author | Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> | 2020-02-20 23:19:22 +0100 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> | 2021-01-05 06:20:35 +0100 |
commit | b1dda997a8a98fcb98189e5f4ee3108bc3da3d21 (patch) | |
tree | 3bfa36905d3e1c1a8f6b909fe8bcb726fe8da2ce /include/drm/drm_device.h | |
parent | drm: Move legacy device list out of drm_driver (diff) | |
download | linux-b1dda997a8a98fcb98189e5f4ee3108bc3da3d21.tar.xz linux-b1dda997a8a98fcb98189e5f4ee3108bc3da3d21.zip |
drm: Use a const drm_driver for legacy PCI devices
Now that the legacy PCI support code doesn't need to write to the
drm_driver structure, it can be treated as const through the whole DRM
core, unconditionally. This allows declaring the structure as const in
all drivers, removing one possible attack vector.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'include/drm/drm_device.h')
-rw-r--r-- | include/drm/drm_device.h | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/include/drm/drm_device.h b/include/drm/drm_device.h index bd5abe7cd48f..939904ae88fc 100644 --- a/include/drm/drm_device.h +++ b/include/drm/drm_device.h @@ -76,11 +76,7 @@ struct drm_device { } managed; /** @driver: DRM driver managing the device */ -#ifdef CONFIG_DRM_LEGACY - struct drm_driver *driver; -#else const struct drm_driver *driver; -#endif /** * @dev_private: |