From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3049DECDE43 for ; Sun, 21 Oct 2018 21:19:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D582020836 for ; Sun, 21 Oct 2018 21:19:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D582020836 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728024AbeJVFfg (ORCPT ); Mon, 22 Oct 2018 01:35:36 -0400 Received: from mga06.intel.com ([134.134.136.31]:54845 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727009AbeJVFfg (ORCPT ); Mon, 22 Oct 2018 01:35:36 -0400 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Oct 2018 14:19:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,409,1534834800"; d="scan'208";a="90138190" Received: from smile.fi.intel.com (HELO smile) ([10.237.72.86]) by FMSMGA003.fm.intel.com with ESMTP; 21 Oct 2018 14:19:52 -0700 Received: from andy by smile with local (Exim 4.91) (envelope-from ) id 1gEL8Z-00030J-Q3; Mon, 22 Oct 2018 00:19:51 +0300 Date: Mon, 22 Oct 2018 00:19:51 +0300 From: Andy Shevchenko To: Wolfram Sang Cc: linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Mika Westerberg , Linus Walleij , linux-gpio@vger.kernel.org Subject: Re: [PATCH 1/5] pinctrl: intel: pinctrl-baytrail: simplify getting .driver_data Message-ID: <20181021211951.GM10650@smile.fi.intel.com> References: <20181021200032.1833-1-wsa+renesas@sang-engineering.com> <20181021200032.1833-2-wsa+renesas@sang-engineering.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181021200032.1833-2-wsa+renesas@sang-engineering.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Oct 21, 2018 at 10:00:27PM +0200, Wolfram Sang wrote: > We should get 'driver_data' from 'struct device' directly. Going via > platform_device is an unneeded step back and forth. > Thanks! I see only 3 out of 5 patches. Since we are about to establish a separate tree as well as an additional record in MAINTAINERS data base for Intel pinctrl driver, I ask you to resend only Intel related stuff in a separate series. > Signed-off-by: Wolfram Sang > --- > > Build tested only. buildbot is happy. > > drivers/pinctrl/intel/pinctrl-baytrail.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/drivers/pinctrl/intel/pinctrl-baytrail.c b/drivers/pinctrl/intel/pinctrl-baytrail.c > index 6d1a43c0c251..a1c2548123a1 100644 > --- a/drivers/pinctrl/intel/pinctrl-baytrail.c > +++ b/drivers/pinctrl/intel/pinctrl-baytrail.c > @@ -1838,8 +1838,7 @@ static int byt_pinctrl_probe(struct platform_device *pdev) > #ifdef CONFIG_PM_SLEEP > static int byt_gpio_suspend(struct device *dev) > { > - struct platform_device *pdev = to_platform_device(dev); > - struct byt_gpio *vg = platform_get_drvdata(pdev); > + struct byt_gpio *vg = dev_get_drvdata(dev); > int i; > > for (i = 0; i < vg->soc_data->npins; i++) { > @@ -1867,8 +1866,7 @@ static int byt_gpio_suspend(struct device *dev) > > static int byt_gpio_resume(struct device *dev) > { > - struct platform_device *pdev = to_platform_device(dev); > - struct byt_gpio *vg = platform_get_drvdata(pdev); > + struct byt_gpio *vg = dev_get_drvdata(dev); > int i; > > for (i = 0; i < vg->soc_data->npins; i++) { > -- > 2.19.0 > -- With Best Regards, Andy Shevchenko