|
@@ -962,9 +962,10 @@ static int pn544_hci_i2c_probe(struct i2c_client *client,
|
|
|
|
|
|
pn544_hci_i2c_platform_init(phy);
|
|
|
|
|
|
- r = request_threaded_irq(client->irq, NULL, pn544_hci_i2c_irq_thread_fn,
|
|
|
- IRQF_TRIGGER_RISING | IRQF_ONESHOT,
|
|
|
- PN544_HCI_I2C_DRIVER_NAME, phy);
|
|
|
+ r = devm_request_threaded_irq(&client->dev, client->irq, NULL,
|
|
|
+ pn544_hci_i2c_irq_thread_fn,
|
|
|
+ IRQF_TRIGGER_RISING | IRQF_ONESHOT,
|
|
|
+ PN544_HCI_I2C_DRIVER_NAME, phy);
|
|
|
if (r < 0) {
|
|
|
nfc_err(&client->dev, "Unable to register IRQ handler\n");
|
|
|
return r;
|
|
@@ -975,14 +976,9 @@ static int pn544_hci_i2c_probe(struct i2c_client *client,
|
|
|
PN544_HCI_I2C_LLC_MAX_PAYLOAD,
|
|
|
pn544_hci_i2c_fw_download, &phy->hdev);
|
|
|
if (r < 0)
|
|
|
- goto err_hci;
|
|
|
+ return r;
|
|
|
|
|
|
return 0;
|
|
|
-
|
|
|
-err_hci:
|
|
|
- free_irq(client->irq, phy);
|
|
|
-
|
|
|
- return r;
|
|
|
}
|
|
|
|
|
|
static int pn544_hci_i2c_remove(struct i2c_client *client)
|
|
@@ -1000,8 +996,6 @@ static int pn544_hci_i2c_remove(struct i2c_client *client)
|
|
|
if (phy->powered)
|
|
|
pn544_hci_i2c_disable(phy);
|
|
|
|
|
|
- free_irq(client->irq, phy);
|
|
|
-
|
|
|
return 0;
|
|
|
}
|
|
|
|