提交 622c2fc1 编写于 作者: T Thomas Petazzoni 提交者: Mauro Carvalho Chehab

[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: NThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 d07b901f
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册