* [PATCH v2 3/3] i2c: qup: Use devm_platform_ioremap_resource helper
@ 2019-09-17 17:22 Saiyam Doshi
0 siblings, 0 replies; only message in thread
From: Saiyam Doshi @ 2019-09-17 17:22 UTC (permalink / raw)
To: agross; +Cc: linux-arm-msm, linux-i2c, linux-kernel, markus.elfring
Simplify the implementation by using a known wrapper function.
Generated by: scripts/coccinelle/api/devm_platform_ioremap_resource.cocci
Signed-off-by: Saiyam Doshi <saiyamdoshi.in@gmail.com>
---
Changes in v2:
* Updated changelog.
drivers/i2c/busses/i2c-qup.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/i2c/busses/i2c-qup.c b/drivers/i2c/busses/i2c-qup.c
index ed09a59066b2..2c43ae22162c 100644
--- a/drivers/i2c/busses/i2c-qup.c
+++ b/drivers/i2c/busses/i2c-qup.c
@@ -1663,7 +1663,6 @@ static int qup_i2c_probe(struct platform_device *pdev)
static const int blk_sizes[] = {4, 16, 32};
struct qup_i2c_dev *qup;
unsigned long one_bit_t;
- struct resource *res;
u32 io_mode, hw_ver, size;
int ret, fs_div, hs_div;
u32 src_clk_freq = DEFAULT_SRC_CLK;
@@ -1760,8 +1759,7 @@ static int qup_i2c_probe(struct platform_device *pdev)
return -EINVAL;
}
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- qup->base = devm_ioremap_resource(qup->dev, res);
+ qup->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(qup->base))
return PTR_ERR(qup->base);
--
2.20.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2019-09-17 17:22 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-09-17 17:22 [PATCH v2 3/3] i2c: qup: Use devm_platform_ioremap_resource helper Saiyam Doshi
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.