645e10c8cc711520ae31ef67bc4c94f4c723ec3f
[openwrt/staging/neocturne.git] /
1 From 5a4fdee47fc5368c1be2184a0bb1069773b58a74 Mon Sep 17 00:00:00 2001
2 From: Stefan Wahren <stefan.wahren@i2se.com>
3 Date: Thu, 6 Dec 2018 19:28:57 +0100
4 Subject: [PATCH 473/773] staging: bcm2835-audio: use module_platform_driver()
5 macro
6
7 commit 1e55d56344b0777d6cee9b9e4a813d53728ee798 upstream.
8
9 There is not much value behind this boilerplate, so use
10 module_platform_driver() instead.
11
12 Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
13 Reviewed-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
14 Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
15 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
16 ---
17 .../vc04_services/bcm2835-audio/bcm2835.c | 20 +------------------
18 1 file changed, 1 insertion(+), 19 deletions(-)
19
20 --- a/drivers/staging/vc04_services/bcm2835-audio/bcm2835.c
21 +++ b/drivers/staging/vc04_services/bcm2835-audio/bcm2835.c
22 @@ -354,25 +354,7 @@ static struct platform_driver bcm2835_al
23 .of_match_table = snd_bcm2835_of_match_table,
24 },
25 };
26 -
27 -static int bcm2835_alsa_device_init(void)
28 -{
29 - int retval;
30 -
31 - retval = platform_driver_register(&bcm2835_alsa_driver);
32 - if (retval)
33 - pr_err("Error registering bcm2835_audio driver %d .\n", retval);
34 -
35 - return retval;
36 -}
37 -
38 -static void bcm2835_alsa_device_exit(void)
39 -{
40 - platform_driver_unregister(&bcm2835_alsa_driver);
41 -}
42 -
43 -late_initcall(bcm2835_alsa_device_init);
44 -module_exit(bcm2835_alsa_device_exit);
45 +module_platform_driver(bcm2835_alsa_driver);
46
47 MODULE_AUTHOR("Dom Cobley");
48 MODULE_DESCRIPTION("Alsa driver for BCM2835 chip");