Received: by 10.192.165.156 with SMTP id m28csp760954imm; Thu, 19 Apr 2018 07:10:10 -0700 (PDT) X-Google-Smtp-Source: AIpwx48lgU12a9TBpuCnOHelKt3JB9kOicyiXh5+hkOnJ4ebya3ykIxVqwRhbx+BZG8GEWFBkfpY X-Received: by 2002:a17:902:a8:: with SMTP id a37-v6mr4504562pla.238.1524147010442; Thu, 19 Apr 2018 07:10:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524147010; cv=none; d=google.com; s=arc-20160816; b=e2COXQF8tmN705h2R2qcZ7p4ltCe2OrGKCKgISqnTV9ajzcbh1A85Sb1gDDyjb9a5V yCQuOdLrsVy7QPphUQAo8hDok+WmKiwpVjh6sWCb7jddmpYN3/gp+9UYlxO7ZJdp5K+M 2ggqQ6gETT3OtaFLTX7xqUcaATV3T2tswYF/2zlNEuM6SYsfFStG9accG5xeviIC/aqa 6gfqzxNQFxo9ZFjVmU+rnZsTf6ND374fvwVHBo856Ec74ru7Oc8YIpl9BGpJ8h8kccWv 1KTcO1jsIMtkXpAYyw+wJepdZl/xvS3SpJjNYAizyaL8z1+Ur3QzNqONMbE2PPfeVHj2 zfDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=k9Z5KrUtJf2RQqKVodElAyrar2dIra9L/R1+KoUynME=; b=ZA7XvyiwNxp3UMiQ3SQQVhsIvO77M1tAYqur8C2yyxlzfFsSObhdOF4XhhlZ6mR5F5 E8hb781CrJJVQtLDPgUiyQxt/dJwSV0Dw9C410RlG0XrDkvRdYtkiv4xZ/bbDxvmapA0 Oh/PFUQsWiXyzRYVc+OY2erZsbEkYebYNeKlkEzZ88Ns5EdBHXPu5phEWGAiA3yZ1tC5 IdhFoYc4byzAc3BiA5Ee+uqIc+H7en/ZdH6IIOiCl2ib4S21Kq2i9wlxoVxFu+1CGt7Y qY1lDTfv3bmZH+45klysKSNxsbGi3Xks/MirrDRyBjBcvoPznXpG0VvXc2sMFzyth2Kg gILg== 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 79si3075476pga.440.2018.04.19.07.09.55; Thu, 19 Apr 2018 07:10:10 -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 S1753597AbeDSOHS (ORCPT + 99 others); Thu, 19 Apr 2018 10:07:18 -0400 Received: from sauhun.de ([88.99.104.3]:45342 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753375AbeDSOHO (ORCPT ); Thu, 19 Apr 2018 10:07:14 -0400 Received: from localhost (unknown [145.253.130.2]) by pokefinder.org (Postfix) with ESMTPSA id 3DE293139DC; Thu, 19 Apr 2018 16:07:13 +0200 (CEST) From: Wolfram Sang To: linux-kernel@vger.kernel.org Cc: linux-renesas-soc@vger.kernel.org, kernel-janitors@vger.kernel.org, Wolfram Sang , Chunfeng Yun , Greg Kroah-Hartman , linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: [PATCH 55/61] usb: mtu3: simplify getting .drvdata Date: Thu, 19 Apr 2018 16:06:25 +0200 Message-Id: <20180419140641.27926-56-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180419140641.27926-1-wsa+renesas@sang-engineering.com> References: <20180419140641.27926-1-wsa+renesas@sang-engineering.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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__); -- 2.11.0