mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-25 23:40:53 +07:00
PNP: media/rc: 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
6a5333092e
commit
af638a0407
@ -1195,16 +1195,6 @@ static struct pnp_driver ene_driver = {
|
||||
.shutdown = ene_shutdown,
|
||||
};
|
||||
|
||||
static int __init ene_init(void)
|
||||
{
|
||||
return pnp_register_driver(&ene_driver);
|
||||
}
|
||||
|
||||
static void ene_exit(void)
|
||||
{
|
||||
pnp_unregister_driver(&ene_driver);
|
||||
}
|
||||
|
||||
module_param(sample_period, int, S_IRUGO);
|
||||
MODULE_PARM_DESC(sample_period, "Hardware sample period (50 us default)");
|
||||
|
||||
@ -1226,5 +1216,4 @@ MODULE_DESCRIPTION
|
||||
MODULE_AUTHOR("Maxim Levitsky");
|
||||
MODULE_LICENSE("GPL");
|
||||
|
||||
module_init(ene_init);
|
||||
module_exit(ene_exit);
|
||||
module_pnp_driver(ene_driver);
|
||||
|
@ -684,16 +684,6 @@ static struct pnp_driver fintek_driver = {
|
||||
.shutdown = fintek_shutdown,
|
||||
};
|
||||
|
||||
static int __init fintek_init(void)
|
||||
{
|
||||
return pnp_register_driver(&fintek_driver);
|
||||
}
|
||||
|
||||
static void __exit fintek_exit(void)
|
||||
{
|
||||
pnp_unregister_driver(&fintek_driver);
|
||||
}
|
||||
|
||||
module_param(debug, int, S_IRUGO | S_IWUSR);
|
||||
MODULE_PARM_DESC(debug, "Enable debugging output");
|
||||
|
||||
@ -703,5 +693,4 @@ MODULE_DESCRIPTION(FINTEK_DESCRIPTION " driver");
|
||||
MODULE_AUTHOR("Jarod Wilson <jarod@redhat.com>");
|
||||
MODULE_LICENSE("GPL");
|
||||
|
||||
module_init(fintek_init);
|
||||
module_exit(fintek_exit);
|
||||
module_pnp_driver(fintek_driver);
|
||||
|
@ -1708,21 +1708,10 @@ static struct pnp_driver ite_driver = {
|
||||
.shutdown = ite_shutdown,
|
||||
};
|
||||
|
||||
static int __init ite_init(void)
|
||||
{
|
||||
return pnp_register_driver(&ite_driver);
|
||||
}
|
||||
|
||||
static void __exit ite_exit(void)
|
||||
{
|
||||
pnp_unregister_driver(&ite_driver);
|
||||
}
|
||||
|
||||
MODULE_DEVICE_TABLE(pnp, ite_ids);
|
||||
MODULE_DESCRIPTION("ITE Tech Inc. IT8712F/ITE8512F CIR driver");
|
||||
|
||||
MODULE_AUTHOR("Juan J. Garcia de Soria <skandalfo@gmail.com>");
|
||||
MODULE_LICENSE("GPL");
|
||||
|
||||
module_init(ite_init);
|
||||
module_exit(ite_exit);
|
||||
module_pnp_driver(ite_driver);
|
||||
|
@ -1219,16 +1219,6 @@ static struct pnp_driver nvt_driver = {
|
||||
.shutdown = nvt_shutdown,
|
||||
};
|
||||
|
||||
static int __init nvt_init(void)
|
||||
{
|
||||
return pnp_register_driver(&nvt_driver);
|
||||
}
|
||||
|
||||
static void __exit nvt_exit(void)
|
||||
{
|
||||
pnp_unregister_driver(&nvt_driver);
|
||||
}
|
||||
|
||||
module_param(debug, int, S_IRUGO | S_IWUSR);
|
||||
MODULE_PARM_DESC(debug, "Enable debugging output");
|
||||
|
||||
@ -1238,5 +1228,4 @@ MODULE_DESCRIPTION("Nuvoton W83667HG-A & W83677HG-I CIR driver");
|
||||
MODULE_AUTHOR("Jarod Wilson <jarod@redhat.com>");
|
||||
MODULE_LICENSE("GPL");
|
||||
|
||||
module_init(nvt_init);
|
||||
module_exit(nvt_exit);
|
||||
module_pnp_driver(nvt_driver);
|
||||
|
Loading…
Reference in New Issue
Block a user