From 15fced5b051e6e22c228a521a5894b12c2ba0892 Mon Sep 17 00:00:00 2001 From: Thomas Zimmermann Date: Mon, 18 Jul 2022 09:23:22 +0200 Subject: fbdev: Remove conflict-handling code Remove the call to do_remove_conflicting_framebuffers() from the framebuffer registration. Aperture helpers take care of removing conflicting devices. With all ownership information stored in the aperture datastrcutures, remove remove_conflicting_framebuffers() entirely. This change also rectifies DRM generic-framebuffer registration, which tried to unregister conflicting framebuffers, even though it's entirely build on top of DRM. v2: * remove internal aperture-overlap helpers, which are now unused Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20220718072322.8927-12-tzimmermann@suse.de --- drivers/video/aperture.c | 21 --------------------- 1 file changed, 21 deletions(-) (limited to 'drivers/video/aperture.c') diff --git a/drivers/video/aperture.c b/drivers/video/aperture.c index abc691284a77..9e6bcc03a1a4 100644 --- a/drivers/video/aperture.c +++ b/drivers/video/aperture.c @@ -2,7 +2,6 @@ #include #include -#include /* for old fbdev helpers */ #include #include #include @@ -286,11 +285,6 @@ static void aperture_detach_devices(resource_size_t base, resource_size_t size) int aperture_remove_conflicting_devices(resource_size_t base, resource_size_t size, bool primary, const char *name) { -#if IS_REACHABLE(CONFIG_FB) - struct apertures_struct *a; - int ret; -#endif - /* * If a driver asked to unregister a platform device registered by * sysfb, then can be assumed that this is a driver for a display @@ -312,21 +306,6 @@ int aperture_remove_conflicting_devices(resource_size_t base, resource_size_t si if (primary) aperture_detach_devices(VGA_FB_PHYS_BASE, VGA_FB_PHYS_SIZE); -#if IS_REACHABLE(CONFIG_FB) - a = alloc_apertures(1); - if (!a) - return -ENOMEM; - - a->ranges[0].base = base; - a->ranges[0].size = size; - - ret = remove_conflicting_framebuffers(a, name, primary); - kfree(a); - - if (ret) - return ret; -#endif - return 0; } EXPORT_SYMBOL(aperture_remove_conflicting_devices); -- cgit v1.2.3