96c11ce6c315d00abbfb3a8b6b74941db1c577ba
[openwrt/staging/neocturne.git] /
1 From c88b821594228e4e05b09ce100ef71f91e166ae2 Mon Sep 17 00:00:00 2001
2 From: Stefan Wahren <stefan.wahren@i2se.com>
3 Date: Thu, 18 Oct 2018 19:47:29 +0200
4 Subject: [PATCH 233/782] staging: bcm2835-audio: use module_platform_driver()
5 macro
6
7 There is not much value behind this boilerplate, so use
8 module_platform_driver() instead.
9
10 Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
11 ---
12 .../vc04_services/bcm2835-audio/bcm2835.c | 20 +------------------
13 1 file changed, 1 insertion(+), 19 deletions(-)
14
15 --- a/drivers/staging/vc04_services/bcm2835-audio/bcm2835.c
16 +++ b/drivers/staging/vc04_services/bcm2835-audio/bcm2835.c
17 @@ -470,25 +470,7 @@ static struct platform_driver bcm2835_al
18 .of_match_table = snd_bcm2835_of_match_table,
19 },
20 };
21 -
22 -static int bcm2835_alsa_device_init(void)
23 -{
24 - int retval;
25 -
26 - retval = platform_driver_register(&bcm2835_alsa0_driver);
27 - if (retval)
28 - pr_err("Error registering bcm2835_audio driver %d .\n", retval);
29 -
30 - return retval;
31 -}
32 -
33 -static void bcm2835_alsa_device_exit(void)
34 -{
35 - platform_driver_unregister(&bcm2835_alsa0_driver);
36 -}
37 -
38 -late_initcall(bcm2835_alsa_device_init);
39 -module_exit(bcm2835_alsa_device_exit);
40 +module_platform_driver(bcm2835_alsa0_driver);
41
42 MODULE_AUTHOR("Dom Cobley");
43 MODULE_DESCRIPTION("Alsa driver for BCM2835 chip");