Skip to content

Commit

Permalink
mmc: dw_mmc: fix the wrong condition check of getting num-slots from DT
Browse files Browse the repository at this point in the history
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: d30a8f7 ("mmc: dw_mmc: deprecated the "num-slots" property")
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
  • Loading branch information
Shawn Lin authored and Ulf Hansson committed Jul 27, 2017
1 parent 36acbd9 commit 16f5df8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/mmc/host/dw_mmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 16f5df8

Please sign in to comment.