diff options
| author | Yani Ioannou <yani.ioannou@gmail.com> | 2005-05-17 06:43:37 -0400 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@suse.de> | 2005-06-20 18:15:35 -0400 |
| commit | 10523b3b82456e416cbaffcc24ea2246980aa746 (patch) | |
| tree | fab3ac16bffb04cc25683e83a583b1cae3f0d450 /drivers/usb/core | |
| parent | 3fd3c0a5f53a0f9d8987b90acbd84f7dd8ef606e (diff) | |
[PATCH] Driver Core: drivers/s390/net/qeth_sys.c - drivers/usb/gadget/pxa2xx_udc.c: update device attribute callbacks
Signed-off-by: Yani Ioannou <yani.ioannou@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/core')
| -rw-r--r-- | drivers/usb/core/sysfs.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/usb/core/sysfs.c b/drivers/usb/core/sysfs.c index 4d0c9e65cd03..c1b8e690c1d3 100644 --- a/drivers/usb/core/sysfs.c +++ b/drivers/usb/core/sysfs.c | |||
| @@ -24,7 +24,7 @@ | |||
| 24 | 24 | ||
| 25 | /* Active configuration fields */ | 25 | /* Active configuration fields */ |
| 26 | #define usb_actconfig_show(field, multiplier, format_string) \ | 26 | #define usb_actconfig_show(field, multiplier, format_string) \ |
| 27 | static ssize_t show_##field (struct device *dev, char *buf) \ | 27 | static ssize_t show_##field (struct device *dev, struct device_attribute *attr, char *buf) \ |
| 28 | { \ | 28 | { \ |
| 29 | struct usb_device *udev; \ | 29 | struct usb_device *udev; \ |
| 30 | struct usb_host_config *actconfig; \ | 30 | struct usb_host_config *actconfig; \ |
| @@ -46,7 +46,7 @@ usb_actconfig_attr (bNumInterfaces, 1, "%2d\n") | |||
| 46 | usb_actconfig_attr (bmAttributes, 1, "%2x\n") | 46 | usb_actconfig_attr (bmAttributes, 1, "%2x\n") |
| 47 | usb_actconfig_attr (bMaxPower, 2, "%3dmA\n") | 47 | usb_actconfig_attr (bMaxPower, 2, "%3dmA\n") |
| 48 | 48 | ||
| 49 | static ssize_t show_configuration_string(struct device *dev, char *buf) | 49 | static ssize_t show_configuration_string(struct device *dev, struct device_attribute *attr, char *buf) |
| 50 | { | 50 | { |
| 51 | struct usb_device *udev; | 51 | struct usb_device *udev; |
| 52 | struct usb_host_config *actconfig; | 52 | struct usb_host_config *actconfig; |
| @@ -69,7 +69,7 @@ static DEVICE_ATTR(configuration, S_IRUGO, show_configuration_string, NULL); | |||
| 69 | usb_actconfig_show(bConfigurationValue, 1, "%u\n"); | 69 | usb_actconfig_show(bConfigurationValue, 1, "%u\n"); |
| 70 | 70 | ||
| 71 | static ssize_t | 71 | static ssize_t |
| 72 | set_bConfigurationValue (struct device *dev, const char *buf, size_t count) | 72 | set_bConfigurationValue (struct device *dev, struct device_attribute *attr, const char *buf, size_t count) |
| 73 | { | 73 | { |
| 74 | struct usb_device *udev = udev = to_usb_device (dev); | 74 | struct usb_device *udev = udev = to_usb_device (dev); |
| 75 | int config, value; | 75 | int config, value; |
| @@ -87,7 +87,7 @@ static DEVICE_ATTR(bConfigurationValue, S_IRUGO | S_IWUSR, | |||
| 87 | 87 | ||
| 88 | /* String fields */ | 88 | /* String fields */ |
| 89 | #define usb_string_attr(name) \ | 89 | #define usb_string_attr(name) \ |
| 90 | static ssize_t show_##name(struct device *dev, char *buf) \ | 90 | static ssize_t show_##name(struct device *dev, struct device_attribute *attr, char *buf) \ |
| 91 | { \ | 91 | { \ |
| 92 | struct usb_device *udev; \ | 92 | struct usb_device *udev; \ |
| 93 | int len; \ | 93 | int len; \ |
| @@ -107,7 +107,7 @@ usb_string_attr(manufacturer); | |||
| 107 | usb_string_attr(serial); | 107 | usb_string_attr(serial); |
| 108 | 108 | ||
| 109 | static ssize_t | 109 | static ssize_t |
| 110 | show_speed (struct device *dev, char *buf) | 110 | show_speed (struct device *dev, struct device_attribute *attr, char *buf) |
| 111 | { | 111 | { |
| 112 | struct usb_device *udev; | 112 | struct usb_device *udev; |
| 113 | char *speed; | 113 | char *speed; |
| @@ -133,7 +133,7 @@ show_speed (struct device *dev, char *buf) | |||
| 133 | static DEVICE_ATTR(speed, S_IRUGO, show_speed, NULL); | 133 | static DEVICE_ATTR(speed, S_IRUGO, show_speed, NULL); |
| 134 | 134 | ||
| 135 | static ssize_t | 135 | static ssize_t |
| 136 | show_devnum (struct device *dev, char *buf) | 136 | show_devnum (struct device *dev, struct device_attribute *attr, char *buf) |
| 137 | { | 137 | { |
| 138 | struct usb_device *udev; | 138 | struct usb_device *udev; |
| 139 | 139 | ||
| @@ -143,7 +143,7 @@ show_devnum (struct device *dev, char *buf) | |||
| 143 | static DEVICE_ATTR(devnum, S_IRUGO, show_devnum, NULL); | 143 | static DEVICE_ATTR(devnum, S_IRUGO, show_devnum, NULL); |
| 144 | 144 | ||
| 145 | static ssize_t | 145 | static ssize_t |
| 146 | show_version (struct device *dev, char *buf) | 146 | show_version (struct device *dev, struct device_attribute *attr, char *buf) |
| 147 | { | 147 | { |
| 148 | struct usb_device *udev; | 148 | struct usb_device *udev; |
| 149 | u16 bcdUSB; | 149 | u16 bcdUSB; |
| @@ -155,7 +155,7 @@ show_version (struct device *dev, char *buf) | |||
| 155 | static DEVICE_ATTR(version, S_IRUGO, show_version, NULL); | 155 | static DEVICE_ATTR(version, S_IRUGO, show_version, NULL); |
| 156 | 156 | ||
| 157 | static ssize_t | 157 | static ssize_t |
| 158 | show_maxchild (struct device *dev, char *buf) | 158 | show_maxchild (struct device *dev, struct device_attribute *attr, char *buf) |
| 159 | { | 159 | { |
| 160 | struct usb_device *udev; | 160 | struct usb_device *udev; |
| 161 | 161 | ||
| @@ -167,7 +167,7 @@ static DEVICE_ATTR(maxchild, S_IRUGO, show_maxchild, NULL); | |||
| 167 | /* Descriptor fields */ | 167 | /* Descriptor fields */ |
| 168 | #define usb_descriptor_attr_le16(field, format_string) \ | 168 | #define usb_descriptor_attr_le16(field, format_string) \ |
| 169 | static ssize_t \ | 169 | static ssize_t \ |
| 170 | show_##field (struct device *dev, char *buf) \ | 170 | show_##field (struct device *dev, struct device_attribute *attr, char *buf) \ |
| 171 | { \ | 171 | { \ |
| 172 | struct usb_device *udev; \ | 172 | struct usb_device *udev; \ |
| 173 | \ | 173 | \ |
| @@ -183,7 +183,7 @@ usb_descriptor_attr_le16(bcdDevice, "%04x\n") | |||
| 183 | 183 | ||
| 184 | #define usb_descriptor_attr(field, format_string) \ | 184 | #define usb_descriptor_attr(field, format_string) \ |
| 185 | static ssize_t \ | 185 | static ssize_t \ |
| 186 | show_##field (struct device *dev, char *buf) \ | 186 | show_##field (struct device *dev, struct device_attribute *attr, char *buf) \ |
| 187 | { \ | 187 | { \ |
| 188 | struct usb_device *udev; \ | 188 | struct usb_device *udev; \ |
| 189 | \ | 189 | \ |
| @@ -254,7 +254,7 @@ void usb_remove_sysfs_dev_files (struct usb_device *udev) | |||
| 254 | /* Interface fields */ | 254 | /* Interface fields */ |
| 255 | #define usb_intf_attr(field, format_string) \ | 255 | #define usb_intf_attr(field, format_string) \ |
| 256 | static ssize_t \ | 256 | static ssize_t \ |
| 257 | show_##field (struct device *dev, char *buf) \ | 257 | show_##field (struct device *dev, struct device_attribute *attr, char *buf) \ |
| 258 | { \ | 258 | { \ |
| 259 | struct usb_interface *intf = to_usb_interface (dev); \ | 259 | struct usb_interface *intf = to_usb_interface (dev); \ |
| 260 | \ | 260 | \ |
| @@ -269,7 +269,7 @@ usb_intf_attr (bInterfaceClass, "%02x\n") | |||
| 269 | usb_intf_attr (bInterfaceSubClass, "%02x\n") | 269 | usb_intf_attr (bInterfaceSubClass, "%02x\n") |
| 270 | usb_intf_attr (bInterfaceProtocol, "%02x\n") | 270 | usb_intf_attr (bInterfaceProtocol, "%02x\n") |
| 271 | 271 | ||
| 272 | static ssize_t show_interface_string(struct device *dev, char *buf) | 272 | static ssize_t show_interface_string(struct device *dev, struct device_attribute *attr, char *buf) |
| 273 | { | 273 | { |
| 274 | struct usb_interface *intf; | 274 | struct usb_interface *intf; |
| 275 | struct usb_device *udev; | 275 | struct usb_device *udev; |
