]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
mmc: omap: fix broken slot switch lookup
authorAaro Koskinen <aaro.koskinen@iki.fi>
Fri, 23 Feb 2024 18:14:37 +0000 (20:14 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Apr 2024 09:19:26 +0000 (11:19 +0200)
commit267bcd2213ac9801e0dbb85571042c1c364804ff
tree01258d841d7782b613f010afc05f7ada3e099877
parent086426dc64e0f650266a41766860b3f924826713
mmc: omap: fix broken slot switch lookup

[ Upstream commit d4debbcbffa45c3de5df0040af2eea74a9e794a3 ]

The lookup is done before host->dev is initialized. It will always just
fail silently, and the MMC behaviour is totally unpredictable as the switch
is left in an undefined state. Fix that.

Fixes: e519f0bb64ef ("ARM/mmc: Convert old mmci-omap to GPIO descriptors")
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Message-ID: <20240223181439.1099750-4-aaro.koskinen@iki.fi>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/mmc/host/omap.c