]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
spi: bcm2835: don't check resource with devm_ioremap_resource
authorWolfram Sang <wsa@the-dreams.de>
Tue, 23 Jul 2013 18:01:50 +0000 (20:01 +0200)
committerMark Brown <broonie@linaro.org>
Wed, 24 Jul 2013 14:23:15 +0000 (15:23 +0100)
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>
Signed-off-by: Mark Brown <broonie@linaro.org>
drivers/spi/spi-bcm2835.c

index a4185e492321b9261072d98226be0ddd5cd752c0..7604c52048627ecf47740d23ee4919a05fe1d0e6 100644 (file)
@@ -325,12 +325,6 @@ static int bcm2835_spi_probe(struct platform_device *pdev)
        init_completion(&bs->done);
 
        res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-       if (!res) {
-               dev_err(&pdev->dev, "could not get memory resource\n");
-               err = -ENODEV;
-               goto out_master_put;
-       }
-
        bs->regs = devm_ioremap_resource(&pdev->dev, res);
        if (IS_ERR(bs->regs)) {
                err = PTR_ERR(bs->regs);