* [PATCH] i2c: bcm2835: Use devm_platform_get_and_ioremap_resource()
@ 2023-01-19 9:18 ye.xingchen
2023-01-19 19:10 ` Florian Fainelli
2023-01-20 9:30 ` Wolfram Sang
0 siblings, 2 replies; 3+ messages in thread
From: ye.xingchen @ 2023-01-19 9:18 UTC (permalink / raw)
To: wsa
Cc: f.fainelli, rjui, sbranden, bcm-kernel-feedback-list,
stefan.wahren, eric, christophe.jaillet, linux-i2c,
linux-rpi-kernel, linux-arm-kernel, linux-kernel
From: ye xingchen <ye.xingchen@zte.com.cn>
Convert platform_get_resource(), devm_ioremap_resource() to a single
call to devm_platform_get_and_ioremap_resource(), as this is exactly
what this function does.
Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
---
drivers/i2c/busses/i2c-bcm2835.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/i2c/busses/i2c-bcm2835.c b/drivers/i2c/busses/i2c-bcm2835.c
index f72c6576d8a3..09a077b31bfe 100644
--- a/drivers/i2c/busses/i2c-bcm2835.c
+++ b/drivers/i2c/busses/i2c-bcm2835.c
@@ -407,7 +407,6 @@ static const struct i2c_adapter_quirks bcm2835_i2c_quirks = {
static int bcm2835_i2c_probe(struct platform_device *pdev)
{
struct bcm2835_i2c_dev *i2c_dev;
- struct resource *mem;
int ret;
struct i2c_adapter *adap;
struct clk *mclk;
@@ -420,8 +419,7 @@ static int bcm2835_i2c_probe(struct platform_device *pdev)
i2c_dev->dev = &pdev->dev;
init_completion(&i2c_dev->completion);
- mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- i2c_dev->regs = devm_ioremap_resource(&pdev->dev, mem);
+ i2c_dev->regs = devm_platform_get_and_ioremap_resource(pdev, 0, NULL);
if (IS_ERR(i2c_dev->regs))
return PTR_ERR(i2c_dev->regs);
--
2.25.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] i2c: bcm2835: Use devm_platform_get_and_ioremap_resource()
2023-01-19 9:18 [PATCH] i2c: bcm2835: Use devm_platform_get_and_ioremap_resource() ye.xingchen
@ 2023-01-19 19:10 ` Florian Fainelli
2023-01-20 9:30 ` Wolfram Sang
1 sibling, 0 replies; 3+ messages in thread
From: Florian Fainelli @ 2023-01-19 19:10 UTC (permalink / raw)
To: ye.xingchen, wsa
Cc: rjui, sbranden, bcm-kernel-feedback-list, stefan.wahren, eric,
christophe.jaillet, linux-i2c, linux-rpi-kernel, linux-arm-kernel,
linux-kernel
On 1/19/23 01:18, ye.xingchen@zte.com.cn wrote:
> From: ye xingchen <ye.xingchen@zte.com.cn>
>
> Convert platform_get_resource(), devm_ioremap_resource() to a single
> call to devm_platform_get_and_ioremap_resource(), as this is exactly
> what this function does.
>
> Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
--
Florian
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] i2c: bcm2835: Use devm_platform_get_and_ioremap_resource()
2023-01-19 9:18 [PATCH] i2c: bcm2835: Use devm_platform_get_and_ioremap_resource() ye.xingchen
2023-01-19 19:10 ` Florian Fainelli
@ 2023-01-20 9:30 ` Wolfram Sang
1 sibling, 0 replies; 3+ messages in thread
From: Wolfram Sang @ 2023-01-20 9:30 UTC (permalink / raw)
To: ye.xingchen
Cc: f.fainelli, rjui, sbranden, bcm-kernel-feedback-list,
stefan.wahren, eric, christophe.jaillet, linux-i2c,
linux-rpi-kernel, linux-arm-kernel, linux-kernel
[-- Attachment #1.1: Type: text/plain, Size: 388 bytes --]
On Thu, Jan 19, 2023 at 05:18:47PM +0800, ye.xingchen@zte.com.cn wrote:
> From: ye xingchen <ye.xingchen@zte.com.cn>
>
> Convert platform_get_resource(), devm_ioremap_resource() to a single
> call to devm_platform_get_and_ioremap_resource(), as this is exactly
> what this function does.
>
> Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
Applied to for-next, thanks!
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
[-- Attachment #2: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-01-20 9:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-19 9:18 [PATCH] i2c: bcm2835: Use devm_platform_get_and_ioremap_resource() ye.xingchen
2023-01-19 19:10 ` Florian Fainelli
2023-01-20 9:30 ` Wolfram Sang
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).