From 78b68556a964e74fb803b08c5b2d9c6ba3ec3787 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Thu, 17 May 2012 13:27:22 +0200 Subject: drm: Constify gem_vm_ops pointer The GEM vm operations structure is passed to the VM core that stores it in a const field. There vm operations structures can thus be const in DRM as well. Signed-off-by: Laurent Pinchart Cc: Inki Dae Cc: Alan Cox Cc: Daniel Vetter Cc: Rob Clark Reviewed-by: Alex Deucher Signed-off-by: Dave Airlie --- drivers/staging/omapdrm/omap_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/staging') diff --git a/drivers/staging/omapdrm/omap_drv.c b/drivers/staging/omapdrm/omap_drv.c index 620b8d54223d..071c7702d05d 100644 --- a/drivers/staging/omapdrm/omap_drv.c +++ b/drivers/staging/omapdrm/omap_drv.c @@ -726,7 +726,7 @@ static void dev_irq_uninstall(struct drm_device *dev) DBG("irq_uninstall: dev=%p", dev); } -static struct vm_operations_struct omap_gem_vm_ops = { +static const struct vm_operations_struct omap_gem_vm_ops = { .fault = omap_gem_fault, .open = drm_gem_vm_open, .close = drm_gem_vm_close, -- cgit From e6ecefaadfcdb03db8ac9e739b4ba7a93a8811b3 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Thu, 17 May 2012 13:27:23 +0200 Subject: drm: Constify drm_mode_config_funcs pointer The DRM mode config functions structure declared by drivers and pointed to by the drm_mode_config funcs field is never modified. Make it a const pointer. Signed-off-by: Laurent Pinchart Cc: Inki Dae Cc: Alan Cox Cc: Daniel Vetter Cc: Ben Skeggs Cc: Thomas Hellstrom Cc: Rob Clark Reviwed-by: Alex Deucher Signed-off-by: Dave Airlie --- drivers/staging/omapdrm/omap_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/staging') diff --git a/drivers/staging/omapdrm/omap_drv.c b/drivers/staging/omapdrm/omap_drv.c index 071c7702d05d..1edbd777bf40 100644 --- a/drivers/staging/omapdrm/omap_drv.c +++ b/drivers/staging/omapdrm/omap_drv.c @@ -58,7 +58,7 @@ static void omap_fb_output_poll_changed(struct drm_device *dev) } } -static struct drm_mode_config_funcs omap_mode_config_funcs = { +static const struct drm_mode_config_funcs omap_mode_config_funcs = { .fb_create = omap_framebuffer_create, .output_poll_changed = omap_fb_output_poll_changed, }; -- cgit From ebe0f2442cc4c5493a85c875d2d8a44ffecc1175 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Thu, 17 May 2012 13:27:24 +0200 Subject: drm: Make the CRTC gamma_set operation optional Drivers for hardware without gamma support should not be forced to implement a no-op gamma set operation. Signed-off-by: Laurent Pinchart Cc: Rob Clark Signed-off-by: Dave Airlie --- drivers/staging/omapdrm/omap_crtc.c | 7 ------- 1 file changed, 7 deletions(-) (limited to 'drivers/staging') diff --git a/drivers/staging/omapdrm/omap_crtc.c b/drivers/staging/omapdrm/omap_crtc.c index 490a7f15604b..8b864afb40b6 100644 --- a/drivers/staging/omapdrm/omap_crtc.c +++ b/drivers/staging/omapdrm/omap_crtc.c @@ -36,12 +36,6 @@ struct omap_crtc { struct drm_framebuffer *old_fb; }; -static void omap_crtc_gamma_set(struct drm_crtc *crtc, - u16 *red, u16 *green, u16 *blue, uint32_t start, uint32_t size) -{ - /* not supported.. at least not yet */ -} - static void omap_crtc_destroy(struct drm_crtc *crtc) { struct omap_crtc *omap_crtc = to_omap_crtc(crtc); @@ -198,7 +192,6 @@ static int omap_crtc_page_flip_locked(struct drm_crtc *crtc, } static const struct drm_crtc_funcs omap_crtc_funcs = { - .gamma_set = omap_crtc_gamma_set, .set_config = drm_crtc_helper_set_config, .destroy = omap_crtc_destroy, .page_flip = omap_crtc_page_flip_locked, -- cgit