mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
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 <[email protected]> Reported-by: Benoit Cousson <[email protected]> Cc: Sebastian Andrzej Siewior <[email protected]> Acked-by: Rob Herring <[email protected]> Reviewed-by: Balaji T K <[email protected]> Signed-off-by: Chris Ball <[email protected]>
This commit is contained in:
parent
b6d085f6f5
commit
4d048f915f
1 changed files with 2 additions and 2 deletions
|
|
@ -249,7 +249,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)
|
||||
|
|
@ -1549,7 +1549,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
|
||||
|
|
|
|||
Loading…
Reference in a new issue