On 01/02/2012 06:25 PM, Jonathan Cameron wrote: > Trivial usecase in which just having two different attr > groups covers all options. Slightly more code, but a simpler > to follow result. > > static int __devinit ad9834_probe(struct spi_device *spi) > { > struct ad9834_platform_data *pdata = spi->dev.platform_data; > @@ -344,7 +347,10 @@ static int __devinit ad9834_probe(struct spi_device *spi) > st->reg = reg; > indio_dev->dev.parent = &spi->dev; > indio_dev->name = spi_get_device_id(spi)->name; > - indio_dev->info = &ad9834_info; > + if ((st->devid == ID_AD9833) || (st->devid == ID_AD9837)) Maybe use a switch statement. > + indio_dev->info = &ad9833_info; > + else > + indio_dev->info = &ad9834_info; > indio_dev->modes = INDIO_DIRECT_MODE; > > /* Setup default messages */ -- To unsubscribe from this list: send the line "unsubscribe linux-iio" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html