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

drivers/platform: Convert non-modular pdev_bus to use builtin_platform_driver

This driver is configured with a Kconfig option that is
declared as a bool. Hence it is not possible for the code
to be built as modular. However the code is currently using
the module_platform_driver() macro for driver registration.

While this currently works, we really don't want to be including
the module.h header in non-modular code, which we'll be forced
to do, pending some upcoming code relocation from init.h into
module.h. So we fix it now by using the non-modular equivalent.
And since we've already established that the code is non-modular,
we can completely drop any code relating to module_exit.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>

+1 -11
+1 -11
drivers/platform/goldfish/pdev_bus.c
··· 220 220 return ret; 221 221 } 222 222 223 - static int goldfish_pdev_bus_remove(struct platform_device *pdev) 224 - { 225 - iounmap(pdev_bus_base); 226 - free_irq(pdev_bus_irq, pdev); 227 - release_mem_region(pdev_bus_addr, pdev_bus_len); 228 - return 0; 229 - } 230 - 231 223 static struct platform_driver goldfish_pdev_bus_driver = { 232 224 .probe = goldfish_pdev_bus_probe, 233 - .remove = goldfish_pdev_bus_remove, 234 225 .driver = { 235 226 .name = "goldfish_pdev_bus" 236 227 } 237 228 }; 238 - 239 - module_platform_driver(goldfish_pdev_bus_driver); 229 + builtin_platform_driver(goldfish_pdev_bus_driver);