On Sun, 22 Mar 2020 23:17:07 +0200 Andy Shevchenko <andy.shevchenko@xxxxxxxxx> wrote: > On Sun, Mar 22, 2020 at 7:17 PM Jonathan Cameron <jic23@xxxxxxxxxx> wrote: > > > > On Tue, 17 Mar 2020 12:18:10 +0200 > > Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> wrote: > > > > > Use the IIO_DEVICE_ATTR_RO macro to create the device attributes. > > > > > > Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> > > > > Hmm. Minor gain but fair enough I guess. > > > > Could consider using the core support _available attributes instead. > > > > I'm not usually fussy about moving drivers over to that unless we have > > an in kernel consumer, but if you are going to touch the code it > > might be nice to move to them :) > > Any good driver as an example? Or even conversion change done for one? > Grep read_avail and you will find a few. drivers/iio/light/tsl2772.c looks superficially similar to what would be needed here. Jonathan