ide: use module_platform_driver()
Eliminate boilerplate code by using module_platform_driver(). Signed-off-by: Christoph Jaeger <christophjaeger@linux.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
e7fda6c4c3
commit
a53dae49b2
|
@ -592,18 +592,7 @@ static struct platform_driver au1200_ide_driver = {
|
||||||
.remove = au_ide_remove,
|
.remove = au_ide_remove,
|
||||||
};
|
};
|
||||||
|
|
||||||
static int __init au_ide_init(void)
|
module_platform_driver(au1200_ide_driver);
|
||||||
{
|
|
||||||
return platform_driver_register(&au1200_ide_driver);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void __exit au_ide_exit(void)
|
|
||||||
{
|
|
||||||
platform_driver_unregister(&au1200_ide_driver);
|
|
||||||
}
|
|
||||||
|
|
||||||
MODULE_LICENSE("GPL");
|
MODULE_LICENSE("GPL");
|
||||||
MODULE_DESCRIPTION("AU1200 IDE driver");
|
MODULE_DESCRIPTION("AU1200 IDE driver");
|
||||||
|
|
||||||
module_init(au_ide_init);
|
|
||||||
module_exit(au_ide_exit);
|
|
||||||
|
|
|
@ -131,19 +131,8 @@ static struct platform_driver platform_ide_driver = {
|
||||||
.remove = plat_ide_remove,
|
.remove = plat_ide_remove,
|
||||||
};
|
};
|
||||||
|
|
||||||
static int __init platform_ide_init(void)
|
module_platform_driver(platform_ide_driver);
|
||||||
{
|
|
||||||
return platform_driver_register(&platform_ide_driver);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void __exit platform_ide_exit(void)
|
|
||||||
{
|
|
||||||
platform_driver_unregister(&platform_ide_driver);
|
|
||||||
}
|
|
||||||
|
|
||||||
MODULE_DESCRIPTION("Platform IDE driver");
|
MODULE_DESCRIPTION("Platform IDE driver");
|
||||||
MODULE_LICENSE("GPL");
|
MODULE_LICENSE("GPL");
|
||||||
MODULE_ALIAS("platform:pata_platform");
|
MODULE_ALIAS("platform:pata_platform");
|
||||||
|
|
||||||
module_init(platform_ide_init);
|
|
||||||
module_exit(platform_ide_exit);
|
|
||||||
|
|
Loading…
Reference in a new issue