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/mei_phy.c | |
parent | d999e4db0ac409c582cb15e6b120241ed9105064 (diff) | |
download | lwn-73f3adb9b91efac04e4e7f8379a85400fc57121e.tar.gz lwn-73f3adb9b91efac04e4e7f8379a85400fc57121e.zip |
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/mei_phy.c')
-rw-r--r-- | drivers/nfc/mei_phy.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/nfc/mei_phy.c b/drivers/nfc/mei_phy.c index b8f8abc422f0..1201bdbfb791 100644 --- a/drivers/nfc/mei_phy.c +++ b/drivers/nfc/mei_phy.c @@ -64,6 +64,15 @@ int nfc_mei_phy_enable(void *phy_id) return r; } + r = mei_cl_register_event_cb(phy->device, nfc_mei_event_cb, phy); + if (r) { + pr_err("MEY_PHY: Event cb registration failed\n"); + mei_cl_disable_device(phy->device); + phy->powered = 0; + + return r; + } + phy->powered = 1; return 0; |