Commit c04a8fe4 authored by Stefan Wahren's avatar Stefan Wahren Committed by Greg Kroah-Hartman

staging: bcm2835-audio: use module_platform_driver() macro

There is not much value behind this boilerplate, so use
module_platform_driver() instead.
Signed-off-by: default avatarStefan Wahren <stefan.wahren@i2se.com>
Reviewed-by: default avatarNicolas Saenz Julienne <nsaenzjulienne@suse.de>
Reviewed-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 736b0ec4
...@@ -354,25 +354,7 @@ static struct platform_driver bcm2835_alsa_driver = { ...@@ -354,25 +354,7 @@ static struct platform_driver bcm2835_alsa_driver = {
.of_match_table = snd_bcm2835_of_match_table, .of_match_table = snd_bcm2835_of_match_table,
}, },
}; };
module_platform_driver(bcm2835_alsa_driver);
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_AUTHOR("Dom Cobley"); MODULE_AUTHOR("Dom Cobley");
MODULE_DESCRIPTION("Alsa driver for BCM2835 chip"); MODULE_DESCRIPTION("Alsa driver for BCM2835 chip");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment