Re: [alsa-devel] [Device-drivers-devel] [PATCH] Add driver forAnalog Devices ADAU1701 SigmaDSP

From: Mark Brown
Date: Mon Mar 07 2011 - 06:44:15 EST


On Sun, Mar 06, 2011 at 09:44:49PM -0500, Mike Frysinger wrote:
> On Sun, Mar 6, 2011 at 20:11, <cliff.cai@xxxxxxxxxx> wrote:

> > +static u32 adau1701_read_register(struct snd_soc_codec *codec,
> > + ?? ?? ?? u16 reg_address, u8 length)
> > +{

> this func has "u32" for ret, and you return the raw register value
> below. but here you try returning -EIO. shouldnt it be "int" so the
> caller can check for "< 0" ?

This is the interface we have, unfortuantely. It's not ideal but it'd
be a complete pain to change it and the actual benefit in production is
questionable given our lack of options for dealing with them in typical
systems beyond moaning in logs.

> > +struct snd_soc_dai_driver adau1701_dai = {
> > + ?? ?? ?? .name = "ADAU1701",

> i think the standard is to use all lower case

Typically, yes.

> > +MODULE_DESCRIPTION("ASoC ADAU1701 SigmaDSP driver");
> > +MODULE_AUTHOR("Cliff Cai");
> > +MODULE_LICENSE("GPL");

> MODULE_ALIAS() ?

That's not needed for I2C devices, it's handled by MODULE_DEVICE_TABLE()
for I2C.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/