From: Thomas Petazzoni Date: Sat, 7 Jan 2012 12:52:40 +0000 (-0300) Subject: [media] cx231xx: simplify argument passing to cx231xx_init_dev() X-Git-Tag: v3.3-rc1~48^2~32 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=15cb6af8ac1ee1291f98bae51cd46c6719e90c0f;p=profile%2Fcommon%2Fkernel-common.git [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: Thomas Petazzoni Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/video/cx231xx/cx231xx-cards.c b/drivers/media/video/cx231xx/cx231xx-cards.c index 7577e6e..627829f 100644 --- a/drivers/media/video/cx231xx/cx231xx-cards.c +++ b/drivers/media/video/cx231xx/cx231xx-cards.c @@ -868,10 +868,9 @@ void cx231xx_release_resources(struct cx231xx *dev) * cx231xx_init_dev() * 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) { - struct cx231xx *dev = *devhandle; int retval = -ENOMEM; int errCode; unsigned int maxh, maxw; @@ -1154,7 +1153,7 @@ static int cx231xx_usb_probe(struct usb_interface *interface, return -EIO; } /* allocate device struct */ - retval = cx231xx_init_dev(&dev, udev, nr); + retval = cx231xx_init_dev(dev, udev, nr); if (retval) { clear_bit(dev->devno, &cx231xx_devused); v4l2_device_unregister(&dev->v4l2_dev);