Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752624AbbD3Sax (ORCPT ); Thu, 30 Apr 2015 14:30:53 -0400 Received: from mail-ie0-f176.google.com ([209.85.223.176]:36133 "EHLO mail-ie0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751085AbbD3Sau (ORCPT ); Thu, 30 Apr 2015 14:30:50 -0400 Date: Thu, 30 Apr 2015 13:30:43 -0500 From: Michael Welling To: Fabio Estevam Cc: Sebastian Hesselbarth , Jean-Francois Moine , Mike Turquette , Stephen Boyd , linux-kernel , Russell King , linux-clk@vger.kernel.org, "linux-arm-kernel@lists.infradead.org" Subject: Re: [PATCH 3/4] clk: si5351: Do not pass struct clk in platform_data Message-ID: <20150430183043.GA21890@deathray> References: <1430415954-29517-1-git-send-email-sebastian.hesselbarth@gmail.com> <1430415954-29517-4-git-send-email-sebastian.hesselbarth@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1379 Lines: 33 On Thu, Apr 30, 2015 at 03:20:38PM -0300, Fabio Estevam wrote: > On Thu, Apr 30, 2015 at 2:45 PM, Sebastian Hesselbarth > wrote: > > > * property silabs,pll-source : , [<..>] > > * allow to selectively set pll source > > @@ -1328,8 +1321,17 @@ static int si5351_i2c_probe(struct i2c_client *client, > > i2c_set_clientdata(client, drvdata); > > drvdata->client = client; > > drvdata->variant = variant; > > - drvdata->pxtal = pdata->clk_xtal; > > - drvdata->pclkin = pdata->clk_clkin; > > + drvdata->pxtal = devm_clk_get(&client->dev, "xtal"); > > + drvdata->pclkin = devm_clk_get(&client->dev, "clkin"); > > + > > + if (PTR_ERR(drvdata->pxtal) == -EPROBE_DEFER || > > + PTR_ERR(drvdata->pclkin) == -EPROBE_DEFER) > > + return -EPROBE_DEFER; > > + > > + if (IS_ERR(drvdata->pxtal) && IS_ERR(drvdata->pclkin)) { > > Don't you want || instead? I doubt it. He is checking if both are not available. The driver could work with only one of them. If you use || then you assume to need both. -- 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/