mmc: omap: fix broken slot switch lookup
authorAaro Koskinen <aaro.koskinen@iki.fi>
Fri, 23 Feb 2024 18:14:37 +0000 (20:14 +0200)
committerTony Lindgren <tony@atomide.com>
Fri, 8 Mar 2024 08:50:02 +0000 (10:50 +0200)
commitd4debbcbffa45c3de5df0040af2eea74a9e794a3
treec230912205260978978b1b871c32953d5d3a2b31
parent480d44d0820dd5ae043dc97c0b46dabbe53cb1cf
mmc: omap: fix broken slot switch lookup

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>
drivers/mmc/host/omap.c