diff mbox

[5/7] mmc: sdhci-esdhc-imx: fix cpas over write issue

Message ID 1382365627-26816-6-git-send-email-b29396@freescale.com (mailing list archive)
State New, archived
Headers show

Commit Message

Aisheng Dong Oct. 21, 2013, 2:27 p.m. UTC
We should use '|=' instead '=', or it may over write
the original caps assigned before this line.

Signed-off-by: Dong Aisheng <b29396@freescale.com>
---
 drivers/mmc/host/sdhci-esdhc-imx.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Shawn Guo Oct. 23, 2013, 2:51 a.m. UTC | #1
On Mon, Oct 21, 2013 at 10:27:05PM +0800, Dong Aisheng wrote:
> We should use '|=' instead '=', or it may over write
> the original caps assigned before this line.
> 
> Signed-off-by: Dong Aisheng <b29396@freescale.com>
> ---
>  drivers/mmc/host/sdhci-esdhc-imx.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
> index 5fe484f..baa27c7 100644
> --- a/drivers/mmc/host/sdhci-esdhc-imx.c
> +++ b/drivers/mmc/host/sdhci-esdhc-imx.c
> @@ -1070,7 +1070,7 @@ static int sdhci_esdhc_imx_probe(struct platform_device *pdev)
>  		break;
>  
>  	case ESDHC_CD_PERMANENT:
> -		host->mmc->caps = MMC_CAP_NONREMOVABLE;
> +		host->mmc->caps |= MMC_CAP_NONREMOVABLE;

I think it will be more logical if you switch the order of this patch
and the previous one.

Shawn

>  		break;
>  
>  	case ESDHC_CD_NONE:
> -- 
> 1.7.2.rc3
> 
> 

--
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
Aisheng Dong Oct. 23, 2013, 5:56 a.m. UTC | #2
On Wed, Oct 23, 2013 at 10:51:48AM +0800, Shawn Guo wrote:
> On Mon, Oct 21, 2013 at 10:27:05PM +0800, Dong Aisheng wrote:
> > We should use '|=' instead '=', or it may over write
> > the original caps assigned before this line.
> > 
> > Signed-off-by: Dong Aisheng <b29396@freescale.com>
> > ---
> >  drivers/mmc/host/sdhci-esdhc-imx.c |    2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> > 
> > diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
> > index 5fe484f..baa27c7 100644
> > --- a/drivers/mmc/host/sdhci-esdhc-imx.c
> > +++ b/drivers/mmc/host/sdhci-esdhc-imx.c
> > @@ -1070,7 +1070,7 @@ static int sdhci_esdhc_imx_probe(struct platform_device *pdev)
> >  		break;
> >  
> >  	case ESDHC_CD_PERMANENT:
> > -		host->mmc->caps = MMC_CAP_NONREMOVABLE;
> > +		host->mmc->caps |= MMC_CAP_NONREMOVABLE;
> 
> I think it will be more logical if you switch the order of this patch
> and the previous one.
> 

Sounds good to me.
Will switch it.

Regards
Dong Aisheng

> Shawn
> 
> >  		break;
> >  
> >  	case ESDHC_CD_NONE:
> > -- 
> > 1.7.2.rc3
> > 
> > 

--
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-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
index 5fe484f..baa27c7 100644
--- a/drivers/mmc/host/sdhci-esdhc-imx.c
+++ b/drivers/mmc/host/sdhci-esdhc-imx.c
@@ -1070,7 +1070,7 @@  static int sdhci_esdhc_imx_probe(struct platform_device *pdev)
 		break;
 
 	case ESDHC_CD_PERMANENT:
-		host->mmc->caps = MMC_CAP_NONREMOVABLE;
+		host->mmc->caps |= MMC_CAP_NONREMOVABLE;
 		break;
 
 	case ESDHC_CD_NONE: