diff options
author | Johan Hovold <johan@kernel.org> | 2017-03-30 06:15:41 -0400 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2017-06-18 17:57:59 -0400 |
commit | 0d1ca88bbfdfdad4f6fc0421da5e4ea9a13a0d42 (patch) | |
tree | 4c2239b18874e25e3d37a25c65bcda889177b07b /drivers/nfc | |
parent | d0607aa4aee88cb097b694caa619e68f1e0a39c6 (diff) |
NFC: nfcmrvl_usb: use interface as phy device
Use the USB-interface rather than parent USB-device device, which is
what this driver binds to, when registering the nci device.
Note that using the right device is important when dealing with device-
managed resources as the interface can be unbound independently of the
parent device.
Also note that private device pointer had already been set by
nfcmrvl_nci_register_dev() so the redundant assignment can therefore be
removed.
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/nfc')
-rw-r--r-- | drivers/nfc/nfcmrvl/usb.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/nfc/nfcmrvl/usb.c b/drivers/nfc/nfcmrvl/usb.c index 699aa9d16575..bd35eab652be 100644 --- a/drivers/nfc/nfcmrvl/usb.c +++ b/drivers/nfc/nfcmrvl/usb.c | |||
@@ -341,15 +341,13 @@ static int nfcmrvl_probe(struct usb_interface *intf, | |||
341 | init_usb_anchor(&drv_data->deferred); | 341 | init_usb_anchor(&drv_data->deferred); |
342 | 342 | ||
343 | priv = nfcmrvl_nci_register_dev(NFCMRVL_PHY_USB, drv_data, &usb_ops, | 343 | priv = nfcmrvl_nci_register_dev(NFCMRVL_PHY_USB, drv_data, &usb_ops, |
344 | &drv_data->udev->dev, &config); | 344 | &intf->dev, &config); |
345 | if (IS_ERR(priv)) | 345 | if (IS_ERR(priv)) |
346 | return PTR_ERR(priv); | 346 | return PTR_ERR(priv); |
347 | 347 | ||
348 | drv_data->priv = priv; | 348 | drv_data->priv = priv; |
349 | drv_data->priv->support_fw_dnld = false; | 349 | drv_data->priv->support_fw_dnld = false; |
350 | 350 | ||
351 | priv->dev = &drv_data->udev->dev; | ||
352 | |||
353 | usb_set_intfdata(intf, drv_data); | 351 | usb_set_intfdata(intf, drv_data); |
354 | 352 | ||
355 | return 0; | 353 | return 0; |