struct device *dev = &pdev->dev;
struct spi_master *master;
struct amd_spi *amd_spi;
struct device *dev = &pdev->dev;
struct spi_master *master;
struct amd_spi *amd_spi;
int err = 0;
/* Allocate storage for spi_master and driver private data */
int err = 0;
/* Allocate storage for spi_master and driver private data */
}
amd_spi = spi_master_get_devdata(master);
}
amd_spi = spi_master_get_devdata(master);
-
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- amd_spi->io_remap_addr = devm_ioremap_resource(&pdev->dev, res);
+ amd_spi->io_remap_addr = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(amd_spi->io_remap_addr)) {
err = PTR_ERR(amd_spi->io_remap_addr);
dev_err(dev, "error %d ioremap of SPI registers failed\n", err);
if (IS_ERR(amd_spi->io_remap_addr)) {
err = PTR_ERR(amd_spi->io_remap_addr);
dev_err(dev, "error %d ioremap of SPI registers failed\n", err);