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-davinci.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-davinci.c')
-rw-r--r-- | drivers/i2c/busses/i2c-davinci.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/i2c/busses/i2c-davinci.c b/drivers/i2c/busses/i2c-davinci.c index cf20e06a88e1..fa556057d224 100644 --- a/drivers/i2c/busses/i2c-davinci.c +++ b/drivers/i2c/busses/i2c-davinci.c | |||
@@ -646,13 +646,6 @@ static int davinci_i2c_probe(struct platform_device *pdev) | |||
646 | struct resource *mem, *irq; | 646 | struct resource *mem, *irq; |
647 | int r; | 647 | int r; |
648 | 648 | ||
649 | /* NOTE: driver uses the static register mapping */ | ||
650 | mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); | ||
651 | if (!mem) { | ||
652 | dev_err(&pdev->dev, "no mem resource?\n"); | ||
653 | return -ENODEV; | ||
654 | } | ||
655 | |||
656 | irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0); | 649 | irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0); |
657 | if (!irq) { | 650 | if (!irq) { |
658 | dev_err(&pdev->dev, "no irq resource?\n"); | 651 | dev_err(&pdev->dev, "no irq resource?\n"); |
@@ -697,6 +690,7 @@ static int davinci_i2c_probe(struct platform_device *pdev) | |||
697 | return -ENODEV; | 690 | return -ENODEV; |
698 | clk_prepare_enable(dev->clk); | 691 | clk_prepare_enable(dev->clk); |
699 | 692 | ||
693 | mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); | ||
700 | dev->base = devm_ioremap_resource(&pdev->dev, mem); | 694 | dev->base = devm_ioremap_resource(&pdev->dev, mem); |
701 | if (IS_ERR(dev->base)) { | 695 | if (IS_ERR(dev->base)) { |
702 | r = PTR_ERR(dev->base); | 696 | r = PTR_ERR(dev->base); |