Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

fbdev: omapfb: Drop unused remove function

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>

authored by

Uwe Kleine-König and committed by
Helge Deller
fc6699d6 02d487fa

+1 -8
+1 -8
drivers/video/fbdev/omap2/omapfb/vrfb.c
··· 368 368 return 0; 369 369 } 370 370 371 - static void __exit vrfb_remove(struct platform_device *pdev) 372 - { 373 - vrfb_loaded = false; 374 - } 375 - 376 371 static struct platform_driver vrfb_driver = { 377 372 .driver.name = "omapvrfb", 378 - .remove = __exit_p(vrfb_remove), 379 373 }; 380 - 381 - module_platform_driver_probe(vrfb_driver, vrfb_probe); 374 + builtin_platform_driver_probe(vrfb_driver, vrfb_probe); 382 375 383 376 MODULE_AUTHOR("Tomi Valkeinen <tomi.valkeinen@ti.com>"); 384 377 MODULE_DESCRIPTION("OMAP VRFB");