Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756371Ab3D1SDl (ORCPT ); Sun, 28 Apr 2013 14:03:41 -0400 Received: from moutng.kundenserver.de ([212.227.126.186]:49998 "EHLO moutng.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753958Ab3D1SDj (ORCPT ); Sun, 28 Apr 2013 14:03:39 -0400 From: Arnd Bergmann To: Sebastian Hesselbarth Subject: Re: [PATCH] clk: si5351: Allow to build without CONFIG_OF Date: Sun, 28 Apr 2013 20:03:26 +0200 User-Agent: KMail/1.12.2 (Linux/3.8.0-18-generic; KDE/4.3.2; x86_64; ; ) Cc: Stephen Rothwell , Grant Likely , Rob Herring , Rob Landley , Mike Turquette , Stephen Warren , Thierry Reding , Dom Cobley , Linus Walleij , Andrew Morton , Pawel Moll , Mark Brown , "Russell King - ARM Linux" , Rabeeh Khoury , Daniel Mack , "Jean-Francois Moine" , "Lars-Peter Clausen" , Guenter Roeck , Michal Bachraty , Marek Belisko , devicetree-discuss@lists.ozlabs.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org References: <1367144681-14248-1-git-send-email-sebastian.hesselbarth@gmail.com> In-Reply-To: <1367144681-14248-1-git-send-email-sebastian.hesselbarth@gmail.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201304282003.26593.arnd@arndb.de> X-Provags-ID: V02:K0:nbtvSx+HbnITcxK2sEOUvdUd45SeR58ImCH0O0ua8I/ FJVaXjZyJDlAAr194UTZxCio+J9KsF9XwG8dNsITQMOpCKVnmJ WAIq7sqkT2WU8dBji330nvdl5UcNkvrMK5BvZ0vpOkgU9+jyv9 UxIePw7ZwAMilKw1iIFEhG1TkNbgV8bsaYIld5M0JVc+WibnWB eAqq6WuAjLHL1voPjqCGjjGFVnwv5h8wwwS01Ln2TuGS9kmmeJ b9cdbjs+3gswcGtvjcq4LwEx2eyeibq2lms2gI1Oc0de1JGyhJ UjqszZGt+8pz6aTCc4Awhv7OcenSmUb4K265DjBva8qsBquwqY VY235pKW5Ylr61lwRo5U= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1127 Lines: 30 On Sunday 28 April 2013, Sebastian Hesselbarth wrote: > diff --git a/drivers/clk/clk-si5351.c b/drivers/clk/clk-si5351.c > index 8323c31..91c0f01 100644 > --- a/drivers/clk/clk-si5351.c > +++ b/drivers/clk/clk-si5351.c > @@ -1489,12 +1489,14 @@ static int si5351_i2c_probe(struct i2c_client *client, > } > } > > +#ifdef CONFIG_OF > ret = of_clk_add_provider(client->dev.of_node, of_clk_src_onecell_get, > &drvdata->onecell); > if (ret) { > dev_err(&client->dev, "unable to add clk provider\n"); > return ret; > } > +#endif > I think we should instead make of_clk_add_provider return 0 if CONFIG_OF is disabled, adn we don't consider it an error condition to call it. That is also what we return when CONFIG_OF is enabled and we boot without a device tree. Arnd -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/