From b1dda997a8a98fcb98189e5f4ee3108bc3da3d21 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Fri, 21 Feb 2020 00:19:22 +0200 Subject: 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 Reviewed-by: Daniel Vetter --- include/drm/drm_device.h | 4 ---- 1 file changed, 4 deletions(-) (limited to 'include/drm/drm_device.h') 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: -- cgit v1.2.3