projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
094dbff
)
nfc: mei_phy: get phy from the driver data
author
Tomas Winkler
<tomas.winkler@intel.com>
Wed, 19 Oct 2016 13:33:30 +0000
(16:33 +0300)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Fri, 28 Oct 2016 12:21:22 +0000
(08:21 -0400)
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>
drivers/nfc/mei_phy.c
patch
|
blob
|
history
diff --git
a/drivers/nfc/mei_phy.c
b/drivers/nfc/mei_phy.c
index
83deda4
..
66dfd81
100644
(file)
--- 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)
static void nfc_mei_event_cb(struct mei_cl_device *cldev, u32 events,
void *context)
{
- struct nfc_mei_phy *phy = context;
+ struct nfc_mei_phy *phy = mei_cldev_get_drvdata(cldev);
+
+ if (!phy)
+ return;
if (phy->hard_fault != 0)
return;