diff options
author | Wolfram Sang <wsa@the-dreams.de> | 2013-05-10 04:16:54 -0400 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2013-06-12 14:39:06 -0400 |
commit | 3cc2d009bc210516c61536273b304c4f6ccd797c (patch) | |
tree | eb1dd301fbc62b9d33a027eb4e9c9f19dfacab81 /drivers/i2c/busses/i2c-designware-platdrv.c | |
parent | e42dba569fceca5d59a88571370785e9ce9775b8 (diff) |
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-designware-platdrv.c')
-rw-r--r-- | drivers/i2c/busses/i2c-designware-platdrv.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/i2c/busses/i2c-designware-platdrv.c b/drivers/i2c/busses/i2c-designware-platdrv.c index 35b70a1edf57..ee46c92d7e3c 100644 --- a/drivers/i2c/busses/i2c-designware-platdrv.c +++ b/drivers/i2c/busses/i2c-designware-platdrv.c | |||
@@ -87,13 +87,6 @@ static int dw_i2c_probe(struct platform_device *pdev) | |||
87 | struct resource *mem; | 87 | struct resource *mem; |
88 | int irq, r; | 88 | int irq, r; |
89 | 89 | ||
90 | /* NOTE: driver uses the static register mapping */ | ||
91 | mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); | ||
92 | if (!mem) { | ||
93 | dev_err(&pdev->dev, "no mem resource?\n"); | ||
94 | return -EINVAL; | ||
95 | } | ||
96 | |||
97 | irq = platform_get_irq(pdev, 0); | 90 | irq = platform_get_irq(pdev, 0); |
98 | if (irq < 0) { | 91 | if (irq < 0) { |
99 | dev_err(&pdev->dev, "no irq resource?\n"); | 92 | dev_err(&pdev->dev, "no irq resource?\n"); |
@@ -104,6 +97,7 @@ static int dw_i2c_probe(struct platform_device *pdev) | |||
104 | if (!dev) | 97 | if (!dev) |
105 | return -ENOMEM; | 98 | return -ENOMEM; |
106 | 99 | ||
100 | mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); | ||
107 | dev->base = devm_ioremap_resource(&pdev->dev, mem); | 101 | dev->base = devm_ioremap_resource(&pdev->dev, mem); |
108 | if (IS_ERR(dev->base)) | 102 | if (IS_ERR(dev->base)) |
109 | return PTR_ERR(dev->base); | 103 | return PTR_ERR(dev->base); |