Re: [PATCH 5/7] ath9k: of: Use the clk API to get the reference clock rate

Rafał Miłecki
2017-03-13T22:18:03Z

On 03/13/2017 10:05 PM, Alban wrote:
> @@ -573,6 +575,12 @@ static int ath9k_of_init(struct ath_softc *sc)
>
> ath_dbg(common, CONFIG, "parsing configuration from OF node\n");
>
> + clk = clk_get(sc->dev, "ref");
> + if (!IS_ERR(clk)) {
> + ah->is_clk_25mhz = (clk_get_rate(clk) == 25000000);

One trivial thing: you don't need these extra braces.

> + clk_put(clk);
> + }