e21116149650001b7a34d485a687cfc5e2fc51eb
[openwrt/staging/thess.git] /
1 From 576521feaa6a03f45839c28f1ce0588e4e49b0ca Mon Sep 17 00:00:00 2001
2 From: popcornmix <popcornmix@gmail.com>
3 Date: Mon, 29 Apr 2019 19:16:16 +0100
4 Subject: [PATCH 433/806] Revert "staging: bcm2835-audio: use
5 module_platform_driver() macro"
6
7 commit ed4c2e5dc4216d5dded502bfcf594d3984e6bccd upstream.
8
9 This reverts commit 786ced30fec053b27248ed5b24dcde61ed3f47f6.
10 ---
11 .../vc04_services/bcm2835-audio/bcm2835.c | 20 ++++++++++++++++++-
12 1 file changed, 19 insertions(+), 1 deletion(-)
13
14 --- a/drivers/staging/vc04_services/bcm2835-audio/bcm2835.c
15 +++ b/drivers/staging/vc04_services/bcm2835-audio/bcm2835.c
16 @@ -470,7 +470,25 @@ static struct platform_driver bcm2835_al
17 .of_match_table = snd_bcm2835_of_match_table,
18 },
19 };
20 -module_platform_driver(bcm2835_alsa0_driver);
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
41 MODULE_AUTHOR("Dom Cobley");
42 MODULE_DESCRIPTION("Alsa driver for BCM2835 chip");