aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/nfc/pn544
diff options
context:
space:
mode:
authorSamuel Ortiz <sameo@linux.intel.com>2012-12-18 10:40:16 -0500
committerSamuel Ortiz <sameo@linux.intel.com>2013-01-09 18:51:52 -0500
commit234d4d6b1038f004f233f14906ec9328bf53088b (patch)
tree9043ae5032f1da683cc6cb5b41ba35d6d5472dc4 /drivers/nfc/pn544
parentaa74103071312fede1f4953fe3c027941add1256 (diff)
NFC: pn544: Use module_i2c_driver
The pn544 init routine does nothing but adding the driver to the i2c bus. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/nfc/pn544')
-rw-r--r--drivers/nfc/pn544/i2c.c24
1 files changed, 1 insertions, 23 deletions
diff --git a/drivers/nfc/pn544/i2c.c b/drivers/nfc/pn544/i2c.c
index 7da9071b68b6..ec79f355edc1 100644
--- a/drivers/nfc/pn544/i2c.c
+++ b/drivers/nfc/pn544/i2c.c
@@ -472,29 +472,7 @@ static struct i2c_driver pn544_hci_i2c_driver = {
472 .remove = __devexit_p(pn544_hci_i2c_remove), 472 .remove = __devexit_p(pn544_hci_i2c_remove),
473}; 473};
474 474
475static int __init pn544_hci_i2c_init(void) 475module_i2c_driver(pn544_hci_i2c_driver);
476{
477 int r;
478
479 pr_debug(DRIVER_DESC ": %s\n", __func__);
480
481 r = i2c_add_driver(&pn544_hci_i2c_driver);
482 if (r) {
483 pr_err(PN544_HCI_I2C_DRIVER_NAME
484 ": driver registration failed\n");
485 return r;
486 }
487
488 return 0;
489}
490
491static void __exit pn544_hci_i2c_exit(void)
492{
493 i2c_del_driver(&pn544_hci_i2c_driver);
494}
495
496module_init(pn544_hci_i2c_init);
497module_exit(pn544_hci_i2c_exit);
498 476
499MODULE_LICENSE("GPL"); 477MODULE_LICENSE("GPL");
500MODULE_DESCRIPTION(DRIVER_DESC); 478MODULE_DESCRIPTION(DRIVER_DESC);