diff options
| -rw-r--r-- | drivers/usb/misc/adutux.c | 17 | ||||
| -rw-r--r-- | drivers/usb/misc/appledisplay.c | 24 | ||||
| -rw-r--r-- | drivers/usb/misc/cypress_cy7c63.c | 6 | ||||
| -rw-r--r-- | drivers/usb/misc/cytherm.c | 6 | ||||
| -rw-r--r-- | drivers/usb/misc/emi26.c | 13 |
5 files changed, 37 insertions, 29 deletions
diff --git a/drivers/usb/misc/adutux.c b/drivers/usb/misc/adutux.c index 92f58ccc8fb..7b6922e08ed 100644 --- a/drivers/usb/misc/adutux.c +++ b/drivers/usb/misc/adutux.c | |||
| @@ -283,8 +283,8 @@ static int adu_open(struct inode *inode, struct file *file) | |||
| 283 | 283 | ||
| 284 | interface = usb_find_interface(&adu_driver, subminor); | 284 | interface = usb_find_interface(&adu_driver, subminor); |
| 285 | if (!interface) { | 285 | if (!interface) { |
| 286 | err("%s - error, can't find device for minor %d", | 286 | printk(KERN_ERR "adutux: %s - error, can't find device for " |
| 287 | __func__, subminor); | 287 | "minor %d\n", __func__, subminor); |
| 288 | retval = -ENODEV; | 288 | retval = -ENODEV; |
| 289 | goto exit_no_device; | 289 | goto exit_no_device; |
| 290 | } | 290 | } |
| @@ -416,7 +416,8 @@ static ssize_t adu_read(struct file *file, __user char *buffer, size_t count, | |||
| 416 | /* verify that the device wasn't unplugged */ | 416 | /* verify that the device wasn't unplugged */ |
| 417 | if (dev->udev == NULL) { | 417 | if (dev->udev == NULL) { |
| 418 | retval = -ENODEV; | 418 | retval = -ENODEV; |
| 419 | err("No device or device unplugged %d", retval); | 419 | printk(KERN_ERR "adutux: No device or device unplugged %d\n", |
| 420 | retval); | ||
| 420 | goto exit; | 421 | goto exit; |
| 421 | } | 422 | } |
| 422 | 423 | ||
| @@ -576,7 +577,8 @@ static ssize_t adu_write(struct file *file, const __user char *buffer, | |||
| 576 | /* verify that the device wasn't unplugged */ | 577 | /* verify that the device wasn't unplugged */ |
| 577 | if (dev->udev == NULL) { | 578 | if (dev->udev == NULL) { |
| 578 | retval = -ENODEV; | 579 | retval = -ENODEV; |
| 579 | err("No device or device unplugged %d", retval); | 580 | printk(KERN_ERR "adutux: No device or device unplugged %d\n", |
| 581 | retval); | ||
| 580 | goto exit; | 582 | goto exit; |
| 581 | } | 583 | } |
| 582 | 584 | ||
| @@ -645,7 +647,8 @@ static ssize_t adu_write(struct file *file, const __user char *buffer, | |||
| 645 | retval = usb_submit_urb(dev->interrupt_out_urb, GFP_KERNEL); | 647 | retval = usb_submit_urb(dev->interrupt_out_urb, GFP_KERNEL); |
| 646 | if (retval < 0) { | 648 | if (retval < 0) { |
| 647 | dev->out_urb_finished = 1; | 649 | dev->out_urb_finished = 1; |
| 648 | err("Couldn't submit interrupt_out_urb %d", retval); | 650 | dev_err(&dev->udev->dev, "Couldn't submit " |
| 651 | "interrupt_out_urb %d\n", retval); | ||
| 649 | goto exit; | 652 | goto exit; |
| 650 | } | 653 | } |
| 651 | 654 | ||
| @@ -890,8 +893,8 @@ static int __init adu_init(void) | |||
| 890 | /* register this driver with the USB subsystem */ | 893 | /* register this driver with the USB subsystem */ |
| 891 | result = usb_register(&adu_driver); | 894 | result = usb_register(&adu_driver); |
| 892 | if (result < 0) { | 895 | if (result < 0) { |
| 893 | err("usb_register failed for the "__FILE__" driver. " | 896 | printk(KERN_ERR "usb_register failed for the "__FILE__ |
| 894 | "Error number %d", result); | 897 | " driver. Error number %d\n", result); |
| 895 | goto exit; | 898 | goto exit; |
| 896 | } | 899 | } |
| 897 | 900 | ||
diff --git a/drivers/usb/misc/appledisplay.c b/drivers/usb/misc/appledisplay.c index 71d672ea122..1d8e39a557d 100644 --- a/drivers/usb/misc/appledisplay.c +++ b/drivers/usb/misc/appledisplay.c | |||
| @@ -130,7 +130,8 @@ static void appledisplay_complete(struct urb *urb) | |||
| 130 | exit: | 130 | exit: |
| 131 | retval = usb_submit_urb(pdata->urb, GFP_ATOMIC); | 131 | retval = usb_submit_urb(pdata->urb, GFP_ATOMIC); |
| 132 | if (retval) { | 132 | if (retval) { |
| 133 | err("%s - usb_submit_urb failed with result %d", | 133 | dev_err(&pdata->udev->dev, |
| 134 | "%s - usb_submit_urb failed with result %d\n", | ||
| 134 | __func__, retval); | 135 | __func__, retval); |
| 135 | } | 136 | } |
| 136 | } | 137 | } |
| @@ -220,7 +221,7 @@ static int appledisplay_probe(struct usb_interface *iface, | |||
| 220 | } | 221 | } |
| 221 | } | 222 | } |
| 222 | if (!int_in_endpointAddr) { | 223 | if (!int_in_endpointAddr) { |
| 223 | err("Could not find int-in endpoint"); | 224 | dev_err(&iface->dev, "Could not find int-in endpoint\n"); |
| 224 | return -EIO; | 225 | return -EIO; |
| 225 | } | 226 | } |
| 226 | 227 | ||
| @@ -228,7 +229,7 @@ static int appledisplay_probe(struct usb_interface *iface, | |||
| 228 | pdata = kzalloc(sizeof(struct appledisplay), GFP_KERNEL); | 229 | pdata = kzalloc(sizeof(struct appledisplay), GFP_KERNEL); |
| 229 | if (!pdata) { | 230 | if (!pdata) { |
| 230 | retval = -ENOMEM; | 231 | retval = -ENOMEM; |
| 231 | err("Out of memory"); | 232 | dev_err(&iface->dev, "Out of memory\n"); |
| 232 | goto error; | 233 | goto error; |
| 233 | } | 234 | } |
| 234 | 235 | ||
| @@ -241,8 +242,8 @@ static int appledisplay_probe(struct usb_interface *iface, | |||
| 241 | pdata->msgdata = kmalloc(ACD_MSG_BUFFER_LEN, GFP_KERNEL); | 242 | pdata->msgdata = kmalloc(ACD_MSG_BUFFER_LEN, GFP_KERNEL); |
| 242 | if (!pdata->msgdata) { | 243 | if (!pdata->msgdata) { |
| 243 | retval = -ENOMEM; | 244 | retval = -ENOMEM; |
| 244 | err("appledisplay: Allocating buffer for control messages " | 245 | dev_err(&iface->dev, |
| 245 | "failed"); | 246 | "Allocating buffer for control messages failed\n"); |
| 246 | goto error; | 247 | goto error; |
| 247 | } | 248 | } |
| 248 | 249 | ||
| @@ -250,7 +251,7 @@ static int appledisplay_probe(struct usb_interface *iface, | |||
| 250 | pdata->urb = usb_alloc_urb(0, GFP_KERNEL); | 251 | pdata->urb = usb_alloc_urb(0, GFP_KERNEL); |
| 251 | if (!pdata->urb) { | 252 | if (!pdata->urb) { |
| 252 | retval = -ENOMEM; | 253 | retval = -ENOMEM; |
| 253 | err("appledisplay: Allocating URB failed"); | 254 | dev_err(&iface->dev, "Allocating URB failed\n"); |
| 254 | goto error; | 255 | goto error; |
| 255 | } | 256 | } |
| 256 | 257 | ||
| @@ -259,7 +260,7 @@ static int appledisplay_probe(struct usb_interface *iface, | |||
| 259 | GFP_KERNEL, &pdata->urb->transfer_dma); | 260 | GFP_KERNEL, &pdata->urb->transfer_dma); |
| 260 | if (!pdata->urbdata) { | 261 | if (!pdata->urbdata) { |
| 261 | retval = -ENOMEM; | 262 | retval = -ENOMEM; |
| 262 | err("appledisplay: Allocating URB buffer failed"); | 263 | dev_err(&iface->dev, "Allocating URB buffer failed\n"); |
| 263 | goto error; | 264 | goto error; |
| 264 | } | 265 | } |
| 265 | 266 | ||
| @@ -270,7 +271,7 @@ static int appledisplay_probe(struct usb_interface *iface, | |||
| 270 | pdata, 1); | 271 | pdata, 1); |
| 271 | if (usb_submit_urb(pdata->urb, GFP_KERNEL)) { | 272 | if (usb_submit_urb(pdata->urb, GFP_KERNEL)) { |
| 272 | retval = -EIO; | 273 | retval = -EIO; |
| 273 | err("appledisplay: Submitting URB failed"); | 274 | dev_err(&iface->dev, "Submitting URB failed\n"); |
| 274 | goto error; | 275 | goto error; |
| 275 | } | 276 | } |
| 276 | 277 | ||
| @@ -280,7 +281,7 @@ static int appledisplay_probe(struct usb_interface *iface, | |||
| 280 | pdata->bd = backlight_device_register(bl_name, NULL, pdata, | 281 | pdata->bd = backlight_device_register(bl_name, NULL, pdata, |
| 281 | &appledisplay_bl_data); | 282 | &appledisplay_bl_data); |
| 282 | if (IS_ERR(pdata->bd)) { | 283 | if (IS_ERR(pdata->bd)) { |
| 283 | err("appledisplay: Backlight registration failed"); | 284 | dev_err(&iface->dev, "Backlight registration failed\n"); |
| 284 | goto error; | 285 | goto error; |
| 285 | } | 286 | } |
| 286 | 287 | ||
| @@ -291,7 +292,8 @@ static int appledisplay_probe(struct usb_interface *iface, | |||
| 291 | 292 | ||
| 292 | if (brightness < 0) { | 293 | if (brightness < 0) { |
| 293 | retval = brightness; | 294 | retval = brightness; |
| 294 | err("appledisplay: Error while getting initial brightness: %d", retval); | 295 | dev_err(&iface->dev, |
| 296 | "Error while getting initial brightness: %d\n", retval); | ||
| 295 | goto error; | 297 | goto error; |
| 296 | } | 298 | } |
| 297 | 299 | ||
| @@ -352,7 +354,7 @@ static int __init appledisplay_init(void) | |||
| 352 | { | 354 | { |
| 353 | wq = create_singlethread_workqueue("appledisplay"); | 355 | wq = create_singlethread_workqueue("appledisplay"); |
| 354 | if (!wq) { | 356 | if (!wq) { |
| 355 | err("Could not create work queue\n"); | 357 | printk(KERN_ERR "appledisplay: Could not create work queue\n"); |
| 356 | return -ENOMEM; | 358 | return -ENOMEM; |
| 357 | } | 359 | } |
| 358 | 360 | ||
diff --git a/drivers/usb/misc/cypress_cy7c63.c b/drivers/usb/misc/cypress_cy7c63.c index 937940404b7..5720bfef6a3 100644 --- a/drivers/usb/misc/cypress_cy7c63.c +++ b/drivers/usb/misc/cypress_cy7c63.c | |||
| @@ -278,9 +278,9 @@ static int __init cypress_init(void) | |||
| 278 | 278 | ||
| 279 | /* register this driver with the USB subsystem */ | 279 | /* register this driver with the USB subsystem */ |
| 280 | result = usb_register(&cypress_driver); | 280 | result = usb_register(&cypress_driver); |
| 281 | if (result) { | 281 | if (result) |
| 282 | err("Function usb_register failed! Error number: %d\n", result); | 282 | printk(KERN_ERR KBUILD_MODNAME ": usb_register failed! " |
| 283 | } | 283 | "Error number: %d\n", result); |
| 284 | 284 | ||
| 285 | return result; | 285 | return result; |
| 286 | } | 286 | } |
diff --git a/drivers/usb/misc/cytherm.c b/drivers/usb/misc/cytherm.c index 68e1d172387..4fb3c38b924 100644 --- a/drivers/usb/misc/cytherm.c +++ b/drivers/usb/misc/cytherm.c | |||
| @@ -422,9 +422,9 @@ static int __init usb_cytherm_init(void) | |||
| 422 | int result; | 422 | int result; |
| 423 | 423 | ||
| 424 | result = usb_register(&cytherm_driver); | 424 | result = usb_register(&cytherm_driver); |
| 425 | if (result) | 425 | if (result) { |
| 426 | { | 426 | printk(KERN_ERR KBUILD_MODNAME ": usb_register failed! " |
| 427 | err("usb_register failed. Error number %d", result); | 427 | "Error number: %d\n", result); |
| 428 | return result; | 428 | return result; |
| 429 | } | 429 | } |
| 430 | 430 | ||
diff --git a/drivers/usb/misc/emi26.c b/drivers/usb/misc/emi26.c index 1ee72055f46..e762beb5f3c 100644 --- a/drivers/usb/misc/emi26.c +++ b/drivers/usb/misc/emi26.c | |||
| @@ -50,7 +50,7 @@ static int emi26_writememory (struct usb_device *dev, int address, | |||
| 50 | unsigned char *buffer = kmemdup(data, length, GFP_KERNEL); | 50 | unsigned char *buffer = kmemdup(data, length, GFP_KERNEL); |
| 51 | 51 | ||
| 52 | if (!buffer) { | 52 | if (!buffer) { |
| 53 | err("emi26: kmalloc(%d) failed.", length); | 53 | dev_err(&dev->dev, "kmalloc(%d) failed.\n", length); |
| 54 | return -ENOMEM; | 54 | return -ENOMEM; |
| 55 | } | 55 | } |
| 56 | /* Note: usb_control_msg returns negative value on error or length of the | 56 | /* Note: usb_control_msg returns negative value on error or length of the |
| @@ -68,7 +68,7 @@ static int emi26_set_reset (struct usb_device *dev, unsigned char reset_bit) | |||
| 68 | /* printk(KERN_DEBUG "%s - %d", __func__, reset_bit); */ | 68 | /* printk(KERN_DEBUG "%s - %d", __func__, reset_bit); */ |
| 69 | response = emi26_writememory (dev, CPUCS_REG, &reset_bit, 1, 0xa0); | 69 | response = emi26_writememory (dev, CPUCS_REG, &reset_bit, 1, 0xa0); |
| 70 | if (response < 0) { | 70 | if (response < 0) { |
| 71 | err("emi26: set_reset (%d) failed", reset_bit); | 71 | dev_err(&dev->dev, "set_reset (%d) failed\n", reset_bit); |
| 72 | } | 72 | } |
| 73 | return response; | 73 | return response; |
| 74 | } | 74 | } |
| @@ -88,7 +88,8 @@ static int emi26_load_firmware (struct usb_device *dev) | |||
| 88 | 88 | ||
| 89 | buf = kmalloc(FW_LOAD_SIZE, GFP_KERNEL); | 89 | buf = kmalloc(FW_LOAD_SIZE, GFP_KERNEL); |
| 90 | if (!buf) { | 90 | if (!buf) { |
| 91 | err( "%s - error loading firmware: error = %d", __func__, -ENOMEM); | 91 | dev_err(&dev->dev, "%s - error loading firmware: error = %d\n", |
| 92 | __func__, -ENOMEM); | ||
| 92 | err = -ENOMEM; | 93 | err = -ENOMEM; |
| 93 | goto wraperr; | 94 | goto wraperr; |
| 94 | } | 95 | } |
| @@ -106,14 +107,16 @@ static int emi26_load_firmware (struct usb_device *dev) | |||
| 106 | &dev->dev); | 107 | &dev->dev); |
| 107 | if (err) { | 108 | if (err) { |
| 108 | nofw: | 109 | nofw: |
| 109 | err( "%s - request_firmware() failed", __func__); | 110 | dev_err(&dev->dev, "%s - request_firmware() failed\n", |
| 111 | __func__); | ||
| 110 | goto wraperr; | 112 | goto wraperr; |
| 111 | } | 113 | } |
| 112 | 114 | ||
| 113 | /* Assert reset (stop the CPU in the EMI) */ | 115 | /* Assert reset (stop the CPU in the EMI) */ |
| 114 | err = emi26_set_reset(dev,1); | 116 | err = emi26_set_reset(dev,1); |
| 115 | if (err < 0) { | 117 | if (err < 0) { |
| 116 | err( "%s - error loading firmware: error = %d", __func__, err); | 118 | dev_err(&dev->dev,"%s - error loading firmware: error = %d\n", |
| 119 | __func__, err); | ||
| 117 | goto wraperr; | 120 | goto wraperr; |
| 118 | } | 121 | } |
| 119 | 122 | ||
