All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Ball <cjb@laptop.org>
To: Rajendra Nayak <rnayak@ti.com>
Cc: linux-omap@vger.kernel.org, linux-mmc@vger.kernel.org,
	devicetree-discuss@lists.ozlabs.org, b-cousson@ti.com,
	Balaji TK <balajitk@ti.com>,
	Rob Herring <rob.herring@calxeda.com>,
	Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Subject: Re: [PATCH] mmc: omap_hsmmc: Get rid of of_have_populated_dt() usage
Date: Wed, 11 Apr 2012 10:36:35 -0400	[thread overview]
Message-ID: <87398atjws.fsf@laptop.org> (raw)
In-Reply-To: <1334138593-9692-1-git-send-email-rnayak@ti.com> (Rajendra Nayak's message of "Wed, 11 Apr 2012 15:33:13 +0530")

Hi,

On Wed, Apr 11 2012, Rajendra Nayak wrote:
> of_have_populated_dt() is not expected to be used in drivers but
> instead only in early platform init code.
> Drivers on the other hand should rely on dev->of_node or of_match_device().
> Besides usage of of_have_populated_dt() also throws up build error as below
> which was reported by Balaji TK, when omap_hsmmc is built as a module.
>
> ERROR: "allnodes" [drivers/mmc/host/omap_hsmmc.ko] undefined!
> make[1]: *** [__modpost] Error 1
> make: *** [modules] Error 2
>
> So get rid of all of_have_populated_dt() usage in omap_hsmmc driver and
> instead use dev->of_node to make the same dicisions as earlier.
>
> Signed-off-by: Rajendra Nayak <rnayak@ti.com>
> Reported-by: Benoit Cousson <b-cousson@ti.com>
> Cc: Balaji TK <balajitk@ti.com>
> Cc: Rob Herring <rob.herring@calxeda.com>
> Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
> ---
>  drivers/mmc/host/omap_hsmmc.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
> index ecc9521..4254b6f 100644
> --- a/drivers/mmc/host/omap_hsmmc.c
> +++ b/drivers/mmc/host/omap_hsmmc.c
> @@ -252,7 +252,7 @@ static int omap_hsmmc_set_power(struct device *dev, int slot, int power_on,
>  	 * the pbias cell programming support is still missing when
>  	 * booting with Device tree
>  	 */
> -	if (of_have_populated_dt() && !vdd)
> +	if (dev->of_node && !vdd)
>  		return 0;
>  
>  	if (mmc_slot(host).before_set_reg)
> @@ -1564,7 +1564,7 @@ static void omap_hsmmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
>  			 * can't be allowed when booting with device
>  			 * tree.
>  			 */
> -			(!of_have_populated_dt())) {
> +			!host->dev->of_node) {
>  				/*
>  				 * The mmc_select_voltage fn of the core does
>  				 * not seem to set the power_mode to

Thanks, pushed to mmc-next for 3.4.

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

      parent reply	other threads:[~2012-04-11 14:36 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-11 10:03 [PATCH] mmc: omap_hsmmc: Get rid of of_have_populated_dt() usage Rajendra Nayak
2012-04-11 10:09 ` Felipe Balbi
2012-04-11 10:24   ` Rajendra Nayak
2012-04-11 10:26     ` Felipe Balbi
2012-04-11 10:29       ` Rajendra Nayak
2012-04-11 10:31         ` Felipe Balbi
2012-04-11 12:10 ` Rob Herring
2012-04-11 14:05 ` T Krishnamoorthy, Balaji
2012-04-11 14:36 ` 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=87398atjws.fsf@laptop.org \
    --to=cjb@laptop.org \
    --cc=b-cousson@ti.com \
    --cc=balajitk@ti.com \
    --cc=bigeasy@linutronix.de \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=rnayak@ti.com \
    --cc=rob.herring@calxeda.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.