From: Sachin Kamat Date: Fri, 23 Aug 2013 10:11:05 +0000 (+0530) Subject: mfd: timberdale: Use module_pci_driver X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0afb00e38bb220d198fd7778902d82e944e821a4;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git mfd: timberdale: Use module_pci_driver module_pci_driver removes some boilerplate and makes the code simple. Signed-off-by: Sachin Kamat Signed-off-by: Lee Jones --- diff --git a/drivers/mfd/timberdale.c b/drivers/mfd/timberdale.c index 57dd89ddb683..a6755ec7bd6a 100644 --- a/drivers/mfd/timberdale.c +++ b/drivers/mfd/timberdale.c @@ -868,34 +868,7 @@ static struct pci_driver timberdale_pci_driver = { .remove = timb_remove, }; -static int __init timberdale_init(void) -{ - int err; - - err = pci_register_driver(&timberdale_pci_driver); - if (err < 0) { - printk(KERN_ERR - "Failed to register PCI driver for %s device.\n", - timberdale_pci_driver.name); - return -ENODEV; - } - - printk(KERN_INFO "Driver for %s has been successfully registered.\n", - timberdale_pci_driver.name); - - return 0; -} - -static void __exit timberdale_exit(void) -{ - pci_unregister_driver(&timberdale_pci_driver); - - printk(KERN_INFO "Driver for %s has been successfully unregistered.\n", - timberdale_pci_driver.name); -} - -module_init(timberdale_init); -module_exit(timberdale_exit); +module_pci_driver(timberdale_pci_driver); MODULE_AUTHOR("Mocean Laboratories "); MODULE_VERSION(DRV_VERSION);