Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ea835863 authored by Zack Parsons's avatar Zack Parsons Committed by Greg Kroah-Hartman
Browse files

usb: misc: usbled: fixed coding style issues



Fixed multiple coding style issues

Signed-off-by: default avatarZack Parsons <k3bacon@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 53e77df2
Loading
Loading
Loading
Loading
+14 −11
Original line number Original line Diff line number Diff line
@@ -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);			\
@@ -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;