Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e6ecefaa authored by Laurent Pinchart's avatar Laurent Pinchart Committed by Dave Airlie
Browse files

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: default avatarLaurent 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: default avatarAlex Deucher <alexdeucher@gmail.com>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent 78b68556
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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,
};
+1 −1
Original line number Diff line number Diff line
@@ -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*/
+1 −1
Original line number Diff line number Diff line
@@ -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);

+1 −1
Original line number Diff line number Diff line
@@ -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;
+1 −1
Original line number Diff line number Diff line
@@ -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;
Loading