From patchwork Mon Sep 20 09:05:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 12504895 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=-15.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, UNWANTED_LANGUAGE_BODY,USER_AGENT_GIT autolearn=unavailable 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 A0EB5C433FE for ; Mon, 20 Sep 2021 09:07:56 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 68B0260FC0 for ; Mon, 20 Sep 2021 09:07:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 68B0260FC0 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=sang-engineering.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=w4DcL3/boOwUMtjdoTQH9cux0jb3G4CDz8mHE+8ctiI=; b=hHM4wL30pIqHEB VTdKFb57yCO5+cYtenK46zqH+AnXxr/Q39nzdin6xgnjJU3HlipGKI8unZkbXLIu9BAx0P1vOQaOP aboiZlUUFaS8VhoOE1vywZzCtKcNwK/91HggCyAvnoq/4vVzqzdqdkK2Jb2qf/NDHFNIdi9otzqnF eRSPHx4ZEPRWSzd2YURHlOWJzEFtF3YqC3AlcRMV05oOe7H1JTM2UU+z6sl53sN/GS8UeYdu7wBw6 Kn4MlzI2X83qRWSwngnzsTJw2lFwbTlu0gD+tNvgPWEvZD/pLGvjRF34mNmGK9MRJi7esgBRVlfvh 47p1kajlLqF+ymIp7QgQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mSFFQ-00120W-Ar; Mon, 20 Sep 2021 09:06:00 +0000 Received: from www.zeus03.de ([194.117.254.33] helo=mail.zeus03.de) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mSFEw-0011s7-WC for linux-arm-kernel@lists.infradead.org; Mon, 20 Sep 2021 09:05:34 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple; d=sang-engineering.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=k1; bh=v+d2EKH5Hm5rpn klW0GzaZ84yipAYJED4MgP1hNorRw=; b=ENT1r8KQ+FnFXriV0P7EoLlZR5qLmH 4EOYIViXe50IwSpt8xAZqjd/BTaHNLa2HBMyuczSsS5CrB6fR6SgiWtgbCpPPdDe uLB7SYVDrfMhxPNElI7Oa7CoAH33R8I5BsLwrEVeKLJ8MbAxrAMpg0g4p8wUekPo 1Q2x9yeDyWprg= Received: (qmail 2412559 invoked from network); 20 Sep 2021 11:05:23 +0200 Received: by mail.zeus03.de with ESMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 20 Sep 2021 11:05:23 +0200 X-UD-Smtp-Session: l3s3148p1@z9vIlGnMCIsgAwDPXwlxANIWpbLKE1Uh From: Wolfram Sang To: linux-kernel@vger.kernel.org Cc: linux-renesas-soc@vger.kernel.org, Wolfram Sang , Vinod Koul , Maxime Coquelin , Alexandre Torgue , dmaengine@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org Subject: [PATCH 1/9] dmaengine: stm32-dmamux: simplify getting .driver_data Date: Mon, 20 Sep 2021 11:05:13 +0200 Message-Id: <20210920090522.23784-2-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210920090522.23784-1-wsa+renesas@sang-engineering.com> References: <20210920090522.23784-1-wsa+renesas@sang-engineering.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210920_020531_360065_69587B90 X-CRM114-Status: GOOD ( 10.21 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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/dma/stm32-dmamux.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/drivers/dma/stm32-dmamux.c b/drivers/dma/stm32-dmamux.c index a42164389ebc..175f06749df6 100644 --- a/drivers/dma/stm32-dmamux.c +++ b/drivers/dma/stm32-dmamux.c @@ -305,8 +305,7 @@ static int stm32_dmamux_probe(struct platform_device *pdev) #ifdef CONFIG_PM static int stm32_dmamux_runtime_suspend(struct device *dev) { - struct platform_device *pdev = to_platform_device(dev); - struct stm32_dmamux_data *stm32_dmamux = platform_get_drvdata(pdev); + struct stm32_dmamux_data *stm32_dmamux = dev_get_drvdata(dev); clk_disable_unprepare(stm32_dmamux->clk); @@ -315,13 +314,12 @@ static int stm32_dmamux_runtime_suspend(struct device *dev) static int stm32_dmamux_runtime_resume(struct device *dev) { - struct platform_device *pdev = to_platform_device(dev); - struct stm32_dmamux_data *stm32_dmamux = platform_get_drvdata(pdev); + struct stm32_dmamux_data *stm32_dmamux = dev_get_drvdata(dev); int ret; ret = clk_prepare_enable(stm32_dmamux->clk); if (ret) { - dev_err(&pdev->dev, "failed to prepare_enable clock\n"); + dev_err(dev, "failed to prepare_enable clock\n"); return ret; } @@ -332,8 +330,7 @@ static int stm32_dmamux_runtime_resume(struct device *dev) #ifdef CONFIG_PM_SLEEP static int stm32_dmamux_suspend(struct device *dev) { - struct platform_device *pdev = to_platform_device(dev); - struct stm32_dmamux_data *stm32_dmamux = platform_get_drvdata(pdev); + struct stm32_dmamux_data *stm32_dmamux = dev_get_drvdata(dev); int i, ret; ret = pm_runtime_resume_and_get(dev); @@ -353,8 +350,7 @@ static int stm32_dmamux_suspend(struct device *dev) static int stm32_dmamux_resume(struct device *dev) { - struct platform_device *pdev = to_platform_device(dev); - struct stm32_dmamux_data *stm32_dmamux = platform_get_drvdata(pdev); + struct stm32_dmamux_data *stm32_dmamux = dev_get_drvdata(dev); int i, ret; ret = pm_runtime_force_resume(dev); From patchwork Mon Sep 20 09:05:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 12504891 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=-15.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, UNWANTED_LANGUAGE_BODY,USER_AGENT_GIT 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 CB7A5C433F5 for ; Mon, 20 Sep 2021 09:07:51 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9E5536109E for ; Mon, 20 Sep 2021 09:07:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 9E5536109E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=sang-engineering.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Lw8LpuE1nz0eNb1h3o8Uh0fXpJqlMaL4BttMCjHb9uM=; b=Hk1K0JZKVa4sSh 7Lpm6ItGdmBQ0+JwFPdinTBm2nm7qUvrlMocnMsEf0Ksq6iV/x9aHG1dV4g+K9gT1q6F0hfLkJcum IntUWMUtZv8bcVMN7kjLXbMFkGN1tnvSfCI76L3atTHiL8RiSwP3WiANwa5V4B6RERN26SBYK7i7L CExjmtRX6+26eYGKzmXNYaf52LOb2qBW9LB7obL1BLqqtY6qUfhbh7t2YULP5glXa2r2srF3m1eQu advtK1VXw7Pm++U1CCmM8yyC0sOtNo4/X9YLgbuCCYGAOrFYuUNBenQE5XU1e8L5Owc6J2yR/T0KX i6i3u0XQ9eaEiADCMtAA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mSFFE-0011vg-MH; Mon, 20 Sep 2021 09:05:48 +0000 Received: from www.zeus03.de ([194.117.254.33] helo=mail.zeus03.de) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mSFEy-0011sK-GS for linux-arm-kernel@lists.infradead.org; Mon, 20 Sep 2021 09:05:34 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple; d=sang-engineering.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=k1; bh=FMuJqDCHzK4uHq kYECDzhFJ9tjA5iJrkLQtxJNEYXpE=; b=M3AVwcQtfiGfOsawZxa6RwHbrXn9r2 iAUDVtMNqHHXFfUJtfGRkAMd0UzYu6PDSXzvERcwTiqISvjajEWY8jyRw7yHd13b QNEmAXzxn7xErxMPYbimcsnxv8I8h8srBTTqHHiL5iuFNdDkBevr5BL9TeUf/Ju8 tNEKcsR3TkWmI= Received: (qmail 2412611 invoked from network); 20 Sep 2021 11:05:24 +0200 Received: by mail.zeus03.de with ESMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 20 Sep 2021 11:05:24 +0200 X-UD-Smtp-Session: l3s3148p1@FeDQlGnMCosgAwDPXwlxANIWpbLKE1Uh From: Wolfram Sang To: linux-kernel@vger.kernel.org Cc: linux-renesas-soc@vger.kernel.org, Wolfram Sang , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org Subject: [PATCH 2/9] firmware: meson: simplify getting .driver_data Date: Mon, 20 Sep 2021 11:05:14 +0200 Message-Id: <20210920090522.23784-3-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210920090522.23784-1-wsa+renesas@sang-engineering.com> References: <20210920090522.23784-1-wsa+renesas@sang-engineering.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210920_020532_870302_78634743 X-CRM114-Status: UNSURE ( 9.05 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 Reviewed-by: Neil Armstrong --- Build tested only. buildbot is happy. drivers/firmware/meson/meson_sm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/firmware/meson/meson_sm.c b/drivers/firmware/meson/meson_sm.c index 77aa5c6398aa..714016e3aab3 100644 --- a/drivers/firmware/meson/meson_sm.c +++ b/drivers/firmware/meson/meson_sm.c @@ -240,12 +240,11 @@ EXPORT_SYMBOL_GPL(meson_sm_get); static ssize_t serial_show(struct device *dev, struct device_attribute *attr, char *buf) { - struct platform_device *pdev = to_platform_device(dev); struct meson_sm_firmware *fw; uint8_t *id_buf; int ret; - fw = platform_get_drvdata(pdev); + fw = dev_get_drvdata(dev); id_buf = kmalloc(SM_CHIP_ID_LENGTH, GFP_KERNEL); if (!id_buf) From patchwork Mon Sep 20 09:05:15 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 12504893 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=-18.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT 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 F27BFC433F5 for ; Mon, 20 Sep 2021 09:07:55 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C1AF760FC0 for ; Mon, 20 Sep 2021 09:07:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org C1AF760FC0 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=sang-engineering.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Qte0ltB3eYUlrRwBBjvbfuDsjNpiaJf/fJtX/jZ5jIg=; b=VD5qhPxFil2Kt0 XA67YP9zHCoa/rHyH+6vHqBLe7uqTvs7Y6ZMQ3picqwRAQKI3Rp1zgqa/cnN20ZlwAjEoxuLyKeTD lZWzoFZku5PvvQK9t6g9Bi74gVqEX7IsUFHXjwpfPg1zUdAhNEh2CIgKlVzVRwlejLlxFEvGrG+hG jlun6IJw0NlFJ7rsvkIf+3Izc29P6pIDqKunYvlYRiDbT7dOPiRPAy8cfum2MPMsyhrDavzylG96K hyRrXMpo+agSxCtwt68dn3wA9+VpBrbf+CiuEPATNXWYwDrMk0E/Ytl08rDwQxEji7OVBENVSTfkL BZRumwWRVGMP2etk8tnQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mSFFb-001242-6a; Mon, 20 Sep 2021 09:06:11 +0000 Received: from www.zeus03.de ([194.117.254.33] helo=mail.zeus03.de) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mSFF2-0011tx-OL for linux-arm-kernel@lists.infradead.org; Mon, 20 Sep 2021 09:05:38 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple; d=sang-engineering.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=k1; bh=BLeN3aWGvmhC6O T7d18ejB5diYjwZjYQYq05PqGUqXk=; b=AxanZlvKFbWYt0LlZfzjao09kXgYzl yy30P2Bfey4RoDaqY7/2Jm5wpzdC5zsxzDdA9KD+5UXepw6CMiA424XdMF8m5awq 7aYYpdxroaOen++2WBcT5sP7uDq7ucZbXmg8CCmk/KXaLi5MGLHYCF3ThDzRtiOe pE5btDya/RTpk= Received: (qmail 2412655 invoked from network); 20 Sep 2021 11:05:24 +0200 Received: by mail.zeus03.de with ESMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 20 Sep 2021 11:05:24 +0200 X-UD-Smtp-Session: l3s3148p1@37PYlGnMDIsgAwDPXwlxANIWpbLKE1Uh From: Wolfram Sang To: linux-kernel@vger.kernel.org Cc: linux-renesas-soc@vger.kernel.org, Wolfram Sang , Shubhrajyoti Datta , Srinivas Neeli , Michal Simek , Linus Walleij , Bartosz Golaszewski , linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 3/9] gpio: xilinx: simplify getting .driver_data Date: Mon, 20 Sep 2021 11:05:15 +0200 Message-Id: <20210920090522.23784-4-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210920090522.23784-1-wsa+renesas@sang-engineering.com> References: <20210920090522.23784-1-wsa+renesas@sang-engineering.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210920_020537_125628_F97E4C2A X-CRM114-Status: UNSURE ( 9.61 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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); } From patchwork Mon Sep 20 09:05:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 12504897 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=-18.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT 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 3287DC433F5 for ; Mon, 20 Sep 2021 09:08:13 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0690E608FB for ; Mon, 20 Sep 2021 09:08:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 0690E608FB Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=sang-engineering.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=fwHeEYnn3TjIuWbFYWh5+lTxkZLVnCiEBKddAn8dHS8=; b=qnwTncWbTLnJ7Y R90ZwOWrGKX0xVBuUC/kt6c5JPOvtOhqvVDbsqG0uUUVEXWoPeUcBlNxk0Wp1CJDUsEal3bw6O8fd HJFphJTdM3I5TFaD8w0GJ0OUY9gMn+eIwNBn79nGISwvCFz/bmpLpHeWZfibD0qpNFt1A0UVUA7yd XYmSh3sdAvBR0nkvMzQo2FHKJsb9aec7dWDMWGTV4csPaaGkiHRSIeoOp9ERSk/EMe6qekEQ/KJ2Z e0FY+9nXhPcpmeU/Wca9QjI1lfU4iZQdLKHxyHPEBdoDKDvcEX0szwr1l/wE96QRt2odNEQLN/5Qz Rs81FH7uuwDYincVBw+w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mSFFm-00127e-47; Mon, 20 Sep 2021 09:06:22 +0000 Received: from www.zeus03.de ([194.117.254.33] helo=mail.zeus03.de) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mSFFK-0011y3-Ko for linux-arm-kernel@lists.infradead.org; Mon, 20 Sep 2021 09:05:56 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple; d=sang-engineering.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=k1; bh=GnB9PaNYAVWoSF sgf1jz7+etGw0c6Zs8IYhl8WXWXSE=; b=b+nWIIMq23r6AsaJWdNuPhfv4+LZg3 gna6Yftspr/xvq6bIxktV26mcxPy+kpBtPeqsy9MJ8xvJVrz0HGhe3p2jl8zMyGJ pygO1YxAdc9SU3lI2XjszJehRIRvgjfJGWLsRHVHyl9KfC8kxPM+edMfZg6phmiO D2KOM3q7TS6OA= Received: (qmail 2412743 invoked from network); 20 Sep 2021 11:05:27 +0200 Received: by mail.zeus03.de with ESMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 20 Sep 2021 11:05:27 +0200 X-UD-Smtp-Session: l3s3148p1@uof8lGnMFIsgAwDPXwlxANIWpbLKE1Uh From: Wolfram Sang To: linux-kernel@vger.kernel.org Cc: linux-renesas-soc@vger.kernel.org, Wolfram Sang , Andrew Lunn , Heiner Kallweit , Russell King , "David S. Miller" , Jakub Kicinski , Ray Jui , Scott Branden , bcm-kernel-feedback-list@broadcom.com, netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 7/9] net: mdio: mdio-bcm-iproc: simplify getting .driver_data Date: Mon, 20 Sep 2021 11:05:19 +0200 Message-Id: <20210920090522.23784-8-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210920090522.23784-1-wsa+renesas@sang-engineering.com> References: <20210920090522.23784-1-wsa+renesas@sang-engineering.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210920_020555_020280_707B86D6 X-CRM114-Status: GOOD ( 11.16 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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/net/mdio/mdio-bcm-iproc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/mdio/mdio-bcm-iproc.c b/drivers/net/mdio/mdio-bcm-iproc.c index 77fc970cdfde..5666cfab15b9 100644 --- a/drivers/net/mdio/mdio-bcm-iproc.c +++ b/drivers/net/mdio/mdio-bcm-iproc.c @@ -181,8 +181,7 @@ static int iproc_mdio_remove(struct platform_device *pdev) #ifdef CONFIG_PM_SLEEP static int iproc_mdio_resume(struct device *dev) { - struct platform_device *pdev = to_platform_device(dev); - struct iproc_mdio_priv *priv = platform_get_drvdata(pdev); + struct iproc_mdio_priv *priv = dev_get_drvdata(dev); /* restore the mii clock configuration */ iproc_mdio_config_clk(priv->base);