mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-16 01:54:00 +00:00
PNP: tty/serial/8250/8250_fintek: Use module_pnp_driver to register driver
Removing some boilerplate by using module_pnp_driver instead of calling register and unregister in the otherwise empty init/exit functions Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
parent
99f74f12e8
commit
aee94467d9
@ -234,18 +234,7 @@ static struct pnp_driver fintek_8250_driver = {
|
|||||||
.id_table = fintek_dev_table,
|
.id_table = fintek_dev_table,
|
||||||
};
|
};
|
||||||
|
|
||||||
static int fintek_8250_init(void)
|
module_pnp_driver(fintek_8250_driver);
|
||||||
{
|
|
||||||
return pnp_register_driver(&fintek_8250_driver);
|
|
||||||
}
|
|
||||||
module_init(fintek_8250_init);
|
|
||||||
|
|
||||||
static void fintek_8250_exit(void)
|
|
||||||
{
|
|
||||||
pnp_unregister_driver(&fintek_8250_driver);
|
|
||||||
}
|
|
||||||
module_exit(fintek_8250_exit);
|
|
||||||
|
|
||||||
MODULE_DESCRIPTION("Fintek F812164 module");
|
MODULE_DESCRIPTION("Fintek F812164 module");
|
||||||
MODULE_AUTHOR("Ricardo Ribalda <ricardo.ribalda@gmail.com>");
|
MODULE_AUTHOR("Ricardo Ribalda <ricardo.ribalda@gmail.com>");
|
||||||
MODULE_LICENSE("GPL");
|
MODULE_LICENSE("GPL");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user