mmc: sunxi: Set our device drvdata earlier
authorMaxime Ripard <maxime.ripard@bootlin.com>
Thu, 8 Mar 2018 14:52:53 +0000 (15:52 +0100)
committerUlf Hansson <ulf.hansson@linaro.org>
Thu, 15 Mar 2018 13:43:23 +0000 (14:43 +0100)
commitcb1214d27a3ef8817a7a208d546aa9f947bf5f7d
treed96d6d7e1128b7a99f6f20a57b6fc5c45751aa42
parentd81819419b2be4eee6643681ce0366856a772ba9
mmc: sunxi: Set our device drvdata earlier

As soon as the pm_runtime_enable hook is called, our runtime_suspend and
runtime_resume hooks can be called as well. However, we only set the device
drvdata that we will use after we have registered into the MMC core. Move
that earlier so that we don't have a race that could lead to a crash.

Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/sunxi-mmc.c