[alsa-devel] [PATCH 1/2] ASoC: wm8580: Fix build error

Mark Brown broonie at kernel.org
Fri Jan 24 13:16:38 CET 2014


On Fri, Jan 24, 2014 at 05:22:35PM +0530, Sachin Kamat wrote:
> On 24 January 2014 16:40, Mark Brown <broonie at kernel.org> wrote:
> > On Fri, Jan 24, 2014 at 02:09:24PM +0530, Sachin Kamat wrote:

> >> +#if IS_ENABLED(CONFIG_I2C)
> >> +static const char *wm8580_supply_names[WM8580_NUM_SUPPLIES] = {
> >> +     "AVDD",
> >> +     "DVDD",
> >> +     "PVDD",
> >> +};

> > This is obviously not sensible - the device doesn't suddenly stop
> > needing power if it is using SPI.

> This structure is being used only in wm8580_i2c_probe which is guarded
> by IS_ENABLED(CONFIG_I2C).
> Do you mean the existing implementation is wrong or we just need to
> move it out of the #if?

Think about what the code is doing - obviously there is a problem with
the existing code here but this is not a good fix for it.  Like I say
it's not very likely that the device only requires power when used with
I2C, it would be better to fix the fact that the driver is only using
regulators for I2C.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20140124/87b26f42/attachment.sig>


More information about the Alsa-devel mailing list