Lines Matching refs:iio_attr
1431 struct iio_dev_attr *iio_attr; in iio_buffer_wrap_attr() local
1433 iio_attr = kzalloc(sizeof(*iio_attr), GFP_KERNEL); in iio_buffer_wrap_attr()
1434 if (!iio_attr) in iio_buffer_wrap_attr()
1437 iio_attr->buffer = buffer; in iio_buffer_wrap_attr()
1438 memcpy(&iio_attr->dev_attr, dattr, sizeof(iio_attr->dev_attr)); in iio_buffer_wrap_attr()
1439 iio_attr->dev_attr.attr.name = kstrdup_const(attr->name, GFP_KERNEL); in iio_buffer_wrap_attr()
1440 if (!iio_attr->dev_attr.attr.name) { in iio_buffer_wrap_attr()
1441 kfree(iio_attr); in iio_buffer_wrap_attr()
1445 sysfs_attr_init(&iio_attr->dev_attr.attr); in iio_buffer_wrap_attr()
1447 list_add(&iio_attr->l, &buffer->buffer_attr_list); in iio_buffer_wrap_attr()
1449 return &iio_attr->dev_attr.attr; in iio_buffer_wrap_attr()