From: Antti Palosaari Date: Fri, 25 May 2012 15:58:34 +0000 (-0300) Subject: [media] dvb_usb_v2: init I2C and USB mutex earlier X-Git-Tag: firefly_0821_release~3680^2~275^2~1700 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=19b308c035b4d65cc32a67d9e020377e6bf9c852;p=firefly-linux-kernel-4.4.55.git [media] dvb_usb_v2: init I2C and USB mutex earlier Those must be initialized earlier as we now pass (struct dvb_usb_device *) to the firmware download callbacks too. Signed-off-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/dvb/dvb-usb/dvb_usb_init.c b/drivers/media/dvb/dvb-usb/dvb_usb_init.c index e1a3ed65cfb2..1441324a9115 100644 --- a/drivers/media/dvb/dvb-usb/dvb_usb_init.c +++ b/drivers/media/dvb/dvb-usb/dvb_usb_init.c @@ -182,9 +182,6 @@ static int dvb_usb_init(struct dvb_usb_device *d) { int ret = 0; - mutex_init(&d->usb_mutex); - mutex_init(&d->i2c_mutex); - d->state = DVB_USB_STATE_INIT; /* check the capabilities and set appropriate variables */ @@ -261,6 +258,8 @@ int dvb_usbv2_device_init(struct usb_interface *intf, d->name = driver_info->name; d->rc_map = driver_info->rc_map; memcpy(&d->props, props, sizeof(struct dvb_usb_device_properties)); + mutex_init(&d->usb_mutex); + mutex_init(&d->i2c_mutex); if (d->props.size_of_priv > 0) { d->priv = kzalloc(d->props.size_of_priv, GFP_KERNEL);