Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 289186
b: refs/heads/master
c: 4fee7e1
h: refs/heads/master
v: v3
  • Loading branch information
Lars-Peter Clausen authored and Greg Kroah-Hartman committed Mar 7, 2012
1 parent 9e921af commit 87922c4
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 28 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 624b225035b24e9d7c22cc214f449fc2ec2491c9
refs/heads/master: 4fee7e168ba08ed067ee9aafe4a0a19387117be4
54 changes: 27 additions & 27 deletions trunk/drivers/staging/iio/industrialio-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -227,33 +227,6 @@ static void iio_device_unregister_debugfs(struct iio_dev *indio_dev)
debugfs_remove_recursive(indio_dev->debugfs_dentry);
}

static ssize_t iio_read_channel_ext_info(struct device *dev,
struct device_attribute *attr,
char *buf)
{
struct iio_dev *indio_dev = dev_get_drvdata(dev);
struct iio_dev_attr *this_attr = to_iio_dev_attr(attr);
const struct iio_chan_spec_ext_info *ext_info;

ext_info = &this_attr->c->ext_info[this_attr->address];

return ext_info->read(indio_dev, this_attr->c, buf);
}

static ssize_t iio_write_channel_ext_info(struct device *dev,
struct device_attribute *attr,
const char *buf,
size_t len)
{
struct iio_dev *indio_dev = dev_get_drvdata(dev);
struct iio_dev_attr *this_attr = to_iio_dev_attr(attr);
const struct iio_chan_spec_ext_info *ext_info;

ext_info = &this_attr->c->ext_info[this_attr->address];

return ext_info->write(indio_dev, this_attr->c, buf, len);
}

static int iio_device_register_debugfs(struct iio_dev *indio_dev)
{
struct dentry *d;
Expand Down Expand Up @@ -297,6 +270,33 @@ static void iio_device_unregister_debugfs(struct iio_dev *indio_dev)
}
#endif /* CONFIG_DEBUG_FS */

static ssize_t iio_read_channel_ext_info(struct device *dev,
struct device_attribute *attr,
char *buf)
{
struct iio_dev *indio_dev = dev_get_drvdata(dev);
struct iio_dev_attr *this_attr = to_iio_dev_attr(attr);
const struct iio_chan_spec_ext_info *ext_info;

ext_info = &this_attr->c->ext_info[this_attr->address];

return ext_info->read(indio_dev, this_attr->c, buf);
}

static ssize_t iio_write_channel_ext_info(struct device *dev,
struct device_attribute *attr,
const char *buf,
size_t len)
{
struct iio_dev *indio_dev = dev_get_drvdata(dev);
struct iio_dev_attr *this_attr = to_iio_dev_attr(attr);
const struct iio_chan_spec_ext_info *ext_info;

ext_info = &this_attr->c->ext_info[this_attr->address];

return ext_info->write(indio_dev, this_attr->c, buf, len);
}

static ssize_t iio_read_channel_info(struct device *dev,
struct device_attribute *attr,
char *buf)
Expand Down

0 comments on commit 87922c4

Please sign in to comment.