Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 86062
b: refs/heads/master
c: 0cc5e2e
h: refs/heads/master
v: v3
  • Loading branch information
Oliver Neukum authored and Greg Kroah-Hartman committed Feb 21, 2008
1 parent 7c3cf39 commit 2cbc047
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 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: efa66f14e2d1aaad8ad7e1664d768de74ffb665b
refs/heads/master: 0cc5e2e7c3edd8b45775f50c74738d61b43ac5e8
4 changes: 3 additions & 1 deletion trunk/drivers/usb/misc/trancevibrator.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,14 @@ static ssize_t set_speed(struct device *dev, struct device_attribute *attr,
{
struct usb_interface *intf = to_usb_interface(dev);
struct trancevibrator *tv = usb_get_intfdata(intf);
int temp, retval;
int temp, retval, old;

temp = simple_strtoul(buf, NULL, 10);
if (temp > 255)
temp = 255;
else if (temp < 0)
temp = 0;
old = tv->speed;
tv->speed = temp;

dev_dbg(&tv->udev->dev, "speed = %d\n", tv->speed);
Expand All @@ -77,6 +78,7 @@ static ssize_t set_speed(struct device *dev, struct device_attribute *attr,
tv->speed, /* speed value */
0, NULL, 0, USB_CTRL_GET_TIMEOUT);
if (retval) {
tv->speed = old;
dev_dbg(&tv->udev->dev, "retval = %d\n", retval);
return retval;
}
Expand Down

0 comments on commit 2cbc047

Please sign in to comment.