Messages in this thread | | | Date | Mon, 20 Nov 2017 21:45:00 +0100 | From | Wolfram Sang <> | Subject | Re: [PATCH 4/6] mmc: tmio: move mmc_host_ops to struct tmio_mmc_host from static data |
| |
On Tue, Nov 07, 2017 at 05:09:30PM +0900, Masahiro Yamada wrote: > Currently, tmio_mmc_ops is static data and tmio_mmc_host_probe() > updates some hooks in the static data. This is a problem when > two or more instances call tmio_mmc_host_probe() and each of them > requests to use its own card_busy/start_signal_voltage_switch. > > We can borrow a solution from sdhci_alloc_host(). Copy the whole > ops structure to host->mmc_host_ops, then override the hooks in > malloc'ed data. Constify tmio_mmc_ops since it is a template ops > used by default. > > Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
[unhandled content-type:application/pgp-signature] | |