diff options
| author | Sam Protsenko <[email protected]> | 2025-10-25 20:06:54 -0500 |
|---|---|---|
| committer | Peng Fan <[email protected]> | 2025-11-07 09:28:28 +0800 |
| commit | 20b19639cdf86f4fb1289443bc47866a8047b619 (patch) | |
| tree | f91e54fecff639a7e95b40c24af4443b29393204 /include/dwmmc.h | |
| parent | f391a1158f3db496ce994b613f76b389ef275552 (diff) | |
mmc: dw_mmc: Do not export dwmci_send_cmd() and dwmci_set_ios()
Do not over-expose the private dw_mmc API. The glue layer drivers at
this point shouldn't be aware and shouldn't use the generic
dwmci_send_cmd() and dwmci_set_ios() functions. Making those functions
public causes a "leaky abstraction" issue. It clutters the public
interface of generic dw_mmc driver and possibly leads to improper usage
of those functions, so it's a bad design.
If struct dm_dwmci_ops has to be extended, do so by copying it first
(like it's done for example in snps_dw_mmc driver). That also makes sure
the future changes to struct dm_dwmci_ops in dw_mmc driver will be
automatically reflected in all extended copies, and avoid code
duplication.
This effectively reverts commit ef3b16bb8e73 ("mmc: dw_mmc: export
dwmci_send_cmd() and dwmci_set_ios()").
No functional change.
Fixes: ef3b16bb8e73 ("mmc: dw_mmc: export dwmci_send_cmd() and dwmci_set_ios()")
Signed-off-by: Sam Protsenko <[email protected]>
Reviewed-by: Anand Moon <[email protected]>
Signed-off-by: Peng Fan <[email protected]>
Diffstat (limited to 'include/dwmmc.h')
| -rw-r--r-- | include/dwmmc.h | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/include/dwmmc.h b/include/dwmmc.h index 47e3220985e..7e1a6646518 100644 --- a/include/dwmmc.h +++ b/include/dwmmc.h @@ -338,9 +338,6 @@ int add_dwmci(struct dwmci_host *host, u32 max_clk, u32 min_clk); #ifdef CONFIG_DM_MMC /* Export the operations to drivers */ int dwmci_probe(struct udevice *dev); -int dwmci_send_cmd(struct udevice *dev, struct mmc_cmd *cmd, - struct mmc_data *data); -int dwmci_set_ios(struct udevice *dev); extern const struct dm_mmc_ops dm_dwmci_ops; #endif |
