* [PATCH] i2c: omap: use devm_platform_ioremap_resource()
@ 2020-02-15 8:36 qiwuchen55
2020-02-17 8:13 ` Luca Ceresoli
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: qiwuchen55 @ 2020-02-15 8:36 UTC (permalink / raw)
To: vigneshr, tony, aaro.koskinen; +Cc: linux-omap, linux-i2c, chenqiwu
From: chenqiwu <chenqiwu@xiaomi.com>
Use a new API devm_platform_ioremap_resource() to simplify code.
Signed-off-by: chenqiwu <chenqiwu@xiaomi.com>
---
drivers/i2c/busses/i2c-omap.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
index 2dfea35..47d994a 100644
--- a/drivers/i2c/busses/i2c-omap.c
+++ b/drivers/i2c/busses/i2c-omap.c
@@ -1355,7 +1355,6 @@ static void omap_i2c_unprepare_recovery(struct i2c_adapter *adap)
{
struct omap_i2c_dev *omap;
struct i2c_adapter *adap;
- struct resource *mem;
const struct omap_i2c_bus_platform_data *pdata =
dev_get_platdata(&pdev->dev);
struct device_node *node = pdev->dev.of_node;
@@ -1375,8 +1374,7 @@ static void omap_i2c_unprepare_recovery(struct i2c_adapter *adap)
if (!omap)
return -ENOMEM;
- mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- omap->base = devm_ioremap_resource(&pdev->dev, mem);
+ omap->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(omap->base))
return PTR_ERR(omap->base);
--
1.9.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] i2c: omap: use devm_platform_ioremap_resource()
2020-02-15 8:36 [PATCH] i2c: omap: use devm_platform_ioremap_resource() qiwuchen55
@ 2020-02-17 8:13 ` Luca Ceresoli
2020-02-18 5:58 ` Vignesh Raghavendra
2020-03-10 9:51 ` Wolfram Sang
2 siblings, 0 replies; 4+ messages in thread
From: Luca Ceresoli @ 2020-02-17 8:13 UTC (permalink / raw)
To: qiwuchen55, vigneshr, tony, aaro.koskinen; +Cc: linux-omap, linux-i2c, chenqiwu
Hi,
On 15/02/20 09:36, qiwuchen55@gmail.com wrote:
> From: chenqiwu <chenqiwu@xiaomi.com>
>
> Use a new API devm_platform_ioremap_resource() to simplify code.
>
> Signed-off-by: chenqiwu <chenqiwu@xiaomi.com>
Tested-by: Luca Ceresoli <luca@lucaceresoli.net>
Reviewed-by: Luca Ceresoli <luca@lucaceresoli.net>
--
Luca
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] i2c: omap: use devm_platform_ioremap_resource()
2020-02-15 8:36 [PATCH] i2c: omap: use devm_platform_ioremap_resource() qiwuchen55
2020-02-17 8:13 ` Luca Ceresoli
@ 2020-02-18 5:58 ` Vignesh Raghavendra
2020-03-10 9:51 ` Wolfram Sang
2 siblings, 0 replies; 4+ messages in thread
From: Vignesh Raghavendra @ 2020-02-18 5:58 UTC (permalink / raw)
To: qiwuchen55, tony, aaro.koskinen; +Cc: linux-omap, linux-i2c, chenqiwu
On 15/02/20 2:06 pm, qiwuchen55@gmail.com wrote:
> From: chenqiwu <chenqiwu@xiaomi.com>
>
> Use a new API devm_platform_ioremap_resource() to simplify code.
>
> Signed-off-by: chenqiwu <chenqiwu@xiaomi.com>
> ---
Reviewed-by: Vignesh Raghavendra <vigneshr@ti.com>
> drivers/i2c/busses/i2c-omap.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
> index 2dfea35..47d994a 100644
> --- a/drivers/i2c/busses/i2c-omap.c
> +++ b/drivers/i2c/busses/i2c-omap.c
> @@ -1355,7 +1355,6 @@ static void omap_i2c_unprepare_recovery(struct i2c_adapter *adap)
> {
> struct omap_i2c_dev *omap;
> struct i2c_adapter *adap;
> - struct resource *mem;
> const struct omap_i2c_bus_platform_data *pdata =
> dev_get_platdata(&pdev->dev);
> struct device_node *node = pdev->dev.of_node;
> @@ -1375,8 +1374,7 @@ static void omap_i2c_unprepare_recovery(struct i2c_adapter *adap)
> if (!omap)
> return -ENOMEM;
>
> - mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> - omap->base = devm_ioremap_resource(&pdev->dev, mem);
> + omap->base = devm_platform_ioremap_resource(pdev, 0);
> if (IS_ERR(omap->base))
> return PTR_ERR(omap->base);
>
>
--
Regards
Vignesh
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] i2c: omap: use devm_platform_ioremap_resource()
2020-02-15 8:36 [PATCH] i2c: omap: use devm_platform_ioremap_resource() qiwuchen55
2020-02-17 8:13 ` Luca Ceresoli
2020-02-18 5:58 ` Vignesh Raghavendra
@ 2020-03-10 9:51 ` Wolfram Sang
2 siblings, 0 replies; 4+ messages in thread
From: Wolfram Sang @ 2020-03-10 9:51 UTC (permalink / raw)
To: qiwuchen55; +Cc: vigneshr, tony, aaro.koskinen, linux-omap, linux-i2c, chenqiwu
[-- Attachment #1: Type: text/plain, Size: 270 bytes --]
On Sat, Feb 15, 2020 at 04:36:43PM +0800, qiwuchen55@gmail.com wrote:
> From: chenqiwu <chenqiwu@xiaomi.com>
>
> Use a new API devm_platform_ioremap_resource() to simplify code.
>
> Signed-off-by: chenqiwu <chenqiwu@xiaomi.com>
Applied to for-next, thanks!
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-03-10 9:51 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-15 8:36 [PATCH] i2c: omap: use devm_platform_ioremap_resource() qiwuchen55
2020-02-17 8:13 ` Luca Ceresoli
2020-02-18 5:58 ` Vignesh Raghavendra
2020-03-10 9:51 ` 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).