/* bitbang has to be first */
struct spi_bitbang bitbang;
struct completion done;
- struct resource mem; /* phys mem */
void __iomem *regs; /* virt. address of the control registers */
u32 irq;
{
struct xilinx_spi *xspi;
struct xspi_platform_data *pdata;
- struct resource *r;
+ struct resource *res;
int ret, irq, num_cs = 0, bits_per_word = 8;
struct spi_master *master;
u32 tmp;
return -EINVAL;
}
- r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- if (!r)
- return -ENODEV;
-
irq = platform_get_irq(pdev, 0);
if (irq < 0)
return -ENXIO;
xspi->bitbang.txrx_bufs = xilinx_spi_txrx_bufs;
init_completion(&xspi->done);
- xspi->regs = devm_ioremap_resource(&pdev->dev, r);
+ res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+ xspi->regs = devm_ioremap_resource(&pdev->dev, res);
if (IS_ERR(xspi->regs)) {
ret = PTR_ERR(xspi->regs);
goto put_master;
master->num_chipselect = num_cs;
master->dev.of_node = pdev->dev.of_node;
- xspi->mem = *r;
xspi->irq = irq;
/*
}
dev_info(&pdev->dev, "at 0x%08llX mapped to 0x%p, irq=%d\n",
- (unsigned long long)r->start, xspi->regs, xspi->irq);
+ (unsigned long long)res->start, xspi->regs, xspi->irq);
if (pdata) {
for (i = 0; i < pdata->num_devices; i++)