[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <554277F3.7060500@gmail.com>
Date: Thu, 30 Apr 2015 20:44:03 +0200
From: Sebastian Hesselbarth <sebastian.hesselbarth@...il.com>
To: Michael Welling <mwelling@...e.org>,
Fabio Estevam <festevam@...il.com>
CC: Jean-Francois Moine <moinejf@...e.fr>,
Mike Turquette <mturquette@...aro.org>,
Stephen Boyd <sboyd@...eaurora.org>,
linux-kernel <linux-kernel@...r.kernel.org>,
Russell King <rmk+linux@....linux.org.uk>,
linux-clk@...r.kernel.org,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH 3/4] clk: si5351: Do not pass struct clk in platform_data
On 30.04.2015 20:30, Michael Welling wrote:
> On Thu, Apr 30, 2015 at 03:20:38PM -0300, Fabio Estevam wrote:
>> On Thu, Apr 30, 2015 at 2:45 PM, Sebastian Hesselbarth
>> <sebastian.hesselbarth@...il.com> wrote:
>>> @@ -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.
Fabio,
Michael is right, the check is for bailing out if none of the parent
clocks is available.
But thanks for looking at it and I appreciate the review.
Sebastian
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists