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/clocksource | |
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/clocksource')
-rw-r--r-- | drivers/clocksource/amba-sp804.c | 6 | ||||
-rw-r--r-- | drivers/clocksource/arm_smp_twd.c | 6 | ||||
-rw-r--r-- | drivers/clocksource/bcm2835.c | 6 | ||||
-rw-r--r-- | drivers/clocksource/digic.c | 6 | ||||
-rw-r--r-- | drivers/clocksource/efi.c | 7 | ||||
-rw-r--r-- | drivers/clocksource/efi_x86.c | 7 | ||||
-rw-r--r-- | drivers/clocksource/mvebu.c | 6 | ||||
-rw-r--r-- | drivers/clocksource/nomadik.c | 6 | ||||
-rw-r--r-- | drivers/clocksource/orion.c | 6 | ||||
-rw-r--r-- | drivers/clocksource/rk_timer.c | 6 | ||||
-rw-r--r-- | drivers/clocksource/timer-atmel-pit.c | 6 | ||||
-rw-r--r-- | drivers/clocksource/timer-imx-gpt.c | 6 | ||||
-rw-r--r-- | drivers/clocksource/timer-ti-32k.c | 6 | ||||
-rw-r--r-- | drivers/clocksource/timer-ti-dm.c | 6 | ||||
-rw-r--r-- | drivers/clocksource/uemd.c | 6 |
15 files changed, 15 insertions, 77 deletions
diff --git a/drivers/clocksource/amba-sp804.c b/drivers/clocksource/amba-sp804.c index 66e3988b4c..8ed5ae4be0 100644 --- a/drivers/clocksource/amba-sp804.c +++ b/drivers/clocksource/amba-sp804.c @@ -85,8 +85,4 @@ struct amba_driver sp804_driver = { .id_table = sp804_ids, }; -static int sp804_init(void) -{ - return amba_driver_register(&sp804_driver); -} -coredevice_initcall(sp804_init); +coredevice_platform_driver(sp804_driver); diff --git a/drivers/clocksource/arm_smp_twd.c b/drivers/clocksource/arm_smp_twd.c index 226150aa42..5a1e5a7921 100644 --- a/drivers/clocksource/arm_smp_twd.c +++ b/drivers/clocksource/arm_smp_twd.c @@ -105,8 +105,4 @@ static struct driver_d smp_twd_driver = { .of_compatible = DRV_OF_COMPAT(smp_twd_compatible), }; -static int smp_twd_init(void) -{ - return platform_driver_register(&smp_twd_driver); -} -coredevice_initcall(smp_twd_init); +coredevice_platform_driver(smp_twd_driver); diff --git a/drivers/clocksource/bcm2835.c b/drivers/clocksource/bcm2835.c index 9130a4b14f..179109aee2 100644 --- a/drivers/clocksource/bcm2835.c +++ b/drivers/clocksource/bcm2835.c @@ -95,8 +95,4 @@ static struct driver_d bcm2835_cs_driver = { .of_compatible = DRV_OF_COMPAT(bcm2835_cs_dt_ids), }; -static int bcm2835_cs_init(void) -{ - return platform_driver_register(&bcm2835_cs_driver); -} -core_initcall(bcm2835_cs_init); +core_platform_driver(bcm2835_cs_driver); diff --git a/drivers/clocksource/digic.c b/drivers/clocksource/digic.c index 23e0d5b76b..9079733eba 100644 --- a/drivers/clocksource/digic.c +++ b/drivers/clocksource/digic.c @@ -88,8 +88,4 @@ static struct driver_d digic_timer_driver = { .of_compatible = DRV_OF_COMPAT(digic_timer_dt_ids), }; -static int digic_timer_init(void) -{ - return platform_driver_register(&digic_timer_driver); -} -coredevice_initcall(digic_timer_init); +coredevice_platform_driver(digic_timer_driver); diff --git a/drivers/clocksource/efi.c b/drivers/clocksource/efi.c index fb5b7ca63d..658d146fb5 100644 --- a/drivers/clocksource/efi.c +++ b/drivers/clocksource/efi.c @@ -106,9 +106,4 @@ static struct driver_d efi_cs_driver = { .probe = efi_cs_probe, }; -static int efi_cs_initcall(void) -{ - return platform_driver_register(&efi_cs_driver); -} -/* for efi the time must be init at core initcall level */ -core_initcall(efi_cs_initcall); +core_platform_driver(efi_cs_driver); diff --git a/drivers/clocksource/efi_x86.c b/drivers/clocksource/efi_x86.c index f8d3ff8a43..364e1ef8e1 100644 --- a/drivers/clocksource/efi_x86.c +++ b/drivers/clocksource/efi_x86.c @@ -71,9 +71,4 @@ static struct driver_d efi_x86_cs_driver = { .probe = efi_x86_cs_probe, }; -static int efi_x86_cs_initcall(void) -{ - return platform_driver_register(&efi_x86_cs_driver); -} -/* for efi the time must be init at core initcall level */ -core_initcall(efi_x86_cs_initcall); +core_platform_driver(efi_x86_cs_driver); diff --git a/drivers/clocksource/mvebu.c b/drivers/clocksource/mvebu.c index b55d72a343..5a47d6f217 100644 --- a/drivers/clocksource/mvebu.c +++ b/drivers/clocksource/mvebu.c @@ -105,8 +105,4 @@ static struct driver_d mvebu_timer_driver = { .of_compatible = DRV_OF_COMPAT(mvebu_timer_dt_ids), }; -static int mvebu_timer_init(void) -{ - return platform_driver_register(&mvebu_timer_driver); -} -postcore_initcall(mvebu_timer_init); +postcore_platform_driver(mvebu_timer_driver); diff --git a/drivers/clocksource/nomadik.c b/drivers/clocksource/nomadik.c index 9b20cbc946..7d5d9f9f77 100644 --- a/drivers/clocksource/nomadik.c +++ b/drivers/clocksource/nomadik.c @@ -142,8 +142,4 @@ static struct driver_d nmdk_mtu_driver = { .probe = nmdk_mtu_probe, }; -static int nmdk_mtu_init(void) -{ - return platform_driver_register(&nmdk_mtu_driver); -} -coredevice_initcall(nmdk_mtu_init); +coredevice_platform_driver(nmdk_mtu_driver); diff --git a/drivers/clocksource/orion.c b/drivers/clocksource/orion.c index 97008dabab..c9f50b729e 100644 --- a/drivers/clocksource/orion.c +++ b/drivers/clocksource/orion.c @@ -79,8 +79,4 @@ static struct driver_d orion_timer_driver = { .of_compatible = DRV_OF_COMPAT(orion_timer_dt_ids), }; -static int orion_timer_init(void) -{ - return platform_driver_register(&orion_timer_driver); -} -postcore_initcall(orion_timer_init); +postcore_platform_driver(orion_timer_driver); diff --git a/drivers/clocksource/rk_timer.c b/drivers/clocksource/rk_timer.c index baa517c62f..5cc8d32b60 100644 --- a/drivers/clocksource/rk_timer.c +++ b/drivers/clocksource/rk_timer.c @@ -66,8 +66,4 @@ static struct driver_d rktimer_driver = { .of_compatible = DRV_OF_COMPAT(rktimer_dt_ids), }; -static int rktimer_init(void) -{ - return platform_driver_register(&rktimer_driver); -} -core_initcall(rktimer_init); +core_platform_driver(rktimer_driver); diff --git a/drivers/clocksource/timer-atmel-pit.c b/drivers/clocksource/timer-atmel-pit.c index 50572ff5f8..368aae2450 100644 --- a/drivers/clocksource/timer-atmel-pit.c +++ b/drivers/clocksource/timer-atmel-pit.c @@ -112,8 +112,4 @@ static struct driver_d at91_pit_driver = { .of_compatible = DRV_OF_COMPAT(at91_pit_dt_ids), }; -static int at91_pit_init(void) -{ - return platform_driver_register(&at91_pit_driver); -} -postcore_initcall(at91_pit_init); +postcore_platform_driver(at91_pit_driver); diff --git a/drivers/clocksource/timer-imx-gpt.c b/drivers/clocksource/timer-imx-gpt.c index 881065bf9f..6be0afed4d 100644 --- a/drivers/clocksource/timer-imx-gpt.c +++ b/drivers/clocksource/timer-imx-gpt.c @@ -182,8 +182,4 @@ static struct driver_d imx_gpt_driver = { .id_table = imx_gpt_ids, }; -static int imx_gpt_init(void) -{ - return platform_driver_register(&imx_gpt_driver); -} -postcore_initcall(imx_gpt_init); +postcore_platform_driver(imx_gpt_driver); diff --git a/drivers/clocksource/timer-ti-32k.c b/drivers/clocksource/timer-ti-32k.c index f93ab5bcff..755c78095f 100644 --- a/drivers/clocksource/timer-ti-32k.c +++ b/drivers/clocksource/timer-ti-32k.c @@ -99,8 +99,4 @@ static struct driver_d omap_32ktimer_driver = { .of_compatible = DRV_OF_COMPAT(omap_32ktimer_dt_ids), }; -static int omap_32ktimer_init(void) -{ - return platform_driver_register(&omap_32ktimer_driver); -} -postcore_initcall(omap_32ktimer_init); +postcore_platform_driver(omap_32ktimer_driver); diff --git a/drivers/clocksource/timer-ti-dm.c b/drivers/clocksource/timer-ti-dm.c index f41f0bb423..86882fcaf5 100644 --- a/drivers/clocksource/timer-ti-dm.c +++ b/drivers/clocksource/timer-ti-dm.c @@ -112,8 +112,4 @@ static struct driver_d omap_dmtimer_driver = { .of_compatible = DRV_OF_COMPAT(omap_dmtimer_dt_ids), }; -static int omap_dmtimer_init(void) -{ - return platform_driver_register(&omap_dmtimer_driver); -} -postcore_initcall(omap_dmtimer_init); +postcore_platform_driver(omap_dmtimer_driver); diff --git a/drivers/clocksource/uemd.c b/drivers/clocksource/uemd.c index 5eacfdaf1b..02fa8a1c5b 100644 --- a/drivers/clocksource/uemd.c +++ b/drivers/clocksource/uemd.c @@ -123,8 +123,4 @@ static struct driver_d uemd_timer_driver = { .of_compatible = DRV_OF_COMPAT(uemd_timer_dt_ids), }; -static int uemd_timer_init(void) -{ - return platform_driver_register(&uemd_timer_driver); -} -coredevice_initcall(uemd_timer_init); +coredevice_platform_driver(uemd_timer_driver); |