summaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-altera.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/spi/spi-altera.c')
-rw-r--r--drivers/spi/spi-altera.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/spi/spi-altera.c b/drivers/spi/spi-altera.c
index ea160f117f88..41d71ba7fd32 100644
--- a/drivers/spi/spi-altera.c
+++ b/drivers/spi/spi-altera.c
@@ -170,7 +170,6 @@ static int altera_spi_probe(struct platform_device *pdev)
170{ 170{
171 struct altera_spi *hw; 171 struct altera_spi *hw;
172 struct spi_master *master; 172 struct spi_master *master;
173 struct resource *res;
174 int err = -ENODEV; 173 int err = -ENODEV;
175 174
176 master = spi_alloc_master(&pdev->dev, sizeof(struct altera_spi)); 175 master = spi_alloc_master(&pdev->dev, sizeof(struct altera_spi));
@@ -189,8 +188,7 @@ static int altera_spi_probe(struct platform_device *pdev)
189 hw = spi_master_get_devdata(master); 188 hw = spi_master_get_devdata(master);
190 189
191 /* find and map our resources */ 190 /* find and map our resources */
192 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 191 hw->base = devm_platform_ioremap_resource(pdev, 0);
193 hw->base = devm_ioremap_resource(&pdev->dev, res);
194 if (IS_ERR(hw->base)) { 192 if (IS_ERR(hw->base)) {
195 err = PTR_ERR(hw->base); 193 err = PTR_ERR(hw->base);
196 goto exit; 194 goto exit;