diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2020-08-28 09:22:28 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2020-09-29 10:09:59 +0200 |
commit | 77e74ddca1a30ea1ac4bb9de55917f6b69290b41 (patch) | |
tree | bd3204786362f0f7f8ad6e1eeb76e30a2a73a666 /drivers/gpio | |
parent | d877a4436bb960e6b942510c3de37b9bd048c1ba (diff) | |
download | barebox-77e74ddca1a30ea1ac4bb9de55917f6b69290b41.tar.gz |
treewide: Use driver macro
We have several macros for a oneline driver registration. Add some
missing and use them consistently where possible througout the tree.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/gpio')
-rw-r--r-- | drivers/gpio/gpio-ath79.c | 6 | ||||
-rw-r--r-- | drivers/gpio/gpio-davinci.c | 6 | ||||
-rw-r--r-- | drivers/gpio/gpio-digic.c | 6 | ||||
-rw-r--r-- | drivers/gpio/gpio-dw.c | 6 | ||||
-rw-r--r-- | drivers/gpio/gpio-generic.c | 6 | ||||
-rw-r--r-- | drivers/gpio/gpio-imx.c | 7 | ||||
-rw-r--r-- | drivers/gpio/gpio-jz4740.c | 6 | ||||
-rw-r--r-- | drivers/gpio/gpio-malta-fpga-i2c.c | 6 | ||||
-rw-r--r-- | drivers/gpio/gpio-mpc8xxx.c | 6 | ||||
-rw-r--r-- | drivers/gpio/gpio-mxs.c | 7 | ||||
-rw-r--r-- | drivers/gpio/gpio-omap.c | 6 | ||||
-rw-r--r-- | drivers/gpio/gpio-pl061.c | 6 | ||||
-rw-r--r-- | drivers/gpio/gpio-stmpe.c | 6 | ||||
-rw-r--r-- | drivers/gpio/gpio-tegra.c | 6 | ||||
-rw-r--r-- | drivers/gpio/gpio-vf610.c | 6 |
15 files changed, 15 insertions, 77 deletions
diff --git a/drivers/gpio/gpio-ath79.c b/drivers/gpio/gpio-ath79.c index d08d743b54..1e66107c84 100644 --- a/drivers/gpio/gpio-ath79.c +++ b/drivers/gpio/gpio-ath79.c @@ -151,8 +151,4 @@ static struct driver_d ath79_gpio_driver = { .of_compatible = DRV_OF_COMPAT(ath79_gpio_of_match), }; -static int ath79_gpio_init(void) -{ - return platform_driver_register(&ath79_gpio_driver); -} -coredevice_initcall(ath79_gpio_init); +coredevice_platform_driver(ath79_gpio_driver); diff --git a/drivers/gpio/gpio-davinci.c b/drivers/gpio/gpio-davinci.c index 7c060a09b1..3346209f76 100644 --- a/drivers/gpio/gpio-davinci.c +++ b/drivers/gpio/gpio-davinci.c @@ -206,8 +206,4 @@ static struct driver_d davinci_gpio_driver = { .of_compatible = DRV_OF_COMPAT(davinci_gpio_ids), }; -static int davinci_gpio_drv_reg(void) -{ - return platform_driver_register(&davinci_gpio_driver); -} -coredevice_initcall(davinci_gpio_drv_reg); +coredevice_platform_driver(davinci_gpio_driver); diff --git a/drivers/gpio/gpio-digic.c b/drivers/gpio/gpio-digic.c index f7a68d09fc..9faa27c183 100644 --- a/drivers/gpio/gpio-digic.c +++ b/drivers/gpio/gpio-digic.c @@ -176,8 +176,4 @@ static struct driver_d digic_gpio_driver = { .of_compatible = DRV_OF_COMPAT(digic_gpio_dt_ids), }; -static int digic_gpio_init(void) -{ - return platform_driver_register(&digic_gpio_driver); -} -coredevice_initcall(digic_gpio_init); +coredevice_platform_driver(digic_gpio_driver); diff --git a/drivers/gpio/gpio-dw.c b/drivers/gpio/gpio-dw.c index b81e6a75c5..b7a61a8d90 100644 --- a/drivers/gpio/gpio-dw.c +++ b/drivers/gpio/gpio-dw.c @@ -195,8 +195,4 @@ static struct driver_d dwgpio_driver = { .of_compatible = DRV_OF_COMPAT(dwgpio_match), }; -static int __init dwgpio_init(void) -{ - return platform_driver_register(&dwgpio_driver); -} -postcore_initcall(dwgpio_init); +postcore_platform_driver(dwgpio_driver); diff --git a/drivers/gpio/gpio-generic.c b/drivers/gpio/gpio-generic.c index 2e0dad9974..a9ddf26fa4 100644 --- a/drivers/gpio/gpio-generic.c +++ b/drivers/gpio/gpio-generic.c @@ -424,11 +424,7 @@ static struct driver_d bgpio_driver = { .remove = bgpio_dev_remove, }; -static int bgpio_register(void) -{ - return platform_driver_register(&bgpio_driver); -} -coredevice_initcall(bgpio_register); +coredevice_platform_driver(bgpio_driver); #endif diff --git a/drivers/gpio/gpio-imx.c b/drivers/gpio/gpio-imx.c index 2827e11e73..c7ebce0b86 100644 --- a/drivers/gpio/gpio-imx.c +++ b/drivers/gpio/gpio-imx.c @@ -217,9 +217,4 @@ static struct driver_d imx_gpio_driver = { .id_table = imx_gpio_ids, }; -static int imx_gpio_add(void) -{ - platform_driver_register(&imx_gpio_driver); - return 0; -} -postcore_initcall(imx_gpio_add); +postcore_platform_driver(imx_gpio_driver); diff --git a/drivers/gpio/gpio-jz4740.c b/drivers/gpio/gpio-jz4740.c index 87e0716b06..bf99b718e8 100644 --- a/drivers/gpio/gpio-jz4740.c +++ b/drivers/gpio/gpio-jz4740.c @@ -136,8 +136,4 @@ static struct driver_d jz4740_gpio_driver = { .of_compatible = DRV_OF_COMPAT(jz4740_gpio_dt_ids), }; -static int jz4740_gpio_init(void) -{ - return platform_driver_register(&jz4740_gpio_driver); -} -coredevice_initcall(jz4740_gpio_init); +coredevice_platform_driver(jz4740_gpio_driver); diff --git a/drivers/gpio/gpio-malta-fpga-i2c.c b/drivers/gpio/gpio-malta-fpga-i2c.c index 9142248571..8002f7b73a 100644 --- a/drivers/gpio/gpio-malta-fpga-i2c.c +++ b/drivers/gpio/gpio-malta-fpga-i2c.c @@ -180,8 +180,4 @@ static struct driver_d malta_i2c_gpio_driver = { .of_compatible = DRV_OF_COMPAT(malta_i2c_gpio_dt_ids), }; -static int malta_i2c_gpio_driver_init(void) -{ - return platform_driver_register(&malta_i2c_gpio_driver); -} -coredevice_initcall(malta_i2c_gpio_driver_init); +coredevice_platform_driver(malta_i2c_gpio_driver); diff --git a/drivers/gpio/gpio-mpc8xxx.c b/drivers/gpio/gpio-mpc8xxx.c index 979f92ad30..710e5d1176 100644 --- a/drivers/gpio/gpio-mpc8xxx.c +++ b/drivers/gpio/gpio-mpc8xxx.c @@ -115,8 +115,4 @@ static struct driver_d mpc8xxx_driver = { .of_compatible = DRV_OF_COMPAT(mpc8xxx_gpio_ids), }; -static int __init mpc8xxx_init(void) -{ - return platform_driver_register(&mpc8xxx_driver); -} -postcore_initcall(mpc8xxx_init); +postcore_platform_driver(mpc8xxx_driver); diff --git a/drivers/gpio/gpio-mxs.c b/drivers/gpio/gpio-mxs.c index ef78873ad2..aca93f5b27 100644 --- a/drivers/gpio/gpio-mxs.c +++ b/drivers/gpio/gpio-mxs.c @@ -178,9 +178,4 @@ static struct driver_d mxs_gpio_driver = { .id_table = mxs_gpio_ids, }; -static int mxs_gpio_add(void) -{ - platform_driver_register(&mxs_gpio_driver); - return 0; -} -postcore_initcall(mxs_gpio_add); +postcore_platform_driver(mxs_gpio_driver); diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c index b00766a6aa..88fca4f68a 100644 --- a/drivers/gpio/gpio-omap.c +++ b/drivers/gpio/gpio-omap.c @@ -192,8 +192,4 @@ static struct driver_d omap_gpio_driver = { .of_compatible = DRV_OF_COMPAT(omap_gpio_dt_ids), }; -static int omap_gpio_add(void) -{ - return platform_driver_register(&omap_gpio_driver); -} -coredevice_initcall(omap_gpio_add); +coredevice_platform_driver(omap_gpio_driver); diff --git a/drivers/gpio/gpio-pl061.c b/drivers/gpio/gpio-pl061.c index f34aba9da9..c17c265440 100644 --- a/drivers/gpio/gpio-pl061.c +++ b/drivers/gpio/gpio-pl061.c @@ -147,11 +147,7 @@ static struct amba_driver pl061_gpio_driver = { .probe = pl061_probe, }; -static int __init pl061_gpio_init(void) -{ - return amba_driver_register(&pl061_gpio_driver); -} -coredevice_initcall(pl061_gpio_init); +coredevice_platform_driver(pl061_gpio_driver); MODULE_AUTHOR("Baruch Siach <baruch@tkos.co.il>"); MODULE_DESCRIPTION("PL061 GPIO driver"); diff --git a/drivers/gpio/gpio-stmpe.c b/drivers/gpio/gpio-stmpe.c index d7e64045b4..ef37fe0dcf 100644 --- a/drivers/gpio/gpio-stmpe.c +++ b/drivers/gpio/gpio-stmpe.c @@ -154,8 +154,4 @@ static struct driver_d stmpe_gpio_driver = { .probe = stmpe_gpio_probe, }; -static int stmpe_gpio_add(void) -{ - return platform_driver_register(&stmpe_gpio_driver); -} -coredevice_initcall(stmpe_gpio_add); +coredevice_platform_driver(stmpe_gpio_driver); diff --git a/drivers/gpio/gpio-tegra.c b/drivers/gpio/gpio-tegra.c index 56808b57e4..2348ce664a 100644 --- a/drivers/gpio/gpio-tegra.c +++ b/drivers/gpio/gpio-tegra.c @@ -201,8 +201,4 @@ static struct driver_d tegra_gpio_driver = { .probe = tegra_gpio_probe, }; -static int __init tegra_gpio_init(void) -{ - return platform_driver_register(&tegra_gpio_driver); -} -coredevice_initcall(tegra_gpio_init); +coredevice_platform_driver(tegra_gpio_driver); diff --git a/drivers/gpio/gpio-vf610.c b/drivers/gpio/gpio-vf610.c index ab35310fbe..b08b396a6e 100644 --- a/drivers/gpio/gpio-vf610.c +++ b/drivers/gpio/gpio-vf610.c @@ -156,8 +156,4 @@ static struct driver_d vf610_gpio_driver = { .of_compatible = DRV_OF_COMPAT(vf610_gpio_dt_ids), }; -static int __init gpio_vf610_init(void) -{ - return platform_driver_register(&vf610_gpio_driver); -} -postcore_initcall(gpio_vf610_init); +postcore_platform_driver(vf610_gpio_driver); |