Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b5d6e5f6 authored by Ohad Ben-Cohen's avatar Ohad Ben-Cohen Committed by Luciano Coelho
Browse files

wl12xx: one SDIO initialization is enough



Skip manual device power on in case runtime PM is enabled for
our device.

This eliminates a secondary & redundant SDIO init sequence.

Signed-off-by: default avatarOhad Ben-Cohen <ohad@wizery.com>
Signed-off-by: default avatarLuciano Coelho <coelho@ti.com>
parent 708bb3cf
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -166,12 +166,12 @@ static int wl1271_sdio_power_on(struct wl1271 *wl)
		ret = pm_runtime_get_sync(&func->dev);
		if (ret)
			goto out;
	}

	/* Runtime PM might be disabled, so power up the card manually */
	} else {
		/* Runtime PM is disabled: power up the card manually */
		ret = mmc_power_restore_host(func->card->host);
		if (ret < 0)
			goto out;
	}

	sdio_claim_host(func);
	sdio_enable_func(func);
@@ -188,7 +188,7 @@ static int wl1271_sdio_power_off(struct wl1271 *wl)
	sdio_disable_func(func);
	sdio_release_host(func);

	/* Runtime PM might be disabled, so power off the card manually */
	/* Power off the card manually, even if runtime PM is enabled. */
	ret = mmc_power_save_host(func->card->host);
	if (ret < 0)
		return ret;