Commit 234d4d6b authored by Samuel Ortiz's avatar Samuel Ortiz

NFC: pn544: Use module_i2c_driver

The pn544 init routine does nothing but adding the driver to the i2c bus.
Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
parent aa741030
...@@ -472,29 +472,7 @@ static struct i2c_driver pn544_hci_i2c_driver = { ...@@ -472,29 +472,7 @@ static struct i2c_driver pn544_hci_i2c_driver = {
.remove = __devexit_p(pn544_hci_i2c_remove), .remove = __devexit_p(pn544_hci_i2c_remove),
}; };
static int __init pn544_hci_i2c_init(void) module_i2c_driver(pn544_hci_i2c_driver);
{
int r;
pr_debug(DRIVER_DESC ": %s\n", __func__);
r = i2c_add_driver(&pn544_hci_i2c_driver);
if (r) {
pr_err(PN544_HCI_I2C_DRIVER_NAME
": driver registration failed\n");
return r;
}
return 0;
}
static void __exit pn544_hci_i2c_exit(void)
{
i2c_del_driver(&pn544_hci_i2c_driver);
}
module_init(pn544_hci_i2c_init);
module_exit(pn544_hci_i2c_exit);
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_DESCRIPTION(DRIVER_DESC); MODULE_DESCRIPTION(DRIVER_DESC);
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment