0baf5c3627b1b3d21c50572be797d4d08db0c292
[openwrt/staging/jow.git] /
1 From fc06fbe84cdcd35d8be8775576f07c52ccdf8cd2 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 436/725] 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");