mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
usb: misc: usbled: fixed coding style issues
Fixed multiple coding style issues Signed-off-by: Zack Parsons <k3bacon@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
53e77df25f
commit
ea83586395
1 changed files with 14 additions and 11 deletions
|
@ -113,14 +113,16 @@ static void change_color(struct usb_led *led)
|
|||
}
|
||||
|
||||
#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_led *led = usb_get_intfdata(intf); \
|
||||
\
|
||||
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_led *led = usb_get_intfdata(intf); \
|
||||
|
@ -135,7 +137,8 @@ show_set(blue);
|
|||
show_set(red);
|
||||
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_led *dev = NULL;
|
||||
|
|
Loading…
Add table
Reference in a new issue