hwmon: use module_pci_driver
This patch converts the drivers in drivers/hwmon/* to use module_pci_driver() macro which makes the code smaller and a bit simpler. Signed-off-by: Axel Lin <axel.lin@gmail.com> Cc: Andreas Herrmann <andreas.herrmann3@amd.com> Cc: Clemens Ladisch <clemens@ladisch.de> Cc: Rudolf Marek <r.marek@assembler.cz> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
This commit is contained in:
parent
0531d98b1f
commit
f71f5a550a
@ -257,15 +257,4 @@ static struct pci_driver fam15h_power_driver = {
|
||||
.remove = __devexit_p(fam15h_power_remove),
|
||||
};
|
||||
|
||||
static int __init fam15h_power_init(void)
|
||||
{
|
||||
return pci_register_driver(&fam15h_power_driver);
|
||||
}
|
||||
|
||||
static void __exit fam15h_power_exit(void)
|
||||
{
|
||||
pci_unregister_driver(&fam15h_power_driver);
|
||||
}
|
||||
|
||||
module_init(fam15h_power_init)
|
||||
module_exit(fam15h_power_exit)
|
||||
module_pci_driver(fam15h_power_driver);
|
||||
|
@ -225,15 +225,4 @@ static struct pci_driver k10temp_driver = {
|
||||
.remove = __devexit_p(k10temp_remove),
|
||||
};
|
||||
|
||||
static int __init k10temp_init(void)
|
||||
{
|
||||
return pci_register_driver(&k10temp_driver);
|
||||
}
|
||||
|
||||
static void __exit k10temp_exit(void)
|
||||
{
|
||||
pci_unregister_driver(&k10temp_driver);
|
||||
}
|
||||
|
||||
module_init(k10temp_init)
|
||||
module_exit(k10temp_exit)
|
||||
module_pci_driver(k10temp_driver);
|
||||
|
@ -339,19 +339,8 @@ static struct pci_driver k8temp_driver = {
|
||||
.remove = __devexit_p(k8temp_remove),
|
||||
};
|
||||
|
||||
static int __init k8temp_init(void)
|
||||
{
|
||||
return pci_register_driver(&k8temp_driver);
|
||||
}
|
||||
|
||||
static void __exit k8temp_exit(void)
|
||||
{
|
||||
pci_unregister_driver(&k8temp_driver);
|
||||
}
|
||||
module_pci_driver(k8temp_driver);
|
||||
|
||||
MODULE_AUTHOR("Rudolf Marek <r.marek@assembler.cz>");
|
||||
MODULE_DESCRIPTION("AMD K8 core temperature monitor");
|
||||
MODULE_LICENSE("GPL");
|
||||
|
||||
module_init(k8temp_init)
|
||||
module_exit(k8temp_exit)
|
||||
|
Loading…
Reference in New Issue
Block a user