diff options
author | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | 2012-01-07 10:18:45 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-01-10 22:46:48 -0200 |
commit | 622c2fc1f2613bef953d2af908e7b83f4de4b994 (patch) | |
tree | 691a1c3ac3c54ef8e422dc55eeb9d0913951dec5 /drivers/media | |
parent | d07b901f9dc22977c2c04f320a9cef19e5298e7e (diff) | |
download | blackbird-op-linux-622c2fc1f2613bef953d2af908e7b83f4de4b994.tar.gz blackbird-op-linux-622c2fc1f2613bef953d2af908e7b83f4de4b994.zip |
[media] em28xx: simplify argument passing to em28xx_init_dev()
The 'struct em28xx *' pointer was passed by reference to the
em28xx_init_dev() function, for no reason. Instead, just pass it by
value, which is much more logical and simple.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/video/em28xx/em28xx-cards.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/media/video/em28xx/em28xx-cards.c b/drivers/media/video/em28xx/em28xx-cards.c index 897a4320d9d5..ebfb7a3beab2 100644 --- a/drivers/media/video/em28xx/em28xx-cards.c +++ b/drivers/media/video/em28xx/em28xx-cards.c @@ -2916,11 +2916,10 @@ void em28xx_release_resources(struct em28xx *dev) * em28xx_init_dev() * allocates and inits the device structs, registers i2c bus and v4l device */ -static int em28xx_init_dev(struct em28xx **devhandle, struct usb_device *udev, +static int em28xx_init_dev(struct em28xx *dev, struct usb_device *udev, struct usb_interface *interface, int minor) { - struct em28xx *dev = *devhandle; int retval; dev->udev = udev; @@ -3302,7 +3301,7 @@ static int em28xx_usb_probe(struct usb_interface *interface, /* allocate device struct */ mutex_init(&dev->lock); mutex_lock(&dev->lock); - retval = em28xx_init_dev(&dev, udev, interface, nr); + retval = em28xx_init_dev(dev, udev, interface, nr); if (retval) { goto unlock_and_free; } |