From patchwork Wed Mar 29 16:21:12 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 9651911 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 A56DE60349 for ; Wed, 29 Mar 2017 16:22:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9986828482 for ; Wed, 29 Mar 2017 16:22:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8E91C284D6; Wed, 29 Mar 2017 16:22:52 +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.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, 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 5474F28482 for ; Wed, 29 Mar 2017 16:22:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753661AbdC2QWD (ORCPT ); Wed, 29 Mar 2017 12:22:03 -0400 Received: from mail-lf0-f68.google.com ([209.85.215.68]:34745 "EHLO mail-lf0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753099AbdC2QV7 (ORCPT ); Wed, 29 Mar 2017 12:21:59 -0400 Received: by mail-lf0-f68.google.com with SMTP id x137so2166428lff.1; Wed, 29 Mar 2017 09:21:58 -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=EDjGzErr828MqAG7pbdxmDkn90R5QrmHfpYdvyf0vLImgwbsTatU7hp9OPddS/jrEJ fwCEdBlvIsT3yIu4rNXpKWy4RqLkQMOPPTyloe5dqxt+fmbjTuBx/3Rf1m4PauBt+xlY 0tWjTGSlFlsJMpKrPvWtx2TgOnXC+SAxxWe87ZzVXDJglukuFAmMYqZf5tqEA/VRU3c9 T3BTA+/O+PmR6Xl8pJMfumk0Xv1g1wyD0MG0a1ZKiWDlfmHBuO7NTvgVcm7WxZ0rs2t6 35Gqt0FMRz6KEU5fPfODLYspPLOhX0tPXbfDUtTRfIUh2pZyMCs9iY149vPTON8TeXRg uknQ== 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=glelk2N2lrTMhOkOCpGylq5WU5o4daYoe1ysEr192HOuTUfHfLKAPa8l/URYs2/90c x12aGt5O/f6XUoyesPlQ3hgNOzdyOZDEgE3zIx27e/0a208iUrIEAve9yRdB2GQDo8Cp 9SNON3syS0OrxhQoP0VvoBAEWfaPDx1JDP03wWPwzHk4da7C2lbTcfHzXHcv++iw5aev 5+2sVtJYTDgYjR4/EA1kDRi5eXKT6nakS5CUFLLGfo1ZSXfDgINWtbL2knbFq0BGP555 FNDSuHZwuslfX5FweJDpkbzSYSpwMQGARIrBJ1eQ02CkchkOQMKWBUZcuzci7AvoRzJI w7FA== X-Gm-Message-State: AFeK/H3kmUr7dfabZs5bahKRnvyeOX/KEWUlPwAlRAWZzseC7M66hI8hkssG78aku+5m0Q== X-Received: by 10.25.221.66 with SMTP id u63mr423716lfg.52.1490804517124; Wed, 29 Mar 2017 09:21:57 -0700 (PDT) Received: from xi.terra ([84.216.234.102]) by smtp.gmail.com with ESMTPSA id j2sm1387032lfk.46.2017.03.29.09.21.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 29 Mar 2017 09:21:54 -0700 (PDT) Received: from johan by xi.terra with local (Exim 4.89) (envelope-from ) id 1ctGM1-0004jd-8m; Wed, 29 Mar 2017 18:21:49 +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 7/7] NFC: nfcmrvl_usb: use interface as phy device Date: Wed, 29 Mar 2017 18:21:12 +0200 Message-Id: <20170329162112.18121-8-johan@kernel.org> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170329162112.18121-1-johan@kernel.org> References: <20170329162112.18121-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;