static ssize_t iio_bfin_tmr_frequency_store(struct device *dev,
struct device_attribute *attr, const char *buf, size_t count)
{
- struct iio_trigger *trig = dev_get_drvdata(dev);
+ struct iio_trigger *trig = to_iio_trigger(dev);
struct bfin_tmr_state *st = trig->private_data;
long val;
int ret;
struct device_attribute *attr,
char *buf)
{
- struct iio_trigger *trig = dev_get_drvdata(dev);
+ struct iio_trigger *trig = to_iio_trigger(dev);
struct bfin_tmr_state *st = trig->private_data;
return sprintf(buf, "%lu\n",
struct device_attribute *attr,
char *buf)
{
- struct iio_trigger *trig = dev_get_drvdata(dev);
+ struct iio_trigger *trig = to_iio_trigger(dev);
struct iio_prtc_trigger_info *trig_info = trig->private_data;
return sprintf(buf, "%u\n", trig_info->frequency);
}
const char *buf,
size_t len)
{
- struct iio_trigger *trig = dev_get_drvdata(dev);
+ struct iio_trigger *trig = to_iio_trigger(dev);
struct iio_prtc_trigger_info *trig_info = trig->private_data;
unsigned long val;
int ret;
static ssize_t iio_sysfs_trigger_poll(struct device *dev,
struct device_attribute *attr, const char *buf, size_t count)
{
- struct iio_trigger *trig = dev_get_drvdata(dev);
+ struct iio_trigger *trig = to_iio_trigger(dev);
iio_trigger_poll_chained(trig, 0);
return count;