diff options
Diffstat (limited to 'c08.patch')
| -rw-r--r-- | c08.patch | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/c08.patch b/c08.patch new file mode 100644 index 00000000000000..abad94ba615bc2 --- /dev/null +++ b/c08.patch @@ -0,0 +1,77 @@ +--- + drivers/block/osdblk.c | 32 ++++++++++++++++---------------- + 1 file changed, 16 insertions(+), 16 deletions(-) + +--- a/drivers/block/osdblk.c ++++ b/drivers/block/osdblk.c +@@ -468,9 +468,8 @@ static void class_osdblk_release(struct + kfree(cls); + } + +-static ssize_t class_osdblk_list(struct class *c, +- struct class_attribute *attr, +- char *data) ++static ssize_t list_show(struct class *c, struct class_attribute *attr, ++ char *data) + { + int n = 0; + struct list_head *tmp; +@@ -493,10 +492,10 @@ static ssize_t class_osdblk_list(struct + mutex_unlock(&ctl_mutex); + return n; + } ++static CLASS_ATTR_RO(list); + +-static ssize_t class_osdblk_add(struct class *c, +- struct class_attribute *attr, +- const char *buf, size_t count) ++static ssize_t add_store(struct class *c, struct class_attribute *attr, ++ const char *buf, size_t count) + { + struct osdblk_device *osdev; + ssize_t rc; +@@ -587,11 +586,10 @@ err_out_mod: + module_put(THIS_MODULE); + return rc; + } ++static CLASS_ATTR_WO(add); + +-static ssize_t class_osdblk_remove(struct class *c, +- struct class_attribute *attr, +- const char *buf, +- size_t count) ++static ssize_t remove_store(struct class *c, struct class_attribute *attr, ++ const char *buf, size_t count) + { + struct osdblk_device *osdev = NULL; + int target_id, rc; +@@ -635,13 +633,15 @@ static ssize_t class_osdblk_remove(struc + + return count; + } ++static CLASS_ATTR_WO(remove); + +-static struct class_attribute class_osdblk_attrs[] = { +- __ATTR(add, 0200, NULL, class_osdblk_add), +- __ATTR(remove, 0200, NULL, class_osdblk_remove), +- __ATTR(list, 0444, class_osdblk_list, NULL), +- __ATTR_NULL ++static struct attribute *class_osdblk_attrs[] = { ++ &class_attr_list.attr, ++ &class_attr_remove.attr, ++ &class_attr_list.attr, ++ NULL, + }; ++ATTRIBUTE_GROUPS(class_osdblk); + + static int osdblk_sysfs_init(void) + { +@@ -658,7 +658,7 @@ static int osdblk_sysfs_init(void) + class_osdblk->name = DRV_NAME; + class_osdblk->owner = THIS_MODULE; + class_osdblk->class_release = class_osdblk_release; +- class_osdblk->class_attrs = class_osdblk_attrs; ++ class_osdblk->class_groups = class_osdblk_groups; + + ret = class_register(class_osdblk); + if (ret) { |
