* - move reset into open to clean out spurious data
*/
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/init.h>
interface = usb_find_interface (&tower_driver, subminor);
if (!interface) {
- printk(KERN_ERR "%s - error, can't find device for minor %d\n",
- __func__, subminor);
+ pr_err("error, can't find device for minor %d\n", subminor);
retval = -ENODEV;
goto exit;
}
/* verify that the device wasn't unplugged */
if (dev->udev == NULL) {
retval = -ENODEV;
- printk(KERN_ERR "legousbtower: No device or device unplugged %d\n", retval);
+ pr_err("No device or device unplugged %d\n", retval);
goto unlock_exit;
}
/* verify that the device wasn't unplugged */
if (dev->udev == NULL) {
retval = -ENODEV;
- printk(KERN_ERR "legousbtower: No device or device unplugged %d\n", retval);
+ pr_err("No device or device unplugged %d\n", retval);
goto unlock_exit;
}
dev_dbg(&dev->udev->dev, "%s: received %d bytes\n",
__func__, urb->actual_length);
} else {
- printk(KERN_WARNING "%s: read_buffer overflow, %d bytes dropped", __func__, urb->actual_length);
+ pr_warn("read_buffer overflow, %d bytes dropped\n",
+ urb->actual_length);
}
spin_unlock (&dev->read_buffer_lock);
}