]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/usb/misc/trancevibrator.c
USB: remove info() macro from usb/misc drivers
[linux-2.6-omap-h63xx.git] / drivers / usb / misc / trancevibrator.c
index 67e2fc20eeeb29d8381dddea4588318630725273..2e14102955c5936def7394c9faea1306696f18bb 100644 (file)
@@ -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);
@@ -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;
        }
@@ -142,7 +144,8 @@ static int __init tv_init(void)
                return retval;
        }
 
-       info(DRIVER_VERSION ":" DRIVER_DESC);
+       printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":"
+              DRIVER_DESC "\n");
        return 0;
 }