Received: by 10.192.165.148 with SMTP id m20csp399212imm; Fri, 20 Apr 2018 00:47:59 -0700 (PDT) X-Google-Smtp-Source: AIpwx490JvkI35fYr6Hi0FzJwjRxOgWFTGP2n9r9r+x0gJRjg90gwiFAobQHZFXj/wp7bczt+vhC X-Received: by 10.98.138.68 with SMTP id y65mr8633935pfd.110.1524210479593; Fri, 20 Apr 2018 00:47:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524210479; cv=none; d=google.com; s=arc-20160816; b=bc5N0I+Cc0lMB5Z4oeE2tUlVulAF4QfyigNFwa0W+XV47TZtujDMLz6CkBOZYMT3uM 0GMARCbUOCTNlloY/LXsk8kgASHyrKH+Zt1lgHNr8axCcy6a8/irl2Ye+gYKQSzeNv4+ THqi1JU5cPOkMbeR/d/x7OcuTJ0Va1sty9Cyd4iOhXxe6gLgmDjbE7/1QW3LMC26+I67 JIL8zRoaIHIRK5vAOxCBlg3v/8tucSVVGdsb0577OiBzOo5mNw52m6Kt4qTy26LnC3Zc 29PRxYWdJTFvY+3dQLIpO9cdo85w9Y+Ow8jPLxi0QfSeUEnTCNi9VYvE/8fBuRscW/Ut Hwuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :references:in-reply-to:date:cc:to:from:subject:message-id :arc-authentication-results; bh=IFrKYomEeNd/MOQptgGcUUx7PrGX6+UT3b89bGuMhf0=; b=UShczVmsm2I9FOSNZakRASkAVzWej5k6LKeI3w16Wti1h77OxGAVvzEn56VjiFiznT kwFKctI1OALUmNijiq79LfoZPGhRom/7zfUv4J0F706tfiBJtm1j5Nu/4uY2bBGXf3pX 0YLlVLUbAFuQOcGE3ny5SnS5MOarvWh5BUjX7Ka4LurTwa3hmiDdMKBrrEumqRpCnllS WM3HvsmfUGzg/4kGP57CcMrHzRKx4n2mHkkn9e+ihyExNDh5fOv4iYtqri2XqGnRVkp0 Y1vukK2atk1EYWnjpheYpH+WY570h4OmZQ2ENsbFcuhdVXxJgYJEAXKwzx06rnvEtj9l uHoQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r7-v6si5300737plo.486.2018.04.20.00.47.45; Fri, 20 Apr 2018 00:47:59 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754000AbeDTHqe (ORCPT + 99 others); Fri, 20 Apr 2018 03:46:34 -0400 Received: from Mailgw01.mediatek.com ([1.203.163.78]:31579 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1753620AbeDTHqc (ORCPT ); Fri, 20 Apr 2018 03:46:32 -0400 X-UUID: e41ed9a2e8364901b10c5eb53fdcc5c5-20180420 Received: from mtkcas32.mediatek.inc [(172.27.4.250)] by mailgw01.mediatek.com (envelope-from ) (mailgw01.mediatek.com ESMTP with TLS) with ESMTP id 256300589; Fri, 20 Apr 2018 15:46:26 +0800 Received: from MTKCAS36.mediatek.inc (172.27.4.186) by MTKMBS33DR.mediatek.inc (172.27.6.106) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Fri, 20 Apr 2018 15:46:25 +0800 Received: from [10.17.3.153] (10.17.3.153) by MTKCAS36.mediatek.inc (172.27.4.170) with Microsoft SMTP Server id 15.0.1210.3 via Frontend Transport; Fri, 20 Apr 2018 15:46:24 +0800 Message-ID: <1524210384.25162.1.camel@mhfsdcap03> Subject: Re: [PATCH 55/61] usb: mtu3: simplify getting .drvdata From: Chunfeng Yun To: Wolfram Sang CC: , , , Greg Kroah-Hartman , , , Date: Fri, 20 Apr 2018 15:46:24 +0800 In-Reply-To: <20180419140641.27926-56-wsa+renesas@sang-engineering.com> References: <20180419140641.27926-1-wsa+renesas@sang-engineering.com> <20180419140641.27926-56-wsa+renesas@sang-engineering.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.2.3-0ubuntu6 Content-Transfer-Encoding: 7bit MIME-Version: 1.0 X-MTK: N Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org hi, On Thu, 2018-04-19 at 16:06 +0200, Wolfram Sang wrote: > We should get drvdata from struct device directly. Going via > platform_device is an unneeded step back and forth. > > Signed-off-by: Wolfram Sang > --- > > Build tested only. buildbot is happy. Please apply individually. > > drivers/usb/mtu3/mtu3_plat.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/drivers/usb/mtu3/mtu3_plat.c b/drivers/usb/mtu3/mtu3_plat.c > index 628d5ce356ca..46551f6d16fd 100644 > --- a/drivers/usb/mtu3/mtu3_plat.c > +++ b/drivers/usb/mtu3/mtu3_plat.c > @@ -447,8 +447,7 @@ static int mtu3_remove(struct platform_device *pdev) > */ > static int __maybe_unused mtu3_suspend(struct device *dev) > { > - struct platform_device *pdev = to_platform_device(dev); > - struct ssusb_mtk *ssusb = platform_get_drvdata(pdev); > + struct ssusb_mtk *ssusb = dev_get_drvdata(dev); > > dev_dbg(dev, "%s\n", __func__); > > @@ -466,8 +465,7 @@ static int __maybe_unused mtu3_suspend(struct device *dev) > > static int __maybe_unused mtu3_resume(struct device *dev) > { > - struct platform_device *pdev = to_platform_device(dev); > - struct ssusb_mtk *ssusb = platform_get_drvdata(pdev); > + struct ssusb_mtk *ssusb = dev_get_drvdata(dev); > int ret; > > dev_dbg(dev, "%s\n", __func__); Acked-by: Chunfeng Yun Thanks