mmc: mmci: Initial support to manage variant specific callbacks
authorUlf Hansson <ulf.hansson@linaro.org>
Fri, 13 Jul 2018 11:15:23 +0000 (13:15 +0200)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 30 Jul 2018 13:07:43 +0000 (15:07 +0200)
commited9067fd5f299db7110861a0434d0e2ffb961649
tree9657c4ce7e3f03864e6b2ab9baa8d6ab5475ee47
parent57d1654ec96a49f5a093f9cbe40718c92ab5daa0
mmc: mmci: Initial support to manage variant specific callbacks

To be able to better support different mmci variants, we need to be able to
use variant specific callbacks, rather than continue to sprinkle the code
with additional variant data. To move in this direction, let's add an
optional ->init() callback to the variant data struct, which variants shall
use to assign the mmci_host_ops pointer.

Using an ->init() callback enables us to partition the code between
different files. To allow separate mmci variant files to implement the
variant specifics, let's also move the definition of the struct
variant_data to the common mmci header file.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Reviewed-by: Ludovic Barre <ludovic.barre@st.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
drivers/mmc/host/mmci.c
drivers/mmc/host/mmci.h