Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 220399
b: refs/heads/master
c: bd384c2
h: refs/heads/master
i:
  220397: 60ebb38
  220395: 3919132
  220391: f526ad1
  220383: 17ec498
v: v3
  • Loading branch information
Gustavo Silva authored and Greg Kroah-Hartman committed Oct 19, 2010
1 parent a3e583b commit ce30ef0
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 28 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c694ed85eab4e7966cd83fca509ce27494e3e296
refs/heads/master: bd384c2722428498669840db44c6a7aafab54c29
54 changes: 27 additions & 27 deletions trunk/drivers/staging/frontier/tranzport.c
Original file line number Diff line number Diff line change
Expand Up @@ -174,37 +174,37 @@ static void usb_tranzport_abort_transfers(struct usb_tranzport *dev)
usb_kill_urb(dev->interrupt_out_urb);
}

#define show_int(value) \
static ssize_t show_##value(struct device *dev, \
#define show_int(value) \
static ssize_t show_##value(struct device *dev, \
struct device_attribute *attr, char *buf) \
{ \
struct usb_interface *intf = to_usb_interface(dev); \
struct usb_tranzport *t = usb_get_intfdata(intf); \
return sprintf(buf, "%d\n", t->value); \
} \
static DEVICE_ATTR(value, S_IRUGO, show_##value, NULL);

#define show_set_int(value) \
static ssize_t show_##value(struct device *dev, \
{ \
struct usb_interface *intf = to_usb_interface(dev); \
struct usb_tranzport *t = usb_get_intfdata(intf); \
return sprintf(buf, "%d\n", t->value); \
} \
static DEVICE_ATTR(value, S_IRUGO, show_##value, NULL);

#define show_set_int(value) \
static ssize_t show_##value(struct device *dev, \
struct device_attribute *attr, char *buf) \
{ \
struct usb_interface *intf = to_usb_interface(dev); \
struct usb_tranzport *t = usb_get_intfdata(intf); \
return sprintf(buf, "%d\n", t->value); \
} \
static ssize_t set_##value(struct device *dev, \
{ \
struct usb_interface *intf = to_usb_interface(dev); \
struct usb_tranzport *t = usb_get_intfdata(intf); \
return sprintf(buf, "%d\n", t->value); \
} \
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_tranzport *t = usb_get_intfdata(intf); \
unsigned long temp; \
if (strict_strtoul(buf, 10, &temp)) \
return -EINVAL; \
t->value = temp; \
return count; \
} \
static DEVICE_ATTR(value, S_IWUGO | S_IRUGO, show_##value, set_##value);
{ \
struct usb_interface *intf = to_usb_interface(dev); \
struct usb_tranzport *t = usb_get_intfdata(intf); \
unsigned long temp; \
if (strict_strtoul(buf, 10, &temp)) \
return -EINVAL; \
t->value = temp; \
return count; \
} \
static DEVICE_ATTR(value, S_IWUGO | S_IRUGO, show_##value, set_##value);

show_int(enable);
show_int(offline);
Expand Down

0 comments on commit ce30ef0

Please sign in to comment.