1 From 72c059360457babd76009697e652c96cb282856e 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] staging: bcm2835-audio: use module_platform_driver()
7 commit 1e55d56344b0777d6cee9b9e4a813d53728ee798 upstream.
9 There is not much value behind this boilerplate, so use
10 module_platform_driver() instead.
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>
17 .../vc04_services/bcm2835-audio/bcm2835.c | 20 +------------------
18 1 file changed, 1 insertion(+), 19 deletions(-)
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,
27 -static int bcm2835_alsa_device_init(void)
31 - retval = platform_driver_register(&bcm2835_alsa_driver);
33 - pr_err("Error registering bcm2835_audio driver %d .\n", retval);
38 -static void bcm2835_alsa_device_exit(void)
40 - platform_driver_unregister(&bcm2835_alsa_driver);
43 -late_initcall(bcm2835_alsa_device_init);
44 -module_exit(bcm2835_alsa_device_exit);
45 +module_platform_driver(bcm2835_alsa_driver);
47 MODULE_AUTHOR("Dom Cobley");
48 MODULE_DESCRIPTION("Alsa driver for BCM2835 chip");