Loading drivers/usb/misc/usbled.c +14 −11 Original line number Original line Diff line number Diff line Loading @@ -113,14 +113,16 @@ static void change_color(struct usb_led *led) } } #define show_set(value) \ #define show_set(value) \ static ssize_t show_##value(struct device *dev, struct device_attribute *attr, char *buf) \ static ssize_t show_##value(struct device *dev, struct device_attribute *attr,\ char *buf) \ { \ { \ struct usb_interface *intf = to_usb_interface(dev); \ struct usb_interface *intf = to_usb_interface(dev); \ struct usb_led *led = usb_get_intfdata(intf); \ struct usb_led *led = usb_get_intfdata(intf); \ \ \ return sprintf(buf, "%d\n", led->value); \ return sprintf(buf, "%d\n", led->value); \ } \ } \ static ssize_t set_##value(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) \ static ssize_t set_##value(struct device *dev, struct device_attribute *attr,\ const char *buf, size_t count) \ { \ { \ struct usb_interface *intf = to_usb_interface(dev); \ struct usb_interface *intf = to_usb_interface(dev); \ struct usb_led *led = usb_get_intfdata(intf); \ struct usb_led *led = usb_get_intfdata(intf); \ Loading @@ -135,7 +137,8 @@ show_set(blue); show_set(red); show_set(red); show_set(green); show_set(green); static int led_probe(struct usb_interface *interface, const struct usb_device_id *id) static int led_probe(struct usb_interface *interface, const struct usb_device_id *id) { { struct usb_device *udev = interface_to_usbdev(interface); struct usb_device *udev = interface_to_usbdev(interface); struct usb_led *dev = NULL; struct usb_led *dev = NULL; Loading Loading
drivers/usb/misc/usbled.c +14 −11 Original line number Original line Diff line number Diff line Loading @@ -113,14 +113,16 @@ static void change_color(struct usb_led *led) } } #define show_set(value) \ #define show_set(value) \ static ssize_t show_##value(struct device *dev, struct device_attribute *attr, char *buf) \ static ssize_t show_##value(struct device *dev, struct device_attribute *attr,\ char *buf) \ { \ { \ struct usb_interface *intf = to_usb_interface(dev); \ struct usb_interface *intf = to_usb_interface(dev); \ struct usb_led *led = usb_get_intfdata(intf); \ struct usb_led *led = usb_get_intfdata(intf); \ \ \ return sprintf(buf, "%d\n", led->value); \ return sprintf(buf, "%d\n", led->value); \ } \ } \ static ssize_t set_##value(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) \ static ssize_t set_##value(struct device *dev, struct device_attribute *attr,\ const char *buf, size_t count) \ { \ { \ struct usb_interface *intf = to_usb_interface(dev); \ struct usb_interface *intf = to_usb_interface(dev); \ struct usb_led *led = usb_get_intfdata(intf); \ struct usb_led *led = usb_get_intfdata(intf); \ Loading @@ -135,7 +137,8 @@ show_set(blue); show_set(red); show_set(red); show_set(green); show_set(green); static int led_probe(struct usb_interface *interface, const struct usb_device_id *id) static int led_probe(struct usb_interface *interface, const struct usb_device_id *id) { { struct usb_device *udev = interface_to_usbdev(interface); struct usb_device *udev = interface_to_usbdev(interface); struct usb_led *dev = NULL; struct usb_led *dev = NULL; Loading