diff options
author | Samuel Ortiz <sameo@linux.intel.com> | 2013-04-30 17:48:50 -0400 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2013-05-21 04:48:40 -0400 |
commit | 73f3adb9b91efac04e4e7f8379a85400fc57121e (patch) | |
tree | 2b11e413e51aae905d2853a177f804cfff07c4cc /drivers/nfc/mei_phy.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/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) | |||
64 | return r; | 64 | return r; |
65 | } | 65 | } |
66 | 66 | ||
67 | r = mei_cl_register_event_cb(phy->device, nfc_mei_event_cb, phy); | ||
68 | if (r) { | ||
69 | pr_err("MEY_PHY: Event cb registration failed\n"); | ||
70 | mei_cl_disable_device(phy->device); | ||
71 | phy->powered = 0; | ||
72 | |||
73 | return r; | ||
74 | } | ||
75 | |||
67 | phy->powered = 1; | 76 | phy->powered = 1; |
68 | 77 | ||
69 | return 0; | 78 | return 0; |