mmc: exynos_dw_mmc: Extend dm_dwmci_ops without code duplication
authorSam Protsenko <semen.protsenko@linaro.org>
Sun, 26 Oct 2025 01:06:53 +0000 (20:06 -0500)
committerPeng Fan <peng.fan@nxp.com>
Fri, 7 Nov 2025 01:28:28 +0000 (09:28 +0800)
commitf391a1158f3db496ce994b613f76b389ef275552
treee9c5cceb973ac4fa092234946ed50e2cab09de83
parentddc916334a7a7e180b532dbb2cf1b778466d2b9b
mmc: exynos_dw_mmc: Extend dm_dwmci_ops without code duplication

Instead of extending dm_dwmci_ops by copy-pasting the structure code
first, copy the actual structure data with memcpy() and then set the
.execute_tuning field. Now if struct dm_dwmci_ops gets modified in
future, these changes will be automatically reflected in struct
exynos_dwmmc_ops, which prevents possible issues in future. It also
avoids code duplication.

No functional change, but it can prevent possible isssues in future.

Fixes: eda4bd29929c ("mmc: exynos_dw_mmc: add support for MMC HS200 and HS400 modes")
Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Reviewed-by: Anand Moon <linux.amoon@gmail.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
drivers/mmc/exynos_dw_mmc.c