[PATCH] mmc: host: replace 1st argument to struct device * for mmc_of_parse_clk_phase()
Andrew Jeffery
andrew at codeconstruct.com.au
Fri Feb 16 11:17:36 AEDT 2024
On Thu, 2024-02-15 at 19:03 +0800, Yang Xiwen via B4 Relay wrote:
> From: Yang Xiwen <forbidden405 at outlook.com>
>
> Parsing dt usaully happens very early, sometimes even bofore struct
> mmc_host is allocated (e.g. dw_mci_probe() and dw_mci_parse_dt() in
> dw_mmc.c). Looking at the source of mmc_of_parse_clk_phase(), it's
> actually not mandatory to have a initialized mmc_host first, instead we
> can pass struct device * to it directly.
>
> Also fix the only current user (sdhci-of-aspeed.c).
>
> Signed-off-by: Yang Xiwen <forbidden405 at outlook.com>
> ---
> drivers/mmc/core/host.c | 4 +---
> drivers/mmc/host/sdhci-of-aspeed.c | 2 +-
So I think I wrote the mmc_of_parse_clk_phase() prototype with `struct
mmc_host *` simply because mmc_of_parse() took `struct mmc_host *`.
I'll defer to Ulf for whether what you're proposing is desirable, but
in terms of the impact on the Aspeed driver it seems okay.
Acked-by: Andrew Jeffery <andrew at codeconstruct.com.au>
More information about the openbmc
mailing list