Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 268393
b: refs/heads/master
c: cedd1a1
h: refs/heads/master
i:
  268391: effc4e3
v: v3
  • Loading branch information
Jonathan Cameron authored and Greg Kroah-Hartman committed Sep 16, 2011
1 parent da358d3 commit 4ceabd6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 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: 322c95636739420631e51f3d3f24132dc220762a
refs/heads/master: cedd1a16bbe00456fb9abda237e9b1c2bc763edd
15 changes: 8 additions & 7 deletions trunk/drivers/staging/iio/adc/ad7606_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,9 @@ static ssize_t ad7606_store_range(struct device *dev,
return count;
}

static IIO_DEVICE_ATTR(range, S_IRUGO | S_IWUSR, \
static IIO_DEVICE_ATTR(in_voltage_range, S_IRUGO | S_IWUSR, \
ad7606_show_range, ad7606_store_range, 0);
static IIO_CONST_ATTR(range_available, "5000 10000");
static IIO_CONST_ATTR(in_voltage_range_available, "5000 10000");

static ssize_t ad7606_show_oversampling_ratio(struct device *dev,
struct device_attribute *attr, char *buf)
Expand Down Expand Up @@ -198,8 +198,8 @@ static IIO_DEVICE_ATTR(oversampling_ratio, S_IRUGO | S_IWUSR,
static IIO_CONST_ATTR(oversampling_ratio_available, "0 2 4 8 16 32 64");

static struct attribute *ad7606_attributes[] = {
&iio_dev_attr_range.dev_attr.attr,
&iio_const_attr_range_available.dev_attr.attr,
&iio_dev_attr_in_voltage_range.dev_attr.attr,
&iio_const_attr_in_voltage_range_available.dev_attr.attr,
&iio_dev_attr_oversampling_ratio.dev_attr.attr,
&iio_const_attr_oversampling_ratio_available.dev_attr.attr,
NULL,
Expand All @@ -220,9 +220,10 @@ static mode_t ad7606_attr_is_visible(struct kobject *kobj,
&iio_const_attr_oversampling_ratio_available.dev_attr.attr))
mode = 0;
else if (!st->have_range &&
(attr == &iio_dev_attr_range.dev_attr.attr ||
attr == &iio_const_attr_range_available.dev_attr.attr))
mode = 0;
(attr == &iio_dev_attr_in_voltage_range.dev_attr.attr ||
attr ==
&iio_const_attr_in_voltage_range_available.dev_attr.attr))
mode = 0;

return mode;
}
Expand Down

0 comments on commit 4ceabd6

Please sign in to comment.