diff options
author | Baolin Wang <baolin.wang@linaro.org> | 2019-07-25 10:56:16 +0300 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2019-08-06 23:54:23 +0300 |
commit | 4d7802aa434a39921c699683c4ca2ad9068b0033 (patch) | |
tree | b83fc44e89cde0e57cb234c6463483f69b7cddfc /drivers/i2c/busses/i2c-sprd.c | |
parent | 3e99834cc0c7f0612dc790ad7342f18c375d285b (diff) | |
download | linux-4d7802aa434a39921c699683c4ca2ad9068b0033.tar.xz |
i2c: sprd: Make I2C driver can be built as a module
Now there is no need to keep our I2C driver to be initialized so early,
thus changing to module level and let it can be built as a module,
meanwhile adding some module information.
Signed-off-by: Baolin Wang <baolin.wang@linaro.org>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'drivers/i2c/busses/i2c-sprd.c')
-rw-r--r-- | drivers/i2c/busses/i2c-sprd.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/i2c/busses/i2c-sprd.c b/drivers/i2c/busses/i2c-sprd.c index 961123529678..8002835d1543 100644 --- a/drivers/i2c/busses/i2c-sprd.c +++ b/drivers/i2c/busses/i2c-sprd.c @@ -12,6 +12,7 @@ #include <linux/init.h> #include <linux/interrupt.h> #include <linux/kernel.h> +#include <linux/module.h> #include <linux/of.h> #include <linux/of_device.h> #include <linux/platform_device.h> @@ -644,8 +645,7 @@ static struct platform_driver sprd_i2c_driver = { }, }; -static int sprd_i2c_init(void) -{ - return platform_driver_register(&sprd_i2c_driver); -} -arch_initcall_sync(sprd_i2c_init); +module_platform_driver(sprd_i2c_driver); + +MODULE_DESCRIPTION("Spreadtrum I2C master controller driver"); +MODULE_LICENSE("GPL v2"); |