diff options
Diffstat (limited to 'drivers/spi/spi-fsl-cpm.c')
-rw-r--r-- | drivers/spi/spi-fsl-cpm.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/spi/spi-fsl-cpm.c b/drivers/spi/spi-fsl-cpm.c index e967ac564761..858f0544289e 100644 --- a/drivers/spi/spi-fsl-cpm.c +++ b/drivers/spi/spi-fsl-cpm.c | |||
@@ -305,12 +305,10 @@ int fsl_spi_cpm_init(struct mpc8xxx_spi *mspi) | |||
305 | } | 305 | } |
306 | 306 | ||
307 | if (mspi->flags & SPI_CPM1) { | 307 | if (mspi->flags & SPI_CPM1) { |
308 | struct resource *res; | ||
309 | void *pram; | 308 | void *pram; |
310 | 309 | ||
311 | res = platform_get_resource(to_platform_device(dev), | 310 | pram = devm_platform_ioremap_resource(to_platform_device(dev), |
312 | IORESOURCE_MEM, 1); | 311 | 1); |
313 | pram = devm_ioremap_resource(dev, res); | ||
314 | if (IS_ERR(pram)) | 312 | if (IS_ERR(pram)) |
315 | mspi->pram = NULL; | 313 | mspi->pram = NULL; |
316 | else | 314 | else |