]> git.baikalelectronics.ru Git - kernel.git/commit
drm: Use a const drm_driver for legacy PCI devices
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Thu, 20 Feb 2020 22:19:22 +0000 (00:19 +0200)
committerLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Tue, 5 Jan 2021 05:20:35 +0000 (07:20 +0200)
commitce4bde2e16689d37a446672399789cf4801e1b41
tree3bfa36905d3e1c1a8f6b909fe8bcb726fe8da2ce
parente2c0e10b450fd9b2e90f41d47f2dbc8bde1038a5
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>
drivers/gpu/drm/drm_drv.c
drivers/gpu/drm/drm_pci.c
include/drm/drm_device.h
include/drm/drm_legacy.h