Commit 15cb6af8 authored by Thomas Petazzoni's avatar Thomas Petazzoni Committed by Mauro Carvalho Chehab

[media] cx231xx: simplify argument passing to cx231xx_init_dev()

The 'struct cx231xx *' pointer was passed by reference to the
cx231xx_init_dev() function, for no reason. Instead, just pass it by
value, which is much more logical and simple.
Signed-off-by: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 9e94136d
...@@ -868,10 +868,9 @@ void cx231xx_release_resources(struct cx231xx *dev) ...@@ -868,10 +868,9 @@ void cx231xx_release_resources(struct cx231xx *dev)
* cx231xx_init_dev() * cx231xx_init_dev()
* allocates and inits the device structs, registers i2c bus and v4l device * allocates and inits the device structs, registers i2c bus and v4l device
*/ */
static int cx231xx_init_dev(struct cx231xx **devhandle, struct usb_device *udev, static int cx231xx_init_dev(struct cx231xx *dev, struct usb_device *udev,
int minor) int minor)
{ {
struct cx231xx *dev = *devhandle;
int retval = -ENOMEM; int retval = -ENOMEM;
int errCode; int errCode;
unsigned int maxh, maxw; unsigned int maxh, maxw;
...@@ -1154,7 +1153,7 @@ static int cx231xx_usb_probe(struct usb_interface *interface, ...@@ -1154,7 +1153,7 @@ static int cx231xx_usb_probe(struct usb_interface *interface,
return -EIO; return -EIO;
} }
/* allocate device struct */ /* allocate device struct */
retval = cx231xx_init_dev(&dev, udev, nr); retval = cx231xx_init_dev(dev, udev, nr);
if (retval) { if (retval) {
clear_bit(dev->devno, &cx231xx_devused); clear_bit(dev->devno, &cx231xx_devused);
v4l2_device_unregister(&dev->v4l2_dev); v4l2_device_unregister(&dev->v4l2_dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment