diff options
author | Tomas Winkler <tomas.winkler@intel.com> | 2016-10-19 09:33:30 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-10-28 08:21:22 -0400 |
commit | 972cedf6e39a49a79a66cd7f46132d21369d0083 (patch) | |
tree | e0eb9cf51a5e8cd7ab261e4b94c5a967ded2c3f8 /drivers/nfc | |
parent | 094dbffedcc593ad11436d61376b884156ee0bd9 (diff) |
nfc: mei_phy: get phy from the driver data
In order to remove rather redundant context from the callback
signature we the get nfc mei_phy from the driver's data.
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/nfc')
-rw-r--r-- | drivers/nfc/mei_phy.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/nfc/mei_phy.c b/drivers/nfc/mei_phy.c index 83deda4bb4d6..66dfd81ffb18 100644 --- a/drivers/nfc/mei_phy.c +++ b/drivers/nfc/mei_phy.c | |||
@@ -300,7 +300,10 @@ static int mei_nfc_recv(struct nfc_mei_phy *phy, u8 *buf, size_t length) | |||
300 | static void nfc_mei_event_cb(struct mei_cl_device *cldev, u32 events, | 300 | static void nfc_mei_event_cb(struct mei_cl_device *cldev, u32 events, |
301 | void *context) | 301 | void *context) |
302 | { | 302 | { |
303 | struct nfc_mei_phy *phy = context; | 303 | struct nfc_mei_phy *phy = mei_cldev_get_drvdata(cldev); |
304 | |||
305 | if (!phy) | ||
306 | return; | ||
304 | 307 | ||
305 | if (phy->hard_fault != 0) | 308 | if (phy->hard_fault != 0) |
306 | return; | 309 | return; |