Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754308AbdCMWSI (ORCPT ); Mon, 13 Mar 2017 18:18:08 -0400 Received: from mail-lf0-f68.google.com ([209.85.215.68]:35960 "EHLO mail-lf0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752786AbdCMWSD (ORCPT ); Mon, 13 Mar 2017 18:18:03 -0400 Subject: Re: [PATCH 5/7] ath9k: of: Use the clk API to get the reference clock rate To: Alban , QCA ath9k Development References: <1489439116-4233-1-git-send-email-albeu@free.fr> <1489439116-4233-5-git-send-email-albeu@free.fr> Cc: John Crispin , Kalle Valo , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org From: =?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?= Message-ID: Date: Mon, 13 Mar 2017 23:17:58 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: <1489439116-4233-5-git-send-email-albeu@free.fr> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 378 Lines: 14 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); > + }