Skip to content

Commit

Permalink
spi/pxa2xx: fix compile warning in pxa2xx_spi_acpi_get_pdata()
Browse files Browse the repository at this point in the history
Commit cbfd6a2 (spi/pxa2xx: Convert to devm_ioremap_resource())
converted the driver to use devm_ioremap_resource(). However it causes
following warning to be emitted:

drivers/spi/spi-pxa2xx.c: In function ‘pxa2xx_spi_acpi_get_pdata’:
drivers/spi/spi-pxa2xx.c:1094:3: warning: return makes pointer from integer without a cast [enabled by default]

Fix this by returning NULL as it was done previously (error printing is
already done by devm_ioremap_resource()).

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Cc: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
  • Loading branch information
Mika Westerberg authored and Mark Brown committed May 13, 2013
1 parent f722406 commit 6dc81f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/spi/spi-pxa2xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -1091,7 +1091,7 @@ pxa2xx_spi_acpi_get_pdata(struct platform_device *pdev)
ssp->phys_base = res->start;
ssp->mmio_base = devm_ioremap_resource(&pdev->dev, res);
if (IS_ERR(ssp->mmio_base))
return PTR_ERR(ssp->mmio_base);
return NULL;

ssp->clk = devm_clk_get(&pdev->dev, NULL);
ssp->irq = platform_get_irq(pdev, 0);
Expand Down

0 comments on commit 6dc81f6

Please sign in to comment.