Commit 2e4bd50f authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

[PATCH] USB: fix up compiler warnings and other stuff in the emi62 driver.

parent 6ef4be17
...@@ -97,7 +97,7 @@ static int emi62_load_firmware (struct usb_device *dev) ...@@ -97,7 +97,7 @@ static int emi62_load_firmware (struct usb_device *dev)
__u32 addr; /* Address to write */ __u32 addr; /* Address to write */
__u8 *buf; __u8 *buf;
printk("adi-emi: load_firmware\n"); dev_dbg(&dev->dev, "load_firmware\n");
buf = kmalloc(FW_LOAD_SIZE, GFP_KERNEL); buf = kmalloc(FW_LOAD_SIZE, GFP_KERNEL);
if (!buf) { if (!buf) {
err( "%s - error loading firmware: error = %d", __FUNCTION__, -ENOMEM); err( "%s - error loading firmware: error = %d", __FUNCTION__, -ENOMEM);
...@@ -235,7 +235,7 @@ static int emi62_load_firmware (struct usb_device *dev) ...@@ -235,7 +235,7 @@ static int emi62_load_firmware (struct usb_device *dev)
wraperr: wraperr:
kfree(buf); kfree(buf);
printk("adi-emi: Error\n"); dev_err(&dev->dev, "Error\n");
return err; return err;
} }
...@@ -249,7 +249,7 @@ MODULE_DEVICE_TABLE (usb, id_table); ...@@ -249,7 +249,7 @@ MODULE_DEVICE_TABLE (usb, id_table);
static int emi62_probe(struct usb_interface *intf, const struct usb_device_id *id) static int emi62_probe(struct usb_interface *intf, const struct usb_device_id *id)
{ {
struct usb_device *dev = interface_to_usbdev(intf); struct usb_device *dev = interface_to_usbdev(intf);
printk ("adi-emi: emi62_probe\n"); dev_dbg(&intf->dev, "emi62_probe\n");
info("%s start", __FUNCTION__); info("%s start", __FUNCTION__);
...@@ -275,11 +275,11 @@ struct usb_driver emi62_driver = { ...@@ -275,11 +275,11 @@ struct usb_driver emi62_driver = {
static int __init emi62_init (void) static int __init emi62_init (void)
{ {
if (usb_register (&emi62_driver) < 0) { int retval;
printk("adi-emi: registration failed\n"); retval = usb_register (&emi62_driver);
} else { if (retval)
return 0; printk(KERN_ERR "adi-emi: registration failed\n");
} return retval;
} }
static void __exit emi62_exit (void) static void __exit emi62_exit (void)
......
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment