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: 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>
This commit is contained in:
Родитель
736b0ec486
Коммит
c04a8fe458
|
@ -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");
|
||||||
|
|
Загрузка…
Ссылка в новой задаче