summaryrefslogtreecommitdiff
path: root/drivers/i2c/busses/i2c-omap.c
diff options
context:
space:
mode:
authorWolfram Sang <wsa@the-dreams.de>2013-05-10 12:16:54 +0400
committerWolfram Sang <wsa@the-dreams.de>2013-06-12 22:39:06 +0400
commit3cc2d009bc210516c61536273b304c4f6ccd797c (patch)
treeeb1dd301fbc62b9d33a027eb4e9c9f19dfacab81 /drivers/i2c/busses/i2c-omap.c
parente42dba569fceca5d59a88571370785e9ce9775b8 (diff)
downloadlinux-3cc2d009bc210516c61536273b304c4f6ccd797c.tar.xz
drivers/i2c/busses: don't check resource with devm_ioremap_resource
devm_ioremap_resource does sanity checks on the given resource. No need to duplicate this in the driver. Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'drivers/i2c/busses/i2c-omap.c')
-rw-r--r--drivers/i2c/busses/i2c-omap.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
index e02f9e36a7b2..352f3c38d1f7 100644
--- a/drivers/i2c/busses/i2c-omap.c
+++ b/drivers/i2c/busses/i2c-omap.c
@@ -1084,13 +1084,6 @@ omap_i2c_probe(struct platform_device *pdev)
u32 rev;
u16 minor, major, scheme;
- /* NOTE: driver uses the static register mapping */
- mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- if (!mem) {
- dev_err(&pdev->dev, "no mem resource?\n");
- return -ENODEV;
- }
-
irq = platform_get_irq(pdev, 0);
if (irq < 0) {
dev_err(&pdev->dev, "no irq resource?\n");
@@ -1103,6 +1096,7 @@ omap_i2c_probe(struct platform_device *pdev)
return -ENOMEM;
}
+ mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
dev->base = devm_ioremap_resource(&pdev->dev, mem);
if (IS_ERR(dev->base))
return PTR_ERR(dev->base);