From: Janne Grunau <j@jannau.net>
To: linux-media@vger.kernel.org
Subject: [PATCH 3 of 6] usbvision: use usb_interface.dev for v4l2_device_register
Date: Sun, 29 Mar 2009 14:41:35 +0200 [thread overview]
Message-ID: <20090329124135.GD637@aniel> (raw)
In-Reply-To: <patchbomb.1238329154@aniel>
[-- Attachment #1: v4l2_device_usb_interface-3.patch --]
[-- Type: text/x-patch, Size: 1445 bytes --]
# HG changeset patch
# User Janne Grunau <j@jannau.net>
# Date 1238190800 -3600
# Node ID 09d6b9873181402892bb746d101b1b22b245208d
# Parent edca57a287041646c86b404852ef9abf0ecd6c72
usbvision: use usb_interface.dev for v4l2_device_register
From: Janne Grunau <j@jannau.net>
Priority: normal
Signed-off-by: Janne Grunau <j@jannau.net>
diff -r edca57a28704 -r 09d6b9873181 linux/drivers/media/video/usbvision/usbvision-video.c
--- a/linux/drivers/media/video/usbvision/usbvision-video.c Fri Mar 27 22:42:45 2009 +0100
+++ b/linux/drivers/media/video/usbvision/usbvision-video.c Fri Mar 27 22:53:20 2009 +0100
@@ -1530,7 +1530,8 @@
* Returns NULL on error, a pointer to usb_usbvision else.
*
*/
-static struct usb_usbvision *usbvision_alloc(struct usb_device *dev)
+static struct usb_usbvision *usbvision_alloc(struct usb_device *dev,
+ struct usb_interface *intf)
{
struct usb_usbvision *usbvision;
@@ -1539,7 +1540,7 @@
return NULL;
usbvision->dev = dev;
- if (v4l2_device_register(&dev->dev, &usbvision->v4l2_dev))
+ if (v4l2_device_register(&intf->dev, &usbvision->v4l2_dev))
goto err_free;
mutex_init(&usbvision->lock); /* available */
@@ -1677,7 +1678,8 @@
return -ENODEV;
}
- if ((usbvision = usbvision_alloc(dev)) == NULL) {
+ usbvision = usbvision_alloc(dev, intf);
+ if (usbvision == NULL) {
dev_err(&intf->dev, "%s: couldn't allocate USBVision struct\n", __func__);
return -ENOMEM;
}
next prev parent reply other threads:[~2009-03-29 12:41 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <patchbomb.1238329154@aniel>
2009-03-29 12:37 ` [PATCH 1 of 6] v4l: use usb_interface for v4l2_device_register Janne Grunau
2009-03-29 12:40 ` [PATCH 2 of 6] cx321xx: use usb_interface.dev " Janne Grunau
2009-03-29 12:41 ` Janne Grunau [this message]
2009-03-29 12:42 ` [PATCH 4 of 6] pvrusb2: " Janne Grunau
2009-03-29 12:42 ` [PATCH 5 of 6] au0828: " Janne Grunau
2009-03-29 13:44 ` Devin Heitmueller
2009-03-29 15:04 ` Janne Grunau
2009-03-29 12:43 ` [PATCH 6 of 6] w9968cf: " Janne Grunau
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090329124135.GD637@aniel \
--to=j@jannau.net \
--cc=linux-media@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox