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>
This commit is contained in:
Tomas Winkler 2016-10-19 16:33:30 +03:00 committed by Greg Kroah-Hartman
parent 094dbffedc
commit 972cedf6e3

View File

@ -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, static void nfc_mei_event_cb(struct mei_cl_device *cldev, u32 events,
void *context) 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) if (phy->hard_fault != 0)
return; return;