Skip to content

Commit

Permalink
ALSA: sound/atmel/ac97c.c: Convert to module_platform_driver
Browse files Browse the repository at this point in the history
This reduces some boilerplate code.

Signed-off-by: Alexander Stein <[email protected]>
Acked-by: Alexandre Belloni <[email protected]>
Acked-by: Nicolas Ferre <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
  • Loading branch information
AlexanderStein authored and tiwai committed Apr 16, 2014
1 parent d700d70 commit 4b973ee
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions sound/atmel/ac97c.c
Original file line number Diff line number Diff line change
Expand Up @@ -1198,26 +1198,15 @@ static int atmel_ac97c_remove(struct platform_device *pdev)
}

static struct platform_driver atmel_ac97c_driver = {
.probe = atmel_ac97c_probe,
.remove = atmel_ac97c_remove,
.driver = {
.name = "atmel_ac97c",
.owner = THIS_MODULE,
.pm = ATMEL_AC97C_PM_OPS,
},
};

static int __init atmel_ac97c_init(void)
{
return platform_driver_probe(&atmel_ac97c_driver,
atmel_ac97c_probe);
}
module_init(atmel_ac97c_init);

static void __exit atmel_ac97c_exit(void)
{
platform_driver_unregister(&atmel_ac97c_driver);
}
module_exit(atmel_ac97c_exit);
module_platform_driver(atmel_ac97c_driver);

MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("Driver for Atmel AC97 controller");
Expand Down

0 comments on commit 4b973ee

Please sign in to comment.