diff options
author | Samuel Ortiz <sameo@linux.intel.com> | 2013-04-30 23:48:50 +0200 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2013-05-21 10:48:40 +0200 |
commit | 73f3adb9b91efac04e4e7f8379a85400fc57121e (patch) | |
tree | 2b11e413e51aae905d2853a177f804cfff07c4cc /drivers/nfc/pn544/mei.c | |
parent | d999e4db0ac409c582cb15e6b120241ed9105064 (diff) |
NFC: mei_phy: Register event callback when enabling the device
The callback registration starts a waiting read, so it needs to be fired
everytime the device is enabled. Otherwise following writes will never get
an answer back.
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/nfc/pn544/mei.c')
-rw-r--r-- | drivers/nfc/pn544/mei.c | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/drivers/nfc/pn544/mei.c b/drivers/nfc/pn544/mei.c index 1eb48848a35..50cef3a574b 100644 --- a/drivers/nfc/pn544/mei.c +++ b/drivers/nfc/pn544/mei.c @@ -43,24 +43,16 @@ static int pn544_mei_probe(struct mei_cl_device *device, return -ENOMEM; } - r = mei_cl_register_event_cb(device, nfc_mei_event_cb, phy); - if (r) { - pr_err(PN544_DRIVER_NAME ": event cb registration failed\n"); - goto err_out; - } - r = pn544_hci_probe(phy, &mei_phy_ops, LLC_NOP_NAME, MEI_NFC_HEADER_SIZE, 0, MEI_NFC_MAX_HCI_PAYLOAD, &phy->hdev); - if (r < 0) - goto err_out; - - return 0; + if (r < 0) { + nfc_mei_phy_free(phy); -err_out: - nfc_mei_phy_free(phy); + return r; + } - return r; + return 0; } static int pn544_mei_remove(struct mei_cl_device *device) |