On Thu, 2024-02-15 at 19:03 +0800, Yang Xiwen via B4 Relay wrote: > From: Yang Xiwen <forbidden405@xxxxxxxxxxx> > > 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@xxxxxxxxxxx> > --- > 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@xxxxxxxxxxxxxxxxxxxx>