dahdi: Replace drv_attr with drv_groups on kernels > 3.12.
drv_attrs was fully removed from the bus structure in upstream commit e18945b159a1cdbc031f1d3b0b7e515a33bdcbf7 which was merged into 3.13. This is necessary to compile dahdi against linux version 3.13. Signed-off-by: Shaun Ruffell <sruffell@digium.com>
This commit is contained in:
parent
6bcc70a421
commit
f5d3b35d7b
@ -251,19 +251,31 @@ static ssize_t master_span_store(struct device_driver *driver, const char *buf,
|
|||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0)
|
||||||
static struct driver_attribute dahdi_attrs[] = {
|
static struct driver_attribute dahdi_attrs[] = {
|
||||||
__ATTR(master_span, S_IRUGO | S_IWUSR, master_span_show,
|
__ATTR(master_span, S_IRUGO | S_IWUSR, master_span_show,
|
||||||
master_span_store),
|
master_span_store),
|
||||||
__ATTR_NULL,
|
__ATTR_NULL,
|
||||||
};
|
};
|
||||||
|
#else
|
||||||
|
static DRIVER_ATTR_RW(master_span);
|
||||||
|
static struct attribute *dahdi_attrs[] = {
|
||||||
|
&driver_attr_master_span.attr,
|
||||||
|
NULL,
|
||||||
|
};
|
||||||
|
ATTRIBUTE_GROUPS(dahdi);
|
||||||
|
#endif
|
||||||
|
|
||||||
static struct bus_type spans_bus_type = {
|
static struct bus_type spans_bus_type = {
|
||||||
.name = "dahdi_spans",
|
.name = "dahdi_spans",
|
||||||
.match = span_match,
|
.match = span_match,
|
||||||
.uevent = span_uevent,
|
.uevent = span_uevent,
|
||||||
.dev_attrs = span_dev_attrs,
|
.dev_attrs = span_dev_attrs,
|
||||||
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0)
|
||||||
.drv_attrs = dahdi_attrs,
|
.drv_attrs = dahdi_attrs,
|
||||||
|
#else
|
||||||
|
.drv_groups = dahdi_groups,
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
static int span_probe(struct device *dev)
|
static int span_probe(struct device *dev)
|
||||||
|
Loading…
Reference in New Issue
Block a user