diff mbox

mmc: dw_mmc: fix the wrong condition check of getting num-slots

Message ID 1500626396-223769-1-git-send-email-shawn.lin@rock-chips.com (mailing list archive)
State New, archived
Headers show

Commit Message

Shawn Lin July 21, 2017, 8:39 a.m. UTC
We only need to show the deprecated information if the driver
is able to get num-slots from DT. Otherwise I was confused by
the log with:

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

However I actually removed all num-slots from rockchip platforms.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
---

 drivers/mmc/host/dw_mmc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Ulf Hansson July 27, 2017, 2:47 p.m. UTC | #1
On 21 July 2017 at 10:39, Shawn Lin <shawn.lin@rock-chips.com> wrote:
> We only need to show the deprecated information if the driver
> is able to get num-slots from DT. Otherwise I was confused by
> the log with:
>
> dwmmc_rockchip fe320000.dwmmc: 'num-slots' was deprecated.
>
> However I actually removed all num-slots from rockchip platforms.
>
> Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>

Thanks, applied for fixes and added a fixes tag.

Kind regards
Uffe

> ---
>
>  drivers/mmc/host/dw_mmc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
> index a9dfb26..250dc6e 100644
> --- a/drivers/mmc/host/dw_mmc.c
> +++ b/drivers/mmc/host/dw_mmc.c
> @@ -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))
> --
> 1.9.1
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index a9dfb26..250dc6e 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -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))