From patchwork Thu Mar 30 10:15:41 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 9653617 X-Patchwork-Delegate: sameo@linux.intel.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 0070860349 for ; Thu, 30 Mar 2017 10:22:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DDE5527F90 for ; Thu, 30 Mar 2017 10:22:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D0B182850D; Thu, 30 Mar 2017 10:22:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8823927F90 for ; Thu, 30 Mar 2017 10:22:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933258AbdC3KVj (ORCPT ); Thu, 30 Mar 2017 06:21:39 -0400 Received: from mail-lf0-f66.google.com ([209.85.215.66]:35012 "EHLO mail-lf0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933235AbdC3KQG (ORCPT ); Thu, 30 Mar 2017 06:16:06 -0400 Received: by mail-lf0-f66.google.com with SMTP id v2so4125284lfi.2; Thu, 30 Mar 2017 03:16:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=4i0LRhJS+fK4ipjfyMJU2D6k+5+GqUec7sPgTpYdbQU=; b=ZgZyFO+z2i8hGkLHH73dRX7uAXIHYMNWBtlm011ZStEQNqkZdWyLjxTVaqObe7+DwI Cb7if9fxn1ORmn6slJElRsZWaYIgDZ7JOnC8aIojffLbqw4el7Sh4QbigVgf7OJBOmUq SpZmeHm7Rkb92bWuUKSbgrqRAW3Vgk6foT6k+IEjkVjayqyNqJjSCZ5+3wIr6/8g7P2X O13YLh/KHp2rpwLT6YIlUkSg8Mq4K+3EusSgX3wW8A+lm66oi9kezw4cnw4BJR4A784V xJSn0JxTQH3Jt27Dh4ilyCZtIC9AFOB97EQxBBSasdH9YP3Tv31NlEOfcJ7JZcx+uiFO A71Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=4i0LRhJS+fK4ipjfyMJU2D6k+5+GqUec7sPgTpYdbQU=; b=Qu4sLD4p752kABWz0tGDn5sUntR6nfXgH9qkP/2997CK/l4zFqCBlHIDYfBEbYYjm6 TpOrFBIzoVU+VyXgUoB0PKM9COBNC+sHqM1qwfCPnJgGyN4UH438CEKQUcNDtZZQE2Nj hAiiUMQlAhQEDO8z0BcZyVBQSOTW8F0YkPO9+hWsH2T4bqrmg7887xpdUe9uK9Y63m6k F187rbpgtoRKRZYUOR5MHwO1BVHPIY5r+sMUFfJRvAgaU3mxt2RIAS4qLISeoWeE+K5B 15/iri9sHqAE1Di1+yUbJJTeUBdmMAN7CeRlzazIZSc7UpdpA03Z7IsjqqhDm+wAf10T bpWg== X-Gm-Message-State: AFeK/H0h/yur6DVwtUYY6UHIDtwuxH/yQBOVdpdm3e3b1Fmdo3O1coT4ryT7SlU5Kdqwvw== X-Received: by 10.46.9.129 with SMTP id 123mr1955346ljj.61.1490868963673; Thu, 30 Mar 2017 03:16:03 -0700 (PDT) Received: from xi.terra ([84.216.234.102]) by smtp.gmail.com with ESMTPSA id f28sm291598lfi.52.2017.03.30.03.16.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 30 Mar 2017 03:16:01 -0700 (PDT) Received: from johan by xi.terra with local (Exim 4.89) (envelope-from ) id 1ctX7R-00041V-Kr; Thu, 30 Mar 2017 12:15:53 +0200 From: Johan Hovold To: Lauro Ramos Venancio , Aloisio Almeida Jr , Samuel Ortiz Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Johan Hovold Subject: [PATCH v2 7/8] NFC: nfcmrvl_usb: use interface as phy device Date: Thu, 30 Mar 2017 12:15:41 +0200 Message-Id: <20170330101542.15384-8-johan@kernel.org> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170330101542.15384-1-johan@kernel.org> References: <20170330101542.15384-1-johan@kernel.org> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- drivers/nfc/nfcmrvl/usb.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/nfc/nfcmrvl/usb.c b/drivers/nfc/nfcmrvl/usb.c index 585a0f20835b..728b3321842d 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, init_usb_anchor(&drv_data->deferred); priv = nfcmrvl_nci_register_dev(NFCMRVL_PHY_USB, drv_data, &usb_ops, - &drv_data->udev->dev, &config); + &intf->dev, &config); if (IS_ERR(priv)) return PTR_ERR(priv); drv_data->priv = priv; drv_data->priv->support_fw_dnld = false; - priv->dev = &drv_data->udev->dev; - usb_set_intfdata(intf, drv_data); return 0;