Staging: frontier: fix coding style issues in tranzport.c
This is a patch to the tranzport.c file that fixes up the following issue WARNING: please, no space for starting a line x 23 Signed-off-by: Gustavo Silva <silvagustavo@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
c694ed85ea
commit
bd384c2722
|
@ -174,37 +174,37 @@ static void usb_tranzport_abort_transfers(struct usb_tranzport *dev)
|
||||||
usb_kill_urb(dev->interrupt_out_urb);
|
usb_kill_urb(dev->interrupt_out_urb);
|
||||||
}
|
}
|
||||||
|
|
||||||
#define show_int(value) \
|
#define show_int(value) \
|
||||||
static ssize_t show_##value(struct device *dev, \
|
static ssize_t show_##value(struct device *dev, \
|
||||||
struct device_attribute *attr, char *buf) \
|
struct device_attribute *attr, char *buf) \
|
||||||
{ \
|
{ \
|
||||||
struct usb_interface *intf = to_usb_interface(dev); \
|
struct usb_interface *intf = to_usb_interface(dev); \
|
||||||
struct usb_tranzport *t = usb_get_intfdata(intf); \
|
struct usb_tranzport *t = usb_get_intfdata(intf); \
|
||||||
return sprintf(buf, "%d\n", t->value); \
|
return sprintf(buf, "%d\n", t->value); \
|
||||||
} \
|
} \
|
||||||
static DEVICE_ATTR(value, S_IRUGO, show_##value, NULL);
|
static DEVICE_ATTR(value, S_IRUGO, show_##value, NULL);
|
||||||
|
|
||||||
#define show_set_int(value) \
|
#define show_set_int(value) \
|
||||||
static ssize_t show_##value(struct device *dev, \
|
static ssize_t show_##value(struct device *dev, \
|
||||||
struct device_attribute *attr, char *buf) \
|
struct device_attribute *attr, char *buf) \
|
||||||
{ \
|
{ \
|
||||||
struct usb_interface *intf = to_usb_interface(dev); \
|
struct usb_interface *intf = to_usb_interface(dev); \
|
||||||
struct usb_tranzport *t = usb_get_intfdata(intf); \
|
struct usb_tranzport *t = usb_get_intfdata(intf); \
|
||||||
return sprintf(buf, "%d\n", t->value); \
|
return sprintf(buf, "%d\n", t->value); \
|
||||||
} \
|
} \
|
||||||
static ssize_t set_##value(struct device *dev, \
|
static ssize_t set_##value(struct device *dev, \
|
||||||
struct device_attribute *attr, \
|
struct device_attribute *attr, \
|
||||||
const char *buf, size_t count) \
|
const char *buf, size_t count) \
|
||||||
{ \
|
{ \
|
||||||
struct usb_interface *intf = to_usb_interface(dev); \
|
struct usb_interface *intf = to_usb_interface(dev); \
|
||||||
struct usb_tranzport *t = usb_get_intfdata(intf); \
|
struct usb_tranzport *t = usb_get_intfdata(intf); \
|
||||||
unsigned long temp; \
|
unsigned long temp; \
|
||||||
if (strict_strtoul(buf, 10, &temp)) \
|
if (strict_strtoul(buf, 10, &temp)) \
|
||||||
return -EINVAL; \
|
return -EINVAL; \
|
||||||
t->value = temp; \
|
t->value = temp; \
|
||||||
return count; \
|
return count; \
|
||||||
} \
|
} \
|
||||||
static DEVICE_ATTR(value, S_IWUGO | S_IRUGO, show_##value, set_##value);
|
static DEVICE_ATTR(value, S_IWUGO | S_IRUGO, show_##value, set_##value);
|
||||||
|
|
||||||
show_int(enable);
|
show_int(enable);
|
||||||
show_int(offline);
|
show_int(offline);
|
||||||
|
|
Loading…
Reference in a new issue