Message ID | 20190830090244.13566-3-andrew@aj.id.au |
---|---|
State | Superseded, archived |
Headers | show |
Series | mmc: sdhci-of-aspeed: Fixes for AST2600 eMMC | expand |
On Fri, 30 Aug 2019 at 09:02, Andrew Jeffery <andrew@aj.id.au> wrote: > > host->clock is already managed by sdhci_set_ios(). > > Suggested-by: Ulf Hansson <ulf.hansson@linaro.org> > Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Reviewed-by: Joel Stanley <joel@jms.id.au> I assume this went upstream with a fixes tag? Cheers, Joel
On Mon, 2 Sep 2019, at 10:07, Joel Stanley wrote: > On Fri, 30 Aug 2019 at 09:02, Andrew Jeffery <andrew@aj.id.au> wrote: > > > > host->clock is already managed by sdhci_set_ios(). > > > > Suggested-by: Ulf Hansson <ulf.hansson@linaro.org> > > Signed-off-by: Andrew Jeffery <andrew@aj.id.au> > > Reviewed-by: Joel Stanley <joel@jms.id.au> > > I assume this went upstream with a fixes tag? > I haven't sent it yet, was waiting for Adrian to review my v1 upstream before sending a v2 with this patch included. Not sure it needs a fixes tag, but there's no reason it shouldn't have one either. It's just a code cleanup, it doesn't fix a bug. Andrew
diff --git a/drivers/mmc/host/sdhci-of-aspeed.c b/drivers/mmc/host/sdhci-of-aspeed.c index d5acb5afc50f..6ae81c8af431 100644 --- a/drivers/mmc/host/sdhci-of-aspeed.c +++ b/drivers/mmc/host/sdhci-of-aspeed.c @@ -61,7 +61,7 @@ static void aspeed_sdhci_set_clock(struct sdhci_host *host, unsigned int clock) sdhci_writew(host, 0, SDHCI_CLOCK_CONTROL); if (clock == 0) - goto out; + return; for (div = 1; div < 256; div *= 2) { if ((host->max_clk / div) <= clock) @@ -72,9 +72,6 @@ static void aspeed_sdhci_set_clock(struct sdhci_host *host, unsigned int clock) clk = div << SDHCI_DIVIDER_SHIFT; sdhci_enable_clk(host, clk); - -out: - host->clock = clock; } static void aspeed_sdhci_set_bus_width(struct sdhci_host *host, int width)
host->clock is already managed by sdhci_set_ios(). Suggested-by: Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by: Andrew Jeffery <andrew@aj.id.au> --- drivers/mmc/host/sdhci-of-aspeed.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)