fbdev: omapfb: Drop unused remove function
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Fri, 3 Nov 2023 17:35:58 +0000 (18:35 +0100)
committerHelge Deller <deller@gmx.de>
Tue, 7 Nov 2023 13:42:34 +0000 (14:42 +0100)
OMAP2_VRFB is a bool, so the vrfb driver can never be compiled as a
module. With that __exit_p(vrfb_remove) always evaluates to NULL and
vrfb_remove() is unused.

If the driver was compilable as a module, it would fail to build because
the type of vrfb_remove() isn't compatible with struct
platform_driver::remove(). (The former returns void, the latter int.)

Fixes: aa1e49a3752f ("OMAPDSS: VRFB: add omap_vrfb_supported()")
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Helge Deller <deller@gmx.de>
drivers/video/fbdev/omap2/omapfb/vrfb.c

index ee0dd4c6a6466aa00371d47be431c9996684e5a0..568e6e1eca628ea0fd15c28544a412ac871ef57e 100644 (file)
@@ -368,17 +368,10 @@ static int __init vrfb_probe(struct platform_device *pdev)
        return 0;
 }
 
-static void __exit vrfb_remove(struct platform_device *pdev)
-{
-       vrfb_loaded = false;
-}
-
 static struct platform_driver vrfb_driver = {
        .driver.name    = "omapvrfb",
-       .remove         = __exit_p(vrfb_remove),
 };
-
-module_platform_driver_probe(vrfb_driver, vrfb_probe);
+builtin_platform_driver_probe(vrfb_driver, vrfb_probe);
 
 MODULE_AUTHOR("Tomi Valkeinen <tomi.valkeinen@ti.com>");
 MODULE_DESCRIPTION("OMAP VRFB");