diff options
author | Sachin Kamat <sachin.kamat@linaro.org> | 2013-08-23 06:11:05 -0400 |
---|---|---|
committer | Lee Jones <lee.jones@linaro.org> | 2013-09-02 05:22:39 -0400 |
commit | 0afb00e38bb220d198fd7778902d82e944e821a4 (patch) | |
tree | 124bd2d5ce6ba77f312c3a3a8bb9c30abbae505d /drivers/mfd | |
parent | 624362676c1860874737dbd4db5fcee05d585722 (diff) |
mfd: timberdale: Use module_pci_driver
module_pci_driver removes some boilerplate and makes the code
simple.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'drivers/mfd')
-rw-r--r-- | drivers/mfd/timberdale.c | 29 |
1 files changed, 1 insertions, 28 deletions
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 = { | |||
868 | .remove = timb_remove, | 868 | .remove = timb_remove, |
869 | }; | 869 | }; |
870 | 870 | ||
871 | static int __init timberdale_init(void) | 871 | module_pci_driver(timberdale_pci_driver); |
872 | { | ||
873 | int err; | ||
874 | |||
875 | err = pci_register_driver(&timberdale_pci_driver); | ||
876 | if (err < 0) { | ||
877 | printk(KERN_ERR | ||
878 | "Failed to register PCI driver for %s device.\n", | ||
879 | timberdale_pci_driver.name); | ||
880 | return -ENODEV; | ||
881 | } | ||
882 | |||
883 | printk(KERN_INFO "Driver for %s has been successfully registered.\n", | ||
884 | timberdale_pci_driver.name); | ||
885 | |||
886 | return 0; | ||
887 | } | ||
888 | |||
889 | static void __exit timberdale_exit(void) | ||
890 | { | ||
891 | pci_unregister_driver(&timberdale_pci_driver); | ||
892 | |||
893 | printk(KERN_INFO "Driver for %s has been successfully unregistered.\n", | ||
894 | timberdale_pci_driver.name); | ||
895 | } | ||
896 | |||
897 | module_init(timberdale_init); | ||
898 | module_exit(timberdale_exit); | ||
899 | 872 | ||
900 | MODULE_AUTHOR("Mocean Laboratories <info@mocean-labs.com>"); | 873 | MODULE_AUTHOR("Mocean Laboratories <info@mocean-labs.com>"); |
901 | MODULE_VERSION(DRV_VERSION); | 874 | MODULE_VERSION(DRV_VERSION); |