Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 219926
b: refs/heads/master
c: fc89b38
h: refs/heads/master
v: v3
  • Loading branch information
Jonathan Cameron authored and Greg Kroah-Hartman committed Sep 21, 2010
1 parent b1e25be commit 71bf401
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 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: 44f270de711dcaf595786f2318b36f9b4f007338
refs/heads/master: fc89b38db00ced7859cb5cb5c8c8007d2f14ca31
15 changes: 12 additions & 3 deletions trunk/drivers/staging/iio/ring_generic.h
Original file line number Diff line number Diff line change
Expand Up @@ -243,12 +243,13 @@ ssize_t iio_scan_el_ts_show(struct device *dev, struct device_attribute *attr,
.number = _number, \
.label = _label, \
.set_state = _controlfunc, \
}
}; \
static IIO_CONST_ATTR(_name##_index, #_number)

#define IIO_SCAN_EL_C(_name, _number, _label, _controlfunc) \
__IIO_SCAN_EL_C(_name, _number, _label, _controlfunc)

#define __IIO_SCAN_NAMED_EL_C(_name, _string, _number, _label, _cf) \
#define __IIO_SCAN_NAMED_EL_C(_name, _string, _number, _label, _cf) \
struct iio_scan_el iio_scan_el_##_name = { \
.dev_attr = __ATTR(_number##_##_string##_en, \
S_IRUGO | S_IWUSR, \
Expand All @@ -257,7 +258,14 @@ ssize_t iio_scan_el_ts_show(struct device *dev, struct device_attribute *attr,
.number = _number, \
.label = _label, \
.set_state = _cf, \
}; \
static struct iio_const_attr iio_const_attr_##_name##_index = { \
.string = #_number, \
.dev_attr = __ATTR(_string##_index, \
S_IRUGO, iio_read_const_attr, NULL) \
}


#define IIO_SCAN_NAMED_EL_C(_name, _string, _number, _label, _cf) \
__IIO_SCAN_NAMED_EL_C(_name, _string, _number, _label, _cf)
/**
Expand All @@ -272,7 +280,8 @@ ssize_t iio_scan_el_ts_show(struct device *dev, struct device_attribute *attr,
S_IRUGO | S_IWUSR, \
iio_scan_el_ts_show, \
iio_scan_el_ts_store), \
}
}; \
static IIO_CONST_ATTR(timestamp_index, #number)

/**
* IIO_CONST_ATTR_SCAN_EL_TYPE - attr to specify the data format of a scan el
Expand Down

0 comments on commit 71bf401

Please sign in to comment.