30f9e8f3e6c4bdfa66e3e77f19b880693ca21078
[oweals/openwrt.git] /
1 From 3dbeaecc47252914318164e668e6cea6d01f774b 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/773] 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");