diff options
author | Wolfram Sang <wsa@the-dreams.de> | 2013-05-10 10:16:54 +0200 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2013-06-12 20:39:06 +0200 |
commit | 3cc2d009bc210516c61536273b304c4f6ccd797c (patch) | |
tree | eb1dd301fbc62b9d33a027eb4e9c9f19dfacab81 /drivers/i2c/busses/i2c-rcar.c | |
parent | i2c: designware: prevent signals from aborting I2C transfers (diff) | |
download | linux-3cc2d009bc210516c61536273b304c4f6ccd797c.tar.xz linux-3cc2d009bc210516c61536273b304c4f6ccd797c.zip |
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-rcar.c')
-rw-r--r-- | drivers/i2c/busses/i2c-rcar.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/i2c/busses/i2c-rcar.c b/drivers/i2c/busses/i2c-rcar.c index 4ba4a95b6b26..0fc585861610 100644 --- a/drivers/i2c/busses/i2c-rcar.c +++ b/drivers/i2c/busses/i2c-rcar.c @@ -623,12 +623,6 @@ static int rcar_i2c_probe(struct platform_device *pdev) u32 bus_speed; int ret; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!res) { - dev_err(dev, "no mmio resources\n"); - return -ENODEV; - } - priv = devm_kzalloc(dev, sizeof(struct rcar_i2c_priv), GFP_KERNEL); if (!priv) { dev_err(dev, "no mem for private data\n"); @@ -642,6 +636,7 @@ static int rcar_i2c_probe(struct platform_device *pdev) if (ret < 0) return ret; + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); priv->io = devm_ioremap_resource(dev, res); if (IS_ERR(priv->io)) return PTR_ERR(priv->io); |