diff options
author | Yang Xiwen <forbidden405@outlook.com> | 2024-02-29 04:36:19 +0300 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2024-03-05 14:57:45 +0300 |
commit | 88803989ff6d73155969df94cc84f1ecd28c4d9c (patch) | |
tree | 31a44958bbb62ca09b72088a4e3ea0d8cf9e76d4 /drivers/mmc/core/host.c | |
parent | ae5004a40a262d329039b99b62bd3fe7645b66ad (diff) | |
download | linux-88803989ff6d73155969df94cc84f1ecd28c4d9c.tar.xz |
mmc: core: Use a struct device* as in-param to mmc_of_parse_clk_phase()
Parsing dt usually happens very early, sometimes even before the struct
mmc_host has been 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 needed to have an initialized mmc_host, let's therefore pass a struct
device* to it instead.
Also update the only current user, sdhci-of-aspeed.
Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de>
Acked-by: Andrew Jeffery <andrew@codeconstruct.com.au>
Signed-off-by: Yang Xiwen <forbidden405@outlook.com>
Link: https://lore.kernel.org/r/20240229-b4-mmc-hi3798mv200-v7-1-10c03f316285@outlook.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc/core/host.c')
-rw-r--r-- | drivers/mmc/core/host.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/mmc/core/host.c b/drivers/mmc/core/host.c index 7cc9a33d28ca..3aa9dda6fd4f 100644 --- a/drivers/mmc/core/host.c +++ b/drivers/mmc/core/host.c @@ -234,10 +234,8 @@ static void mmc_of_parse_timing_phase(struct device *dev, const char *prop, } void -mmc_of_parse_clk_phase(struct mmc_host *host, struct mmc_clk_phase_map *map) +mmc_of_parse_clk_phase(struct device *dev, struct mmc_clk_phase_map *map) { - struct device *dev = host->parent; - mmc_of_parse_timing_phase(dev, "clk-phase-legacy", &map->phase[MMC_TIMING_LEGACY]); mmc_of_parse_timing_phase(dev, "clk-phase-mmc-hs", |