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

bus: vexpress-config: Support building as module

Enable building vexpress-config driver as a module.

Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Sudeep Holla <sudeep.holla@arm.com>
Acked-by: Liviu Dudau <liviu.dudau@arm.com>
Signed-off-by: Rob Herring <robh@kernel.org>

+5 -7
+1 -1
drivers/bus/Kconfig
··· 183 183 needed to use on-board devices connected to UniPhier SoCs. 184 184 185 185 config VEXPRESS_CONFIG 186 - bool "Versatile Express configuration bus" 186 + tristate "Versatile Express configuration bus" 187 187 default y if ARCH_VEXPRESS 188 188 depends on ARM || ARM64 189 189 depends on OF
+4 -6
drivers/bus/vexpress-config.c
··· 7 7 #include <linux/err.h> 8 8 #include <linux/init.h> 9 9 #include <linux/io.h> 10 + #include <linux/module.h> 10 11 #include <linux/of.h> 11 12 #include <linux/platform_device.h> 12 13 #include <linux/of_device.h> ··· 408 407 { "vexpress-syscfg", }, 409 408 {}, 410 409 }; 410 + MODULE_DEVICE_TABLE(platform, vexpress_syscfg_id_table); 411 411 412 412 static struct platform_driver vexpress_syscfg_driver = { 413 413 .driver.name = "vexpress-syscfg", 414 414 .id_table = vexpress_syscfg_id_table, 415 415 .probe = vexpress_syscfg_probe, 416 416 }; 417 - 418 - static int __init vexpress_syscfg_init(void) 419 - { 420 - return platform_driver_register(&vexpress_syscfg_driver); 421 - } 422 - core_initcall(vexpress_syscfg_init); 417 + module_platform_driver(vexpress_syscfg_driver); 418 + MODULE_LICENSE("GPL v2");