Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp314665pxb; Wed, 22 Sep 2021 02:51:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy+MqhglibkwOEXQDAS7VgfeJmojCgAHQ5RwdQ3x6W+KS09pSw/qVB2eprKORGwApC1DRmC X-Received: by 2002:a05:6e02:1b03:: with SMTP id i3mr6254573ilv.251.1632304264599; Wed, 22 Sep 2021 02:51:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632304264; cv=none; d=google.com; s=arc-20160816; b=MDOl3vVorZyLIGzz2cNeOLFKrudQ7DO6jGH13Q/tVpgnvZ9hiuL/1mqFtChLD9yJDK sgXERhlfYCcQhuaeH1QguLCO5AAsXFruGce30IovRpOSvWkYpSA4V+dnXSaGcuypakNh UpNq9Uy32YvECVgEUMMhvApFSVE2jHgxR4ZHilF0BA6AZze31iMvDS7cafqmlZSytb6h +iN9QpqZvodNiyGT6l2SyYH3NkdnoTyie9s1Yx9I9V0N5tM0DwdNRjKiBl8YLW2EM/Ij aL9DvlbUMS6M4aehYlpcasoae6wk2HNXB+LNsaQQq5YO4kC/G3o10a4VB9STUA693d7U 4nGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=3TNELiqg8mYuBEOOX1lFmtUFpNCtQ0aR3VKdc/pWD04=; b=gbLKtS9OUfVenG9NaHWzRfrBqrAlphepq1/AxDUla56TOdWIscveXi7PosAd1RUyXc 6roRuV/rE1QLHUMrTJ+KKZC9nqB8fmtrFS09sJtilFiTkwQ7UYexhx9xUInFptxspvNR 1XyGPLX9qrPIXWoqFiX5TiQZOIa3EyrdSshRmmi2ce0sVcxJLuwgbjTuTO2GMFcYmGGX dk/ltlmXU0r8/hzdhNw1OXqK7pDCXydzWzg3qTysO2VtVpFE2WDnK9RpOVEV6ONRic35 8NKYSa5I7YyqE09R2a5yP6h8DQgAl1oXK7pTHcQIcXXJyvGq/FJhJ0/ER1xP/00ZT69w wSIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b=txqDOfjs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a9si1896084ilt.69.2021.09.22.02.50.52; Wed, 22 Sep 2021 02:51:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b=txqDOfjs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234233AbhIVJuW (ORCPT + 99 others); Wed, 22 Sep 2021 05:50:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47074 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234418AbhIVJuV (ORCPT ); Wed, 22 Sep 2021 05:50:21 -0400 Received: from mail-qk1-x729.google.com (mail-qk1-x729.google.com [IPv6:2607:f8b0:4864:20::729]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 81126C061756 for ; Wed, 22 Sep 2021 02:48:51 -0700 (PDT) Received: by mail-qk1-x729.google.com with SMTP id 72so7553632qkk.7 for ; Wed, 22 Sep 2021 02:48:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=3TNELiqg8mYuBEOOX1lFmtUFpNCtQ0aR3VKdc/pWD04=; b=txqDOfjsDTHdigncyRvnvPrZ9nafFGNC0Iurpw5yLidixM5bL3qITG9HtYWnUpIHwu S2VB88buG67cq4EJkar55oCyNYCqGt6rbSBWsRVGNu+eSYOL6bA1vhJEd+2fT2bJzYzI vlvIJo02xDM4cSuB/NZWLkX4VuK8cxsAk7js7FzjnbN8XEDvAmHGwXq0XYKzZPgEFXnh wkkLGojxJ6hh84tGJst0ksVz44AVZNlGmxJ2N/ikKC37g1EnGNsCfEW2JhN5ih9XXBh8 e6GEZtgYvviOy8Z8L7C8EWyWSnNtte3qObuZ8RMvPejN5mdHFs1O7T/oMytMSqu+jk4X dQPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=3TNELiqg8mYuBEOOX1lFmtUFpNCtQ0aR3VKdc/pWD04=; b=X2jvg/8vD+LRGeuWNiBuNtP+kwPjqU2BDrt2LHQ6WD97bKXRG+/LWZaDtk95Tn+kyS xpdKS6xi/f+ijEHd9sYv4LQlnc1g2ikDi1ADfnmeinQCgoEhfucwx0XKJQhorZp8KfSo 3NrtwKvnHZPFbUoAtQV8FCmCgoEBExq0WTRuw51TEUrA7G8QcaYiVZF8NzE0gRxKXweh ofCdjimJ7W8nRuiAA1OyjRt3Gs15Dp8zB4b8sJx60KSAswERnIfeYB0KVVq+64+z3NAz j+uzOFRzejMe4pTI9YB6vzL3vmTBEy0NSixGbX0xiLcj0YrFz9IyFey5iNElVeJDzbmz +t/g== X-Gm-Message-State: AOAM531yeQcEyF0b37N3xyVDss8YqIQ2wRgKGDLVs8e6eLZB9wszJimI vYqeDWGuxNGaew9qwTT8gwkY755qVldwNNItX7wUZnQDDCI= X-Received: by 2002:a25:7146:: with SMTP id m67mr43675807ybc.353.1632304130711; Wed, 22 Sep 2021 02:48:50 -0700 (PDT) MIME-Version: 1.0 References: <20210920090522.23784-1-wsa+renesas@sang-engineering.com> <20210920090522.23784-4-wsa+renesas@sang-engineering.com> In-Reply-To: <20210920090522.23784-4-wsa+renesas@sang-engineering.com> From: Bartosz Golaszewski Date: Wed, 22 Sep 2021 11:48:40 +0200 Message-ID: Subject: Re: [PATCH 3/9] gpio: xilinx: simplify getting .driver_data To: Wolfram Sang Cc: LKML , Linux-Renesas , Shubhrajyoti Datta , Srinivas Neeli , Michal Simek , Linus Walleij , linux-gpio , arm-soc Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 20, 2021 at 11:05 AM Wolfram Sang wrote: > > We should get 'driver_data' 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. > > drivers/gpio/gpio-xilinx.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/drivers/gpio/gpio-xilinx.c b/drivers/gpio/gpio-xilinx.c > index a1b66338d077..b6d3a57e27ed 100644 > --- a/drivers/gpio/gpio-xilinx.c > +++ b/drivers/gpio/gpio-xilinx.c > @@ -371,8 +371,7 @@ static int __maybe_unused xgpio_resume(struct device *dev) > > static int __maybe_unused xgpio_runtime_suspend(struct device *dev) > { > - struct platform_device *pdev = to_platform_device(dev); > - struct xgpio_instance *gpio = platform_get_drvdata(pdev); > + struct xgpio_instance *gpio = dev_get_drvdata(dev); > > clk_disable(gpio->clk); > > @@ -381,8 +380,7 @@ static int __maybe_unused xgpio_runtime_suspend(struct device *dev) > > static int __maybe_unused xgpio_runtime_resume(struct device *dev) > { > - struct platform_device *pdev = to_platform_device(dev); > - struct xgpio_instance *gpio = platform_get_drvdata(pdev); > + struct xgpio_instance *gpio = dev_get_drvdata(dev); > > return clk_enable(gpio->clk); > } > -- > 2.30.2 > Applied, thanks! Bart