From: Marc Kleine-Budde <mkl@pengutronix.de>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, kuba@kernel.org, linux-can@vger.kernel.org,
kernel@pengutronix.de, Yang Li <yang.lee@linux.alibaba.com>,
Alexander Lobakin <aleksander.lobakin@intel.com>,
Pavel Pisa <pisa@cmp.felk.cvut.cz>,
Marc Kleine-Budde <mkl@pengutronix.de>
Subject: [PATCH net-next 1/4] can: ctucanfd: ctucan_platform_probe(): use devm_platform_ioremap_resource()
Date: Fri, 17 Feb 2023 15:10:26 +0100 [thread overview]
Message-ID: <20230217141029.3734802-2-mkl@pengutronix.de> (raw)
In-Reply-To: <20230217141029.3734802-1-mkl@pengutronix.de>
From: Yang Li <yang.lee@linux.alibaba.com>
Convert platform_get_resource(), devm_ioremap_resource() to a single
call to Use devm_platform_ioremap_resource(), as this is exactly what
this function does.
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
Reviewed-by: Alexander Lobakin <aleksander.lobakin@intel.com>
Acked-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
Link: https://lore.kernel.org/all/20230216090610.130860-1-yang.lee@linux.alibaba.com
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
drivers/net/can/ctucanfd/ctucanfd_platform.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/net/can/ctucanfd/ctucanfd_platform.c b/drivers/net/can/ctucanfd/ctucanfd_platform.c
index f83684f006ea..a17561d97192 100644
--- a/drivers/net/can/ctucanfd/ctucanfd_platform.c
+++ b/drivers/net/can/ctucanfd/ctucanfd_platform.c
@@ -47,7 +47,6 @@ static void ctucan_platform_set_drvdata(struct device *dev,
*/
static int ctucan_platform_probe(struct platform_device *pdev)
{
- struct resource *res; /* IO mem resources */
struct device *dev = &pdev->dev;
void __iomem *addr;
int ret;
@@ -55,8 +54,7 @@ static int ctucan_platform_probe(struct platform_device *pdev)
int irq;
/* Get the virtual base address for the device */
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- addr = devm_ioremap_resource(dev, res);
+ addr = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(addr)) {
ret = PTR_ERR(addr);
goto err;
base-commit: 40967f77dfa9fa728b7f36a5d2eb432f39de185c
--
2.39.1
next prev parent reply other threads:[~2023-02-17 14:10 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-17 14:10 [PATCH net-next 0/4] pull-request: can-next 2023-02-17 - fixed Marc Kleine-Budde
2023-02-17 14:10 ` Marc Kleine-Budde [this message]
2023-02-17 14:10 ` [PATCH net-next 2/4] can: esd_usb: Move mislocated storage of SJA1000_ECC_SEG bits in case of a bus error Marc Kleine-Budde
2023-02-17 14:10 ` [PATCH net-next 3/4] can: esd_usb: Make use of can_change_state() and relocate checking skb for NULL Marc Kleine-Budde
2023-02-17 14:10 ` [PATCH net-next 4/4] can: esd_usb: Improve readability on decoding ESD_EV_CAN_ERROR_EXT messages Marc Kleine-Budde
2023-02-20 23:32 ` [PATCH net-next 0/4] pull-request: can-next 2023-02-17 - fixed Jakub Kicinski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230217141029.3734802-2-mkl@pengutronix.de \
--to=mkl@pengutronix.de \
--cc=aleksander.lobakin@intel.com \
--cc=davem@davemloft.net \
--cc=kernel@pengutronix.de \
--cc=kuba@kernel.org \
--cc=linux-can@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pisa@cmp.felk.cvut.cz \
--cc=yang.lee@linux.alibaba.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).