diff options
Diffstat (limited to 'drivers/media/video/hdpvr/hdpvr-core.c')
-rw-r--r-- | drivers/media/video/hdpvr/hdpvr-core.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/media/video/hdpvr/hdpvr-core.c b/drivers/media/video/hdpvr/hdpvr-core.c index 1c9bc94c905c..e280eb178fe9 100644 --- a/drivers/media/video/hdpvr/hdpvr-core.c +++ b/drivers/media/video/hdpvr/hdpvr-core.c | |||
@@ -376,8 +376,8 @@ static int hdpvr_probe(struct usb_interface *interface, | |||
376 | usb_set_intfdata(interface, dev); | 376 | usb_set_intfdata(interface, dev); |
377 | 377 | ||
378 | /* let the user know what node this device is now attached to */ | 378 | /* let the user know what node this device is now attached to */ |
379 | v4l2_info(&dev->v4l2_dev, "device now attached to /dev/video%d\n", | 379 | v4l2_info(&dev->v4l2_dev, "device now attached to %s\n", |
380 | dev->video_dev->minor); | 380 | video_device_node_name(dev->video_dev)); |
381 | return 0; | 381 | return 0; |
382 | 382 | ||
383 | error: | 383 | error: |
@@ -391,13 +391,10 @@ error: | |||
391 | static void hdpvr_disconnect(struct usb_interface *interface) | 391 | static void hdpvr_disconnect(struct usb_interface *interface) |
392 | { | 392 | { |
393 | struct hdpvr_device *dev; | 393 | struct hdpvr_device *dev; |
394 | int minor; | ||
395 | 394 | ||
396 | dev = usb_get_intfdata(interface); | 395 | dev = usb_get_intfdata(interface); |
397 | usb_set_intfdata(interface, NULL); | 396 | usb_set_intfdata(interface, NULL); |
398 | 397 | ||
399 | minor = dev->video_dev->minor; | ||
400 | |||
401 | /* prevent more I/O from starting and stop any ongoing */ | 398 | /* prevent more I/O from starting and stop any ongoing */ |
402 | mutex_lock(&dev->io_mutex); | 399 | mutex_lock(&dev->io_mutex); |
403 | dev->status = STATUS_DISCONNECTED; | 400 | dev->status = STATUS_DISCONNECTED; |
@@ -425,7 +422,8 @@ static void hdpvr_disconnect(struct usb_interface *interface) | |||
425 | 422 | ||
426 | atomic_dec(&dev_nr); | 423 | atomic_dec(&dev_nr); |
427 | 424 | ||
428 | v4l2_info(&dev->v4l2_dev, "device /dev/video%d disconnected\n", minor); | 425 | v4l2_info(&dev->v4l2_dev, "device %s disconnected\n", |
426 | video_device_node_name(dev->video_dev)); | ||
429 | 427 | ||
430 | v4l2_device_unregister(&dev->v4l2_dev); | 428 | v4l2_device_unregister(&dev->v4l2_dev); |
431 | kfree(dev->usbc_buf); | 429 | kfree(dev->usbc_buf); |