@@ -39,6 +39,7 @@
static int __init xilinx_spi_of_probe(struct of_device *ofdev,
const struct of_device_id *match)
{
+ struct xspi_platform_data *pdata = ofdev->dev.platform_data;
struct resource r_irq_struct;
struct resource r_mem_struct;
struct spi_master *master;
@@ -74,8 +75,8 @@ static int __init xilinx_spi_of_probe(struct of_device *ofdev,
dev_warn(&ofdev->dev, "no 'xlnx,num-ss-bits' property\n");
return -EINVAL;
}
- ofdev->dev.platform_data->num_chipselect = *prop;
- ofdev->dev.platform_data->bits_per_word = 8;
+ pdata->num_chipselect = *prop;
+ pdata->bits_per_word = 8;
master = xilinx_spi_init(&ofdev->dev, r_mem, r_irq->start, -1);
if (!master)
return -ENODEV;