Re: [PATCH 2/3] ASoC: cs4234: Add support for Cirrus Logic CS4234 codec

From: Mark Brown
Date: Fri Sep 25 2020 - 12:42:26 EST


On Fri, Sep 25, 2020 at 11:59:07AM +0100, Richard Fitzgerald wrote:

This looks very good, a couple of small nits below which should be easy
to address:

> @@ -282,7 +283,6 @@ config SND_SOC_ALL_CODECS
> uses them is also built since they are only usable with a machine
> driver. Selecting this option will allow these drivers to be built
> without an explicit machine driver for test and development purposes.
> -
> Support for the bus types used to access the codecs to be built must
> be selected separately.
>

Unrelated whitespace change.

> +static int cs4234_i2c_remove(struct i2c_client *i2c_client)
> +{
> + struct cs4234 *cs4234 = i2c_get_clientdata(i2c_client);
> +
> + pm_runtime_disable(&i2c_client->dev);
> + cs4234_shutdown(cs4234);

You used devm_snd_soc_register_component() which means that you won't
unregister utill after this force powered down the device which isn't
great - you should use snd_soc_register_component() and manually
unregister here before force powering the device down.

Attachment: signature.asc
Description: PGP signature