diff options
author | Rajendra Nayak <rnayak@ti.com> | 2012-04-11 06:03:13 -0400 |
---|---|---|
committer | Chris Ball <cjb@laptop.org> | 2012-04-20 20:29:08 -0400 |
commit | 4d048f915f32c8455605b106aa0de2cf68a71903 (patch) | |
tree | 76ed575eb8785d6c23e429b8b253adfb04ff2004 /drivers/mmc | |
parent | b6d085f6f59108508c1eea9c5251deb765350c50 (diff) |
mmc: omap_hsmmc: Get rid of of_have_populated_dt() usage
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: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Acked-by: Rob Herring <rob.herring@calxeda.com>
Reviewed-by: Balaji T K <balajitk@ti.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | 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 cfd049c7349a..56d4499d4388 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c | |||
@@ -249,7 +249,7 @@ static int omap_hsmmc_set_power(struct device *dev, int slot, int power_on, | |||
249 | * the pbias cell programming support is still missing when | 249 | * the pbias cell programming support is still missing when |
250 | * booting with Device tree | 250 | * booting with Device tree |
251 | */ | 251 | */ |
252 | if (of_have_populated_dt() && !vdd) | 252 | if (dev->of_node && !vdd) |
253 | return 0; | 253 | return 0; |
254 | 254 | ||
255 | if (mmc_slot(host).before_set_reg) | 255 | if (mmc_slot(host).before_set_reg) |
@@ -1549,7 +1549,7 @@ static void omap_hsmmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) | |||
1549 | * can't be allowed when booting with device | 1549 | * can't be allowed when booting with device |
1550 | * tree. | 1550 | * tree. |
1551 | */ | 1551 | */ |
1552 | (!of_have_populated_dt())) { | 1552 | !host->dev->of_node) { |
1553 | /* | 1553 | /* |
1554 | * The mmc_select_voltage fn of the core does | 1554 | * The mmc_select_voltage fn of the core does |
1555 | * not seem to set the power_mode to | 1555 | * not seem to set the power_mode to |