aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>2012-01-07 07:52:40 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-01-10 19:38:45 -0500
commit15cb6af8ac1ee1291f98bae51cd46c6719e90c0f (patch)
tree88a5b4c267fc460ff760b1fb85d3cdc7e35282ae /drivers/media
parent9e94136d364a424b53048031bd35a4261ae8f9e2 (diff)
[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 <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/cx231xx/cx231xx-cards.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/media/video/cx231xx/cx231xx-cards.c b/drivers/media/video/cx231xx/cx231xx-cards.c
index 7577e6e50136..627829f4d8c9 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)
868 * cx231xx_init_dev() 868 * cx231xx_init_dev()
869 * allocates and inits the device structs, registers i2c bus and v4l device 869 * allocates and inits the device structs, registers i2c bus and v4l device
870 */ 870 */
871static int cx231xx_init_dev(struct cx231xx **devhandle, struct usb_device *udev, 871static int cx231xx_init_dev(struct cx231xx *dev, struct usb_device *udev,
872 int minor) 872 int minor)
873{ 873{
874 struct cx231xx *dev = *devhandle;
875 int retval = -ENOMEM; 874 int retval = -ENOMEM;
876 int errCode; 875 int errCode;
877 unsigned int maxh, maxw; 876 unsigned int maxh, maxw;
@@ -1154,7 +1153,7 @@ static int cx231xx_usb_probe(struct usb_interface *interface,
1154 return -EIO; 1153 return -EIO;
1155 } 1154 }
1156 /* allocate device struct */ 1155 /* allocate device struct */
1157 retval = cx231xx_init_dev(&dev, udev, nr); 1156 retval = cx231xx_init_dev(dev, udev, nr);
1158 if (retval) { 1157 if (retval) {
1159 clear_bit(dev->devno, &cx231xx_devused); 1158 clear_bit(dev->devno, &cx231xx_devused);
1160 v4l2_device_unregister(&dev->v4l2_dev); 1159 v4l2_device_unregister(&dev->v4l2_dev);