]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
staging: bcm2835-audio: use module_platform_driver() macro
authorStefan Wahren <stefan.wahren@i2se.com>
Thu, 6 Dec 2018 18:28:57 +0000 (19:28 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 12 Dec 2018 10:56:47 +0000 (11:56 +0100)
There is not much value behind this boilerplate, so use
module_platform_driver() instead.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Reviewed-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vc04_services/bcm2835-audio/bcm2835.c

index e14b7c5aa07c9185c0d1fbb647334c5832679b31..86b921030db7bf2eab7ec97d7cb51b06959bcc96 100644 (file)
@@ -354,25 +354,7 @@ static struct platform_driver bcm2835_alsa_driver = {
                .of_match_table = snd_bcm2835_of_match_table,
        },
 };
-
-static int bcm2835_alsa_device_init(void)
-{
-       int retval;
-
-       retval = platform_driver_register(&bcm2835_alsa_driver);
-       if (retval)
-               pr_err("Error registering bcm2835_audio driver %d .\n", retval);
-
-       return retval;
-}
-
-static void bcm2835_alsa_device_exit(void)
-{
-       platform_driver_unregister(&bcm2835_alsa_driver);
-}
-
-late_initcall(bcm2835_alsa_device_init);
-module_exit(bcm2835_alsa_device_exit);
+module_platform_driver(bcm2835_alsa_driver);
 
 MODULE_AUTHOR("Dom Cobley");
 MODULE_DESCRIPTION("Alsa driver for BCM2835 chip");