OSDN Git Service

spi: efm32: properly namespace location property
[android-x86/kernel.git] / drivers / spi / spi-efm32.c
index 0512fed..fdb6fce 100644 (file)
@@ -294,7 +294,10 @@ static void efm32_spi_probe_dt(struct platform_device *pdev,
        u32 location;
        int ret;
 
-       ret = of_property_read_u32(np, "location", &location);
+       ret = of_property_read_u32(np, "efm32,location", &location);
+       if (ret)
+               /* fall back to old and (wrongly) generic property "location" */
+               ret = of_property_read_u32(np, "location", &location);
        if (!ret) {
                dev_dbg(&pdev->dev, "using location %u\n", location);
        } else {