Modify the qspi driver to parse reg information by name.

Signed-off-by: Sourav Poddar <sourav.pod...@ti.com>
---
 drivers/spi/spi-ti-qspi.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/drivers/spi/spi-ti-qspi.c b/drivers/spi/spi-ti-qspi.c
index 033ef8d..67aa905 100644
--- a/drivers/spi/spi-ti-qspi.c
+++ b/drivers/spi/spi-ti-qspi.c
@@ -465,7 +465,11 @@ static int ti_qspi_probe(struct platform_device *pdev)
        qspi->master = master;
        qspi->dev = &pdev->dev;
 
-       r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+       r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "qspi_base");
+       if (r == NULL) {
+               dev_err(&pdev->dev, "missing platform resources data\n");
+               return -ENODEV;
+       }
 
        irq = platform_get_irq(pdev, 0);
        if (irq < 0) {
-- 
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to