}
#define create_show_channel_attribute(val) \
- static MOST_CHNL_ATTR(val, S_IRUGO, show_##val, NULL)
+ static MOST_CHNL_ATTR(val, 0444, show_##val, NULL)
create_show_channel_attribute(available_directions);
create_show_channel_attribute(available_datatypes);
}
#define create_channel_attribute(value) \
- static MOST_CHNL_ATTR(value, S_IRUGO | S_IWUSR, \
- show_##value, \
- store_##value)
+ static MOST_CHNL_ATTR(value, 0644, show_##value, store_##value)
create_channel_attribute(set_buffer_size);
create_channel_attribute(set_number_of_buffers);
}
#define create_inst_attribute(value) \
- static MOST_INST_ATTR(value, S_IRUGO, show_##value, NULL)
+ static MOST_INST_ATTR(value, 0444, show_##value, NULL)
create_inst_attribute(description);
create_inst_attribute(interface);
kfree(aim_obj);
}
-static ssize_t show_add_link(struct most_aim_obj *aim_obj,
+static ssize_t add_link_show(struct most_aim_obj *aim_obj,
struct most_aim_attribute *attr,
char *buf)
{
* (1) would create the device node /dev/my_rxchannel
* (2) would create the device node /dev/mdev1-ep81
*/
-static ssize_t store_add_link(struct most_aim_obj *aim_obj,
+static ssize_t add_link_store(struct most_aim_obj *aim_obj,
struct most_aim_attribute *attr,
const char *buf,
size_t len)
}
static struct most_aim_attribute most_aim_attr_add_link =
- __ATTR(add_link, S_IRUGO | S_IWUSR, show_add_link, store_add_link);
+ __ATTR_RW(add_link);
/**
* store_remove_link - store function for remove_link attribute
* Example:
* echo "mdev0:ep81" >remove_link
*/
-static ssize_t store_remove_link(struct most_aim_obj *aim_obj,
+static ssize_t remove_link_store(struct most_aim_obj *aim_obj,
struct most_aim_attribute *attr,
const char *buf,
size_t len)
}
static struct most_aim_attribute most_aim_attr_remove_link =
- __ATTR(remove_link, S_IWUSR, NULL, store_remove_link);
+ __ATTR_WO(remove_link);
static struct attribute *most_aim_def_attrs[] = {
&most_aim_attr_add_link.attr,