diff mbox

mmc: sdhci-bcm-kona: fix logic to check for 8-bit data width

Message ID 1442397200-29731-1-git-send-email-javier@osg.samsung.com (mailing list archive)
State New, archived
Headers show

Commit Message

Javier Martinez Canillas Sept. 16, 2015, 9:53 a.m. UTC
The driver prints if the data width is 8-bit but it's using a
binary OR instead of a binary AND so it will always report as
"is_8bit=Y" regardless of the flags in host->mmc->caps.

Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>

---

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

Comments

Ray Jui Sept. 16, 2015, 5:20 p.m. UTC | #1
On 9/16/2015 2:53 AM, Javier Martinez Canillas wrote:
> The driver prints if the data width is 8-bit but it's using a
> binary OR instead of a binary AND so it will always report as
> "is_8bit=Y" regardless of the flags in host->mmc->caps.
> 
> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
> 
> ---
> 
>  drivers/mmc/host/sdhci-bcm-kona.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/mmc/host/sdhci-bcm-kona.c b/drivers/mmc/host/sdhci-bcm-kona.c
> index 2bd90fb35c75..00a8a40a3729 100644
> --- a/drivers/mmc/host/sdhci-bcm-kona.c
> +++ b/drivers/mmc/host/sdhci-bcm-kona.c
> @@ -273,7 +273,7 @@ static int sdhci_bcm_kona_probe(struct platform_device *pdev)
>  		host->quirks |= SDHCI_QUIRK_BROKEN_CARD_DETECTION;
>  
>  	dev_dbg(dev, "is_8bit=%c\n",
> -		(host->mmc->caps | MMC_CAP_8_BIT_DATA) ? 'Y' : 'N');
> +		(host->mmc->caps & MMC_CAP_8_BIT_DATA) ? 'Y' : 'N');
>  

The fix looks good to me. Thanks.

Reviewed-by: Ray Jui <rjui@broadcom.com>

Ray
--
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
Ulf Hansson Sept. 17, 2015, 8:49 a.m. UTC | #2
On 16 September 2015 at 11:53, Javier Martinez Canillas
<javier@osg.samsung.com> wrote:
> The driver prints if the data width is 8-bit but it's using a
> binary OR instead of a binary AND so it will always report as
> "is_8bit=Y" regardless of the flags in host->mmc->caps.
>
> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>

Thanks, applied for next!

Kind regards
Uffe


>
> ---
>
>  drivers/mmc/host/sdhci-bcm-kona.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/sdhci-bcm-kona.c b/drivers/mmc/host/sdhci-bcm-kona.c
> index 2bd90fb35c75..00a8a40a3729 100644
> --- a/drivers/mmc/host/sdhci-bcm-kona.c
> +++ b/drivers/mmc/host/sdhci-bcm-kona.c
> @@ -273,7 +273,7 @@ static int sdhci_bcm_kona_probe(struct platform_device *pdev)
>                 host->quirks |= SDHCI_QUIRK_BROKEN_CARD_DETECTION;
>
>         dev_dbg(dev, "is_8bit=%c\n",
> -               (host->mmc->caps | MMC_CAP_8_BIT_DATA) ? 'Y' : 'N');
> +               (host->mmc->caps & MMC_CAP_8_BIT_DATA) ? 'Y' : 'N');
>
>         ret = sdhci_bcm_kona_sd_reset(host);
>         if (ret)
> --
> 2.4.3
>
--
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/sdhci-bcm-kona.c b/drivers/mmc/host/sdhci-bcm-kona.c
index 2bd90fb35c75..00a8a40a3729 100644
--- a/drivers/mmc/host/sdhci-bcm-kona.c
+++ b/drivers/mmc/host/sdhci-bcm-kona.c
@@ -273,7 +273,7 @@  static int sdhci_bcm_kona_probe(struct platform_device *pdev)
 		host->quirks |= SDHCI_QUIRK_BROKEN_CARD_DETECTION;
 
 	dev_dbg(dev, "is_8bit=%c\n",
-		(host->mmc->caps | MMC_CAP_8_BIT_DATA) ? 'Y' : 'N');
+		(host->mmc->caps & MMC_CAP_8_BIT_DATA) ? 'Y' : 'N');
 
 	ret = sdhci_bcm_kona_sd_reset(host);
 	if (ret)