diff options
Diffstat (limited to 'drivers/media/video/se401.c')
-rw-r--r-- | drivers/media/video/se401.c | 37 |
1 files changed, 21 insertions, 16 deletions
diff --git a/drivers/media/video/se401.c b/drivers/media/video/se401.c index b01f25d72922..ae3949180c4e 100644 --- a/drivers/media/video/se401.c +++ b/drivers/media/video/se401.c | |||
@@ -288,7 +288,7 @@ static void se401_button_irq(struct urb *urb) | |||
288 | int status; | 288 | int status; |
289 | 289 | ||
290 | if (!se401->dev) { | 290 | if (!se401->dev) { |
291 | info("ohoh: device vapourished"); | 291 | dev_info(&urb->dev->dev, "device vapourished\n"); |
292 | return; | 292 | return; |
293 | } | 293 | } |
294 | 294 | ||
@@ -328,7 +328,7 @@ static void se401_video_irq(struct urb *urb) | |||
328 | return; | 328 | return; |
329 | 329 | ||
330 | if (!se401->dev) { | 330 | if (!se401->dev) { |
331 | info ("ohoh: device vapourished"); | 331 | dev_info(&urb->dev->dev, "device vapourished\n"); |
332 | return; | 332 | return; |
333 | } | 333 | } |
334 | 334 | ||
@@ -375,7 +375,7 @@ static void se401_video_irq(struct urb *urb) | |||
375 | urb->status=0; | 375 | urb->status=0; |
376 | urb->dev=se401->dev; | 376 | urb->dev=se401->dev; |
377 | if(usb_submit_urb(urb, GFP_KERNEL)) | 377 | if(usb_submit_urb(urb, GFP_KERNEL)) |
378 | info("urb burned down"); | 378 | dev_info(&urb->dev->dev, "urb burned down\n"); |
379 | return; | 379 | return; |
380 | } | 380 | } |
381 | 381 | ||
@@ -860,7 +860,8 @@ static int se401_newframe(struct usb_se401 *se401, int framenr) | |||
860 | ); | 860 | ); |
861 | if (se401->nullpackets > SE401_MAX_NULLPACKETS) { | 861 | if (se401->nullpackets > SE401_MAX_NULLPACKETS) { |
862 | se401->nullpackets=0; | 862 | se401->nullpackets=0; |
863 | info("to many null length packets, restarting capture"); | 863 | dev_info(&se401->dev->dev, |
864 | "too many null length packets, restarting capture\n"); | ||
864 | se401_stop_stream(se401); | 865 | se401_stop_stream(se401); |
865 | se401_start_stream(se401); | 866 | se401_start_stream(se401); |
866 | } else { | 867 | } else { |
@@ -880,7 +881,8 @@ static int se401_newframe(struct usb_se401 *se401, int framenr) | |||
880 | se401->scratch_use=0; | 881 | se401->scratch_use=0; |
881 | if (errors > SE401_MAX_ERRORS) { | 882 | if (errors > SE401_MAX_ERRORS) { |
882 | errors=0; | 883 | errors=0; |
883 | info("to much errors, restarting capture"); | 884 | dev_info(&se401->dev->dev, |
885 | "too many errors, restarting capture\n"); | ||
884 | se401_stop_stream(se401); | 886 | se401_stop_stream(se401); |
885 | se401_start_stream(se401); | 887 | se401_start_stream(se401); |
886 | } | 888 | } |
@@ -913,7 +915,7 @@ static void usb_se401_remove_disconnected (struct usb_se401 *se401) | |||
913 | usb_kill_urb(se401->inturb); | 915 | usb_kill_urb(se401->inturb); |
914 | usb_free_urb(se401->inturb); | 916 | usb_free_urb(se401->inturb); |
915 | } | 917 | } |
916 | info("%s disconnected", se401->camera_name); | 918 | dev_info(&se401->dev->dev, "%s disconnected", se401->camera_name); |
917 | 919 | ||
918 | /* Free the memory */ | 920 | /* Free the memory */ |
919 | kfree(se401->width); | 921 | kfree(se401->width); |
@@ -960,8 +962,8 @@ static int se401_close(struct inode *inode, struct file *file) | |||
960 | 962 | ||
961 | rvfree(se401->fbuf, se401->maxframesize * SE401_NUMFRAMES); | 963 | rvfree(se401->fbuf, se401->maxframesize * SE401_NUMFRAMES); |
962 | if (se401->removed) { | 964 | if (se401->removed) { |
965 | dev_info(&se401->dev->dev, "device unregistered\n"); | ||
963 | usb_se401_remove_disconnected(se401); | 966 | usb_se401_remove_disconnected(se401); |
964 | info("device unregistered"); | ||
965 | } else { | 967 | } else { |
966 | for (i=0; i<SE401_NUMFRAMES; i++) | 968 | for (i=0; i<SE401_NUMFRAMES; i++) |
967 | se401->frame[i].grabstate=FRAME_UNUSED; | 969 | se401->frame[i].grabstate=FRAME_UNUSED; |
@@ -1276,7 +1278,7 @@ static int se401_init(struct usb_se401 *se401, int button) | |||
1276 | for (i=0; i<se401->sizes; i++) { | 1278 | for (i=0; i<se401->sizes; i++) { |
1277 | sprintf(temp, "%s %dx%d", temp, se401->width[i], se401->height[i]); | 1279 | sprintf(temp, "%s %dx%d", temp, se401->width[i], se401->height[i]); |
1278 | } | 1280 | } |
1279 | info("%s", temp); | 1281 | dev_info(&se401->dev->dev, "%s\n", temp); |
1280 | se401->maxframesize=se401->width[se401->sizes-1]*se401->height[se401->sizes-1]*3; | 1282 | se401->maxframesize=se401->width[se401->sizes-1]*se401->height[se401->sizes-1]*3; |
1281 | 1283 | ||
1282 | rc=se401_sndctrl(0, se401, SE401_REQ_GET_WIDTH, 0, cp, sizeof(cp)); | 1284 | rc=se401_sndctrl(0, se401, SE401_REQ_GET_WIDTH, 0, cp, sizeof(cp)); |
@@ -1310,7 +1312,8 @@ static int se401_init(struct usb_se401 *se401, int button) | |||
1310 | if (button) { | 1312 | if (button) { |
1311 | se401->inturb=usb_alloc_urb(0, GFP_KERNEL); | 1313 | se401->inturb=usb_alloc_urb(0, GFP_KERNEL); |
1312 | if (!se401->inturb) { | 1314 | if (!se401->inturb) { |
1313 | info("Allocation of inturb failed"); | 1315 | dev_info(&se401->dev->dev, |
1316 | "Allocation of inturb failed\n"); | ||
1314 | return 1; | 1317 | return 1; |
1315 | } | 1318 | } |
1316 | usb_fill_int_urb(se401->inturb, se401->dev, | 1319 | usb_fill_int_urb(se401->inturb, se401->dev, |
@@ -1321,7 +1324,7 @@ static int se401_init(struct usb_se401 *se401, int button) | |||
1321 | 8 | 1324 | 8 |
1322 | ); | 1325 | ); |
1323 | if (usb_submit_urb(se401->inturb, GFP_KERNEL)) { | 1326 | if (usb_submit_urb(se401->inturb, GFP_KERNEL)) { |
1324 | info("int urb burned down"); | 1327 | dev_info(&se401->dev->dev, "int urb burned down\n"); |
1325 | return 1; | 1328 | return 1; |
1326 | } | 1329 | } |
1327 | } else | 1330 | } else |
@@ -1378,7 +1381,7 @@ static int se401_probe(struct usb_interface *intf, | |||
1378 | return -ENODEV; | 1381 | return -ENODEV; |
1379 | 1382 | ||
1380 | /* We found one */ | 1383 | /* We found one */ |
1381 | info("SE401 camera found: %s", camera_name); | 1384 | dev_info(&intf->dev, "SE401 camera found: %s\n", camera_name); |
1382 | 1385 | ||
1383 | if ((se401 = kzalloc(sizeof(*se401), GFP_KERNEL)) == NULL) { | 1386 | if ((se401 = kzalloc(sizeof(*se401), GFP_KERNEL)) == NULL) { |
1384 | err("couldn't kmalloc se401 struct"); | 1387 | err("couldn't kmalloc se401 struct"); |
@@ -1389,7 +1392,8 @@ static int se401_probe(struct usb_interface *intf, | |||
1389 | se401->iface = interface->bInterfaceNumber; | 1392 | se401->iface = interface->bInterfaceNumber; |
1390 | se401->camera_name = camera_name; | 1393 | se401->camera_name = camera_name; |
1391 | 1394 | ||
1392 | info("firmware version: %02x", le16_to_cpu(dev->descriptor.bcdDevice) & 255); | 1395 | dev_info(&intf->dev, "firmware version: %02x\n", |
1396 | le16_to_cpu(dev->descriptor.bcdDevice) & 255); | ||
1393 | 1397 | ||
1394 | if (se401_init(se401, button)) { | 1398 | if (se401_init(se401, button)) { |
1395 | kfree(se401); | 1399 | kfree(se401); |
@@ -1407,7 +1411,8 @@ static int se401_probe(struct usb_interface *intf, | |||
1407 | err("video_register_device failed"); | 1411 | err("video_register_device failed"); |
1408 | return -EIO; | 1412 | return -EIO; |
1409 | } | 1413 | } |
1410 | info("registered new video device: video%d", se401->vdev.minor); | 1414 | dev_info(&intf->dev, "registered new video device: video%d\n", |
1415 | se401->vdev.minor); | ||
1411 | 1416 | ||
1412 | usb_set_intfdata (intf, se401); | 1417 | usb_set_intfdata (intf, se401); |
1413 | return 0; | 1418 | return 0; |
@@ -1451,10 +1456,10 @@ static struct usb_driver se401_driver = { | |||
1451 | 1456 | ||
1452 | static int __init usb_se401_init(void) | 1457 | static int __init usb_se401_init(void) |
1453 | { | 1458 | { |
1454 | info("SE401 usb camera driver version %s registering", version); | 1459 | printk(KERN_INFO "SE401 usb camera driver version %s registering\n", version); |
1455 | if (flickerless) | 1460 | if (flickerless) |
1456 | if (flickerless!=50 && flickerless!=60) { | 1461 | if (flickerless!=50 && flickerless!=60) { |
1457 | info("Invallid flickerless value, use 0, 50 or 60."); | 1462 | printk(KERN_ERR "Invallid flickerless value, use 0, 50 or 60.\n"); |
1458 | return -1; | 1463 | return -1; |
1459 | } | 1464 | } |
1460 | return usb_register(&se401_driver); | 1465 | return usb_register(&se401_driver); |
@@ -1463,7 +1468,7 @@ static int __init usb_se401_init(void) | |||
1463 | static void __exit usb_se401_exit(void) | 1468 | static void __exit usb_se401_exit(void) |
1464 | { | 1469 | { |
1465 | usb_deregister(&se401_driver); | 1470 | usb_deregister(&se401_driver); |
1466 | info("SE401 driver deregistered"); | 1471 | printk(KERN_INFO "SE401 driver deregistered\frame"); |
1467 | } | 1472 | } |
1468 | 1473 | ||
1469 | module_init(usb_se401_init); | 1474 | module_init(usb_se401_init); |