aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/core/uverbs_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/infiniband/core/uverbs_main.c')
-rw-r--r--drivers/infiniband/core/uverbs_main.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/infiniband/core/uverbs_main.c b/drivers/infiniband/core/uverbs_main.c
index 60879399207a..d805cf365c8d 100644
--- a/drivers/infiniband/core/uverbs_main.c
+++ b/drivers/infiniband/core/uverbs_main.c
@@ -691,13 +691,8 @@ static ssize_t show_dev_abi_version(struct device *device,
691} 691}
692static DEVICE_ATTR(abi_version, S_IRUGO, show_dev_abi_version, NULL); 692static DEVICE_ATTR(abi_version, S_IRUGO, show_dev_abi_version, NULL);
693 693
694static ssize_t show_abi_version(struct class *class, 694static CLASS_ATTR_STRING(abi_version, S_IRUGO,
695 struct class_attribute *attr, 695 __stringify(IB_USER_VERBS_ABI_VERSION));
696 char *buf)
697{
698 return sprintf(buf, "%d\n", IB_USER_VERBS_ABI_VERSION);
699}
700static CLASS_ATTR(abi_version, S_IRUGO, show_abi_version, NULL);
701 696
702static dev_t overflow_maj; 697static dev_t overflow_maj;
703static DECLARE_BITMAP(overflow_map, IB_UVERBS_MAX_DEVICES); 698static DECLARE_BITMAP(overflow_map, IB_UVERBS_MAX_DEVICES);
@@ -843,7 +838,7 @@ static int __init ib_uverbs_init(void)
843 goto out_chrdev; 838 goto out_chrdev;
844 } 839 }
845 840
846 ret = class_create_file(uverbs_class, &class_attr_abi_version); 841 ret = class_create_file(uverbs_class, &class_attr_abi_version.attr);
847 if (ret) { 842 if (ret) {
848 printk(KERN_ERR "user_verbs: couldn't create abi_version attribute\n"); 843 printk(KERN_ERR "user_verbs: couldn't create abi_version attribute\n");
849 goto out_class; 844 goto out_class;