On 06/07/11 10:00, Michael Hennerich wrote: > Hi Jonathan, > > I wonder if naming IIO_IN_DIFF in-in is really a good idea. > Declaring the attribute in a conventional fashion doesn't work. > > static IIO_DEVICE_ATTR(in-in_scale_available, S_IRUGO, \ > ad7793_show_scale_available, NULL, 0); Yup, that's why we have IIO_DEVICE_ATTR_NAMED. static IIO_DEVICE_ATTR_NAMED(in_m_in_scale_available, in-in_scale_available, S_IRUGO, ad7793_show_scale_available, NULL, 0) should give you an iio_dev_attr_in_m_in_scale_available to use in the attribute table. It will show up in sysfs as in-in_scale_available. > > static struct attribute *ad7793_attributes[] = { > &iio_dev_attr_sampling_frequency.dev_attr.attr, > &iio_const_attr_sampling_frequency_available.dev_attr.attr, > &iio_dev_attr_in-in_scale_available.dev_attr.attr, > NULL > }; > > drivers/staging/iio/adc/ad7793.c:681: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘-’ token > drivers/staging/iio/adc/ad7793.c:688: error: ‘iio_dev_attr_in’ undeclared here (not in a function) > drivers/staging/iio/adc/ad7793.c:688: error: ‘in_scale_available’ undeclared here (not in a function) > -- 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