All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Ball <cjb@laptop.org>
To: Antonio Ospite <ospite@studenti.unina.it>
Cc: openezx-devel@lists.openezx.org, linux-mmc@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	Mark Brown <broonie@opensource.wolfsonmicro.com>
Subject: Re: [PATCH v2 1/2] pxamci: remove the ifdef CONFIG_REGULATOR
Date: Wed, 11 May 2011 10:41:43 -0400	[thread overview]
Message-ID: <m38vud2taw.fsf@pullcord.laptop.org> (raw)
In-Reply-To: <1305109145-16567-1-git-send-email-ospite@studenti.unina.it> (Antonio Ospite's message of "Wed, 11 May 2011 12:19:05 +0200")

Hi Antonio,

On Wed, May 11 2011, Antonio Ospite wrote:
> Don't wrap regulator_get() inside an ifdef CONFIG_REGULATOR anymore, as
> now it degenerates and returns NULL when the regulator framework is
> disabled (since commit be1a50d: regulator: Let drivers know when they
> use the stub API); and use IS_ERR_OR_NULL() to handle the stub function 
> correctly.
>
> Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
> ---
>
> Changes since v1:
>   - Use IS_ERR_OR_NULL() to correctly handle the stub regulator_get()
>   - Put the short commit message of be1a50d so it is easier to see what it is 
>     about, for the long commit and the actual code changes the git history can 
>     be queried.
>
> Thanks,
>    Antonio Ospite
>    http://ao2.it
>
>  drivers/mmc/host/pxamci.c |    5 ++---
>  1 files changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/mmc/host/pxamci.c b/drivers/mmc/host/pxamci.c
> index 7257738..3a89fb2 100644
> --- a/drivers/mmc/host/pxamci.c
> +++ b/drivers/mmc/host/pxamci.c
> @@ -79,10 +79,9 @@ struct pxamci_host {
>  
>  static inline void pxamci_init_ocr(struct pxamci_host *host)
>  {
> -#ifdef CONFIG_REGULATOR
>  	host->vcc = regulator_get(mmc_dev(host->mmc), "vmmc");
>  
> -	if (IS_ERR(host->vcc))
> +	if (IS_ERR_OR_NULL(host->vcc))
>  		host->vcc = NULL;
>  	else {
>  		host->mmc->ocr_avail = mmc_regulator_get_ocrmask(host->vcc);
> @@ -90,7 +89,7 @@ static inline void pxamci_init_ocr(struct pxamci_host *host)
>  			dev_warn(mmc_dev(host->mmc),
>  				"ocr_mask/setpower will not be used\n");
>  	}
> -#endif
> +
>  	if (host->vcc == NULL) {
>  		/* fall-back to platform data */
>  		host->mmc->ocr_avail = host->pdata ?

Thanks, I've merged this and squashed the 2/2 punctuation patch into it;
it didn't seem worth having a separate patch when both touch the same code.

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

WARNING: multiple messages have this Message-ID (diff)
From: cjb@laptop.org (Chris Ball)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 1/2] pxamci: remove the ifdef CONFIG_REGULATOR
Date: Wed, 11 May 2011 10:41:43 -0400	[thread overview]
Message-ID: <m38vud2taw.fsf@pullcord.laptop.org> (raw)
In-Reply-To: <1305109145-16567-1-git-send-email-ospite@studenti.unina.it> (Antonio Ospite's message of "Wed, 11 May 2011 12:19:05 +0200")

Hi Antonio,

On Wed, May 11 2011, Antonio Ospite wrote:
> Don't wrap regulator_get() inside an ifdef CONFIG_REGULATOR anymore, as
> now it degenerates and returns NULL when the regulator framework is
> disabled (since commit be1a50d: regulator: Let drivers know when they
> use the stub API); and use IS_ERR_OR_NULL() to handle the stub function 
> correctly.
>
> Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
> ---
>
> Changes since v1:
>   - Use IS_ERR_OR_NULL() to correctly handle the stub regulator_get()
>   - Put the short commit message of be1a50d so it is easier to see what it is 
>     about, for the long commit and the actual code changes the git history can 
>     be queried.
>
> Thanks,
>    Antonio Ospite
>    http://ao2.it
>
>  drivers/mmc/host/pxamci.c |    5 ++---
>  1 files changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/mmc/host/pxamci.c b/drivers/mmc/host/pxamci.c
> index 7257738..3a89fb2 100644
> --- a/drivers/mmc/host/pxamci.c
> +++ b/drivers/mmc/host/pxamci.c
> @@ -79,10 +79,9 @@ struct pxamci_host {
>  
>  static inline void pxamci_init_ocr(struct pxamci_host *host)
>  {
> -#ifdef CONFIG_REGULATOR
>  	host->vcc = regulator_get(mmc_dev(host->mmc), "vmmc");
>  
> -	if (IS_ERR(host->vcc))
> +	if (IS_ERR_OR_NULL(host->vcc))
>  		host->vcc = NULL;
>  	else {
>  		host->mmc->ocr_avail = mmc_regulator_get_ocrmask(host->vcc);
> @@ -90,7 +89,7 @@ static inline void pxamci_init_ocr(struct pxamci_host *host)
>  			dev_warn(mmc_dev(host->mmc),
>  				"ocr_mask/setpower will not be used\n");
>  	}
> -#endif
> +
>  	if (host->vcc == NULL) {
>  		/* fall-back to platform data */
>  		host->mmc->ocr_avail = host->pdata ?

Thanks, I've merged this and squashed the 2/2 punctuation patch into it;
it didn't seem worth having a separate patch when both touch the same code.

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

  parent reply	other threads:[~2011-05-11 14:41 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-09 20:11 [PATCH] pxamci: remove an ifdef about CONFIG_REGULATOR Antonio Ospite
2011-05-09 20:11 ` Antonio Ospite
2011-05-09 20:15 ` Mark Brown
2011-05-09 20:15   ` Mark Brown
2011-05-09 20:23 ` Russell King - ARM Linux
2011-05-09 20:23   ` Russell King - ARM Linux
2011-05-09 20:36   ` Mark Brown
2011-05-09 20:36     ` Mark Brown
2011-05-10 20:02     ` Antonio Ospite
2011-05-10 20:02       ` Antonio Ospite
2011-05-10 20:32       ` Russell King - ARM Linux
2011-05-10 20:32         ` Russell King - ARM Linux
2011-05-10 20:36       ` Mark Brown
2011-05-10 20:36         ` Mark Brown
2011-05-11 10:19         ` [PATCH v2 1/2] pxamci: remove the ifdef CONFIG_REGULATOR Antonio Ospite
2011-05-11 10:19           ` Antonio Ospite
2011-05-11 13:07           ` Mark Brown
2011-05-11 13:07             ` Mark Brown
2011-05-11 14:41           ` Chris Ball [this message]
2011-05-11 14:41             ` Chris Ball
2011-05-11 20:19             ` Antonio Ospite
2011-05-11 20:19               ` Antonio Ospite
2011-05-11 10:19         ` [PATCH 2/2] pxamci: fix coding style for multi statement conditionals Antonio Ospite
2011-05-11 10:19           ` Antonio Ospite
2011-05-11 10:26       ` [PATCH] pxamci: remove an ifdef about CONFIG_REGULATOR Antonio Ospite
2011-05-11 10:26         ` Antonio Ospite
2011-05-10 11:59 ` Sergei Shtylyov
2011-05-10 11:59   ` Sergei Shtylyov

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=m38vud2taw.fsf@pullcord.laptop.org \
    --to=cjb@laptop.org \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=openezx-devel@lists.openezx.org \
    --cc=ospite@studenti.unina.it \
    /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.