mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-20 03:04:01 +08:00
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 <laurent.pinchart@ideasonboard.com> Cc: Inki Dae <inki.dae@samsung.com> Cc: Alan Cox <alan@linux.intel.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Ben Skeggs <bskeggs@redhat.com> Cc: Thomas Hellstrom <thellstrom@vmware.com> Cc: Rob Clark <rob.clark@linaro.org> Reviwed-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
parent
78b68556a9
commit
e6ecefaadf
@ -191,7 +191,7 @@ static void exynos_drm_output_poll_changed(struct drm_device *dev)
|
||||
drm_fb_helper_hotplug_event(fb_helper);
|
||||
}
|
||||
|
||||
static struct drm_mode_config_funcs exynos_drm_mode_config_funcs = {
|
||||
static const struct drm_mode_config_funcs exynos_drm_mode_config_funcs = {
|
||||
.fb_create = exynos_user_fb_create,
|
||||
.output_poll_changed = exynos_drm_output_poll_changed,
|
||||
};
|
||||
|
@ -782,7 +782,7 @@ void psb_modeset_init(struct drm_device *dev)
|
||||
dev->mode_config.min_width = 0;
|
||||
dev->mode_config.min_height = 0;
|
||||
|
||||
dev->mode_config.funcs = (void *) &psb_mode_funcs;
|
||||
dev->mode_config.funcs = &psb_mode_funcs;
|
||||
|
||||
/* set memory base */
|
||||
/* Oaktrail and Poulsbo should use BAR 2*/
|
||||
|
@ -6941,7 +6941,7 @@ void intel_modeset_init(struct drm_device *dev)
|
||||
dev->mode_config.preferred_depth = 24;
|
||||
dev->mode_config.prefer_shadow = 1;
|
||||
|
||||
dev->mode_config.funcs = (void *)&intel_mode_funcs;
|
||||
dev->mode_config.funcs = &intel_mode_funcs;
|
||||
|
||||
intel_init_quirks(dev);
|
||||
|
||||
|
@ -300,7 +300,7 @@ nouveau_display_create(struct drm_device *dev)
|
||||
disp->color_vibrance_property->values[1] = 200; /* -100..+100 */
|
||||
}
|
||||
|
||||
dev->mode_config.funcs = (void *)&nouveau_mode_config_funcs;
|
||||
dev->mode_config.funcs = &nouveau_mode_config_funcs;
|
||||
dev->mode_config.fb_base = pci_resource_start(dev->pdev, 1);
|
||||
|
||||
dev->mode_config.min_width = 0;
|
||||
|
@ -1320,7 +1320,7 @@ int radeon_modeset_init(struct radeon_device *rdev)
|
||||
drm_mode_config_init(rdev->ddev);
|
||||
rdev->mode_info.mode_config_initialized = true;
|
||||
|
||||
rdev->ddev->mode_config.funcs = (void *)&radeon_mode_funcs;
|
||||
rdev->ddev->mode_config.funcs = &radeon_mode_funcs;
|
||||
|
||||
if (ASIC_IS_DCE5(rdev)) {
|
||||
rdev->ddev->mode_config.max_width = 16384;
|
||||
|
@ -395,7 +395,7 @@ int udl_modeset_init(struct drm_device *dev)
|
||||
dev->mode_config.prefer_shadow = 0;
|
||||
dev->mode_config.preferred_depth = 24;
|
||||
|
||||
dev->mode_config.funcs = (void *)&udl_mode_funcs;
|
||||
dev->mode_config.funcs = &udl_mode_funcs;
|
||||
|
||||
drm_mode_create_dirty_info_property(dev);
|
||||
|
||||
|
@ -1178,7 +1178,7 @@ err_out:
|
||||
return &vfb->base;
|
||||
}
|
||||
|
||||
static struct drm_mode_config_funcs vmw_kms_funcs = {
|
||||
static const struct drm_mode_config_funcs vmw_kms_funcs = {
|
||||
.fb_create = vmw_kms_fb_create,
|
||||
};
|
||||
|
||||
|
@ -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,
|
||||
};
|
||||
|
@ -767,7 +767,7 @@ struct drm_mode_config {
|
||||
|
||||
int min_width, min_height;
|
||||
int max_width, max_height;
|
||||
struct drm_mode_config_funcs *funcs;
|
||||
const struct drm_mode_config_funcs *funcs;
|
||||
resource_size_t fb_base;
|
||||
|
||||
/* output poll support */
|
||||
|
Loading…
Reference in New Issue
Block a user