All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Ball <cjb@laptop.org>
To: Seungwon Jeon <tgih.jun@samsung.com>
Cc: linux-mmc@vger.kernel.org, linux-samsung-soc@vger.kernel.org,
	'James Hogan' <james@albanarts.com>
Subject: Re: [PATCH v2] mmc: dw_mmc: Add second capability field
Date: Sat, 24 Dec 2011 21:37:20 -0500	[thread overview]
Message-ID: <m2ty4pxtpb.fsf@bob.laptop.org> (raw)
In-Reply-To: <006801ccc088$40cf1460$c26d3d20$%jun@samsung.com> (Seungwon Jeon's message of "Thu, 22 Dec 2011 18:01:12 +0900")

Hi,

On Thu, Dec 22 2011, Seungwon Jeon wrote:
> This patch adds caps2 filed for second capability in dw_mmc.
> It corresponds with MMC_CAPS2_XXX. And this patch removes the
> unnecessary condition statement for assigning caps.
>
> Signed-off-by: Seungwon Jeon <tgih.jun@samsung.com>
> ---
>  drivers/mmc/host/dw_mmc.c  |    6 ++----
>  include/linux/mmc/dw_mmc.h |    1 +
>  2 files changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
> index 3aaeb08..3f5a77a 100644
> --- a/drivers/mmc/host/dw_mmc.c
> +++ b/drivers/mmc/host/dw_mmc.c
> @@ -1676,10 +1676,8 @@ static int __init dw_mci_init_slot(struct dw_mci *host, unsigned int id)
>  	if (host->pdata->setpower)
>  		host->pdata->setpower(id, 0);
>  
> -	if (host->pdata->caps)
> -		mmc->caps = host->pdata->caps;
> -	else
> -		mmc->caps = 0;
> +	mmc->caps |= host->pdata->caps;
> +	mmc->caps2 |= host->pdata->caps2;

Ah, I replied earlier without having seen this patch.  I still prefer
the version I proposed, which doesn't dereference host->pdata->caps{,2}
without testing it first.

- Chris.
-- 
Chris Ball   <cjb@laptop.org>   <http://printf.net/>
One Laptop Per Child

      parent reply	other threads:[~2011-12-25  2:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-22  9:01 [PATCH v2] mmc: dw_mmc: Add second capability field Seungwon Jeon
2011-12-22 10:30 ` Will Newton
2011-12-25  2:37 ` Chris Ball [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2ty4pxtpb.fsf@bob.laptop.org \
    --to=cjb@laptop.org \
    --cc=james@albanarts.com \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=tgih.jun@samsung.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.