diff options
-rw-r--r-- | drivers/usb/class/usbtmc.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/usb/class/usbtmc.c b/drivers/usb/class/usbtmc.c index 66c4001306f0..09de131ee0cb 100644 --- a/drivers/usb/class/usbtmc.c +++ b/drivers/usb/class/usbtmc.c | |||
@@ -899,7 +899,7 @@ err_out: | |||
899 | } | 899 | } |
900 | 900 | ||
901 | #define capability_attribute(name) \ | 901 | #define capability_attribute(name) \ |
902 | static ssize_t show_##name(struct device *dev, \ | 902 | static ssize_t name##_show(struct device *dev, \ |
903 | struct device_attribute *attr, char *buf) \ | 903 | struct device_attribute *attr, char *buf) \ |
904 | { \ | 904 | { \ |
905 | struct usb_interface *intf = to_usb_interface(dev); \ | 905 | struct usb_interface *intf = to_usb_interface(dev); \ |
@@ -907,7 +907,7 @@ static ssize_t show_##name(struct device *dev, \ | |||
907 | \ | 907 | \ |
908 | return sprintf(buf, "%d\n", data->capabilities.name); \ | 908 | return sprintf(buf, "%d\n", data->capabilities.name); \ |
909 | } \ | 909 | } \ |
910 | static DEVICE_ATTR(name, S_IRUGO, show_##name, NULL) | 910 | static DEVICE_ATTR_RO(name) |
911 | 911 | ||
912 | capability_attribute(interface_capabilities); | 912 | capability_attribute(interface_capabilities); |
913 | capability_attribute(device_capabilities); | 913 | capability_attribute(device_capabilities); |
@@ -926,7 +926,7 @@ static struct attribute_group capability_attr_grp = { | |||
926 | .attrs = capability_attrs, | 926 | .attrs = capability_attrs, |
927 | }; | 927 | }; |
928 | 928 | ||
929 | static ssize_t show_TermChar(struct device *dev, | 929 | static ssize_t TermChar_show(struct device *dev, |
930 | struct device_attribute *attr, char *buf) | 930 | struct device_attribute *attr, char *buf) |
931 | { | 931 | { |
932 | struct usb_interface *intf = to_usb_interface(dev); | 932 | struct usb_interface *intf = to_usb_interface(dev); |
@@ -935,7 +935,7 @@ static ssize_t show_TermChar(struct device *dev, | |||
935 | return sprintf(buf, "%c\n", data->TermChar); | 935 | return sprintf(buf, "%c\n", data->TermChar); |
936 | } | 936 | } |
937 | 937 | ||
938 | static ssize_t store_TermChar(struct device *dev, | 938 | static ssize_t TermChar_store(struct device *dev, |
939 | struct device_attribute *attr, | 939 | struct device_attribute *attr, |
940 | const char *buf, size_t count) | 940 | const char *buf, size_t count) |
941 | { | 941 | { |
@@ -947,10 +947,10 @@ static ssize_t store_TermChar(struct device *dev, | |||
947 | data->TermChar = buf[0]; | 947 | data->TermChar = buf[0]; |
948 | return count; | 948 | return count; |
949 | } | 949 | } |
950 | static DEVICE_ATTR(TermChar, S_IRUGO, show_TermChar, store_TermChar); | 950 | static DEVICE_ATTR_RW(TermChar); |
951 | 951 | ||
952 | #define data_attribute(name) \ | 952 | #define data_attribute(name) \ |
953 | static ssize_t show_##name(struct device *dev, \ | 953 | static ssize_t name##_show(struct device *dev, \ |
954 | struct device_attribute *attr, char *buf) \ | 954 | struct device_attribute *attr, char *buf) \ |
955 | { \ | 955 | { \ |
956 | struct usb_interface *intf = to_usb_interface(dev); \ | 956 | struct usb_interface *intf = to_usb_interface(dev); \ |
@@ -958,7 +958,7 @@ static ssize_t show_##name(struct device *dev, \ | |||
958 | \ | 958 | \ |
959 | return sprintf(buf, "%d\n", data->name); \ | 959 | return sprintf(buf, "%d\n", data->name); \ |
960 | } \ | 960 | } \ |
961 | static ssize_t store_##name(struct device *dev, \ | 961 | static ssize_t name##_store(struct device *dev, \ |
962 | struct device_attribute *attr, \ | 962 | struct device_attribute *attr, \ |
963 | const char *buf, size_t count) \ | 963 | const char *buf, size_t count) \ |
964 | { \ | 964 | { \ |
@@ -976,7 +976,7 @@ static ssize_t store_##name(struct device *dev, \ | |||
976 | else \ | 976 | else \ |
977 | return count; \ | 977 | return count; \ |
978 | } \ | 978 | } \ |
979 | static DEVICE_ATTR(name, S_IRUGO, show_##name, store_##name) | 979 | static DEVICE_ATTR_RW(name) |
980 | 980 | ||
981 | data_attribute(TermCharEnabled); | 981 | data_attribute(TermCharEnabled); |
982 | data_attribute(auto_abort); | 982 | data_attribute(auto_abort); |