lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJzqFtbxKJirP9=hzHzQ=6KM=OayPmEDhJfkSx25DH4fu-gVgg@mail.gmail.com>
Date:	Mon, 20 Apr 2015 13:56:46 -0700
From:	Kevin Cernekee <cernekee@...omium.org>
To:	Lars-Peter Clausen <lars@...afoo.de>
Cc:	lgirdwood@...il.com, broonie@...nel.org,
	devicetree@...r.kernel.org, alsa-devel@...a-project.org,
	Andrew Bresticker <abrestic@...omium.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	dgreid@...omium.org, Olof Johansson <olofj@...omium.org>
Subject: Re: [alsa-devel] [PATCH 2/3] ASoC: tas571x: New driver for TI TAS571x
 power amplifiers

On Thu, Apr 16, 2015 at 5:57 AM, Lars-Peter Clausen <lars@...afoo.de> wrote:
> On 04/15/2015 11:42 PM, Kevin Cernekee wrote:
>>
>> Introduce a new codec driver for the Texas Instruments
>> TAS5711/TAS5717/TAS5719 power amplifier chips.  These chips are typically
>> used to take an I2S digital audio input and drive 10-20W into a pair of
>> speakers.
>>
>> Signed-off-by: Kevin Cernekee <cernekee@...omium.org>
>
>
> Looks pretty good. Comments inlune.

Thanks for the review.  I'm working on a V2 incorporating the feedback
from you and Mark.

>> +static int tas571x_i2c_probe(struct i2c_client *client,
>> +                            const struct i2c_device_id *id)
>> +{
>> +       struct tas571x_private *priv;
>> +       struct device *dev = &client->dev;
>> +       int i;
>> +
>> +       priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
>> +       if (!priv)
>> +               return -ENOMEM;
>> +       i2c_set_clientdata(client, priv);
>> +
>> +       priv->mclk = devm_clk_get(dev, "mclk");
>> +       if (PTR_ERR(priv->mclk) == -EPROBE_DEFER)
>> +               return -EPROBE_DEFER;
>
>
> If you want to make the clock optional use
>
>         if (PTR_ERR(priv->mclk) == -ENOENT)
>                 return PTR_ERR(priv->mclk);
>
> This makes sure that the case where the clock is specified, but there is a
> error with the specification (e.g. incorrect DT cells) is handled properly.

Did you mean:

>         if (PTR_ERR(priv->mclk) != -ENOENT)
>                 return PTR_ERR(priv->mclk);

I don't see this in other codec drivers, but I do see the explicit
EPROBE_DEFER check in max98090, max98095, pcm512x, and wm8960.
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ