]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
mmc: dw_mmc: fix the wrong condition check of getting num-slots from DT
authorShawn Lin <shawn.lin@rock-chips.com>
Fri, 21 Jul 2017 08:39:56 +0000 (16:39 +0800)
committerUlf Hansson <ulf.hansson@linaro.org>
Thu, 27 Jul 2017 13:57:30 +0000 (15:57 +0200)
Change to print the information about when the deprecated "num-slots" DT
binding is being used, as to avoid confusion when browsing the log:

dwmmc_rockchip fe320000.dwmmc: 'num-slots' was deprecated.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Fixes: d30a8f7bdf64 ("mmc: dw_mmc: deprecated the "num-slots" property")
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/dw_mmc.c

index a9dfb26972f212587e9d6af2b223c39403a65af8..250dc6ec4c82df50f4dabb72a7e2486f093c83f9 100644 (file)
@@ -2957,7 +2957,7 @@ static struct dw_mci_board *dw_mci_parse_dt(struct dw_mci *host)
        }
 
        /* find out number of slots supported */
-       if (device_property_read_u32(dev, "num-slots", &pdata->num_slots))
+       if (!device_property_read_u32(dev, "num-slots", &pdata->num_slots))
                dev_info(dev, "'num-slots' was deprecated.\n");
 
        if (device_property_read_u32(dev, "fifo-depth", &pdata->fifo_depth))