]> git.karo-electronics.de Git - karo-tx-linux.git/commit
staging: iio: cdc: ad7746: implement IIO_CHAN_INFO_SAMP_FREQ
authorEva Rachel Retuya <eraretuya@gmail.com>
Mon, 10 Oct 2016 10:01:31 +0000 (18:01 +0800)
committerJonathan Cameron <jic23@kernel.org>
Sun, 23 Oct 2016 18:28:04 +0000 (19:28 +0100)
commit2296c0623eb741d4985b4fbd5c2c8e48a2795d2a
treea3dc1abf719a63d38442c3cfc8103d5535a952c4
parent6572389bcc1121b4e4112632e289a57a1136989d
staging: iio: cdc: ad7746: implement IIO_CHAN_INFO_SAMP_FREQ

This driver predates the availability of IIO_CHAN_INFO_SAMP_FREQ
attribute wherein usage has some advantages like it can be accessed by
in-kernel consumers as well as reduces the code size.

Therefore, use IIO_CHAN_INFO_SAMP_FREQ to implement the
sampling_frequency attribute instead of using IIO_DEVICE_ATTR() macro.

Move code from the functions associated with IIO_DEVICE_ATTR() into
respective read and write hooks with the mask set to
IIO_CHAN_INFO_SAMP_FREQ.

Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/staging/iio/cdc/ad7746.c