mirror of https://gitee.com/openkylin/linux.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 <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
parent
005bc3fce7
commit
19b308c035
|
@ -182,9 +182,6 @@ static int dvb_usb_init(struct dvb_usb_device *d)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
mutex_init(&d->usb_mutex);
|
|
||||||
mutex_init(&d->i2c_mutex);
|
|
||||||
|
|
||||||
d->state = DVB_USB_STATE_INIT;
|
d->state = DVB_USB_STATE_INIT;
|
||||||
|
|
||||||
/* check the capabilities and set appropriate variables */
|
/* 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->name = driver_info->name;
|
||||||
d->rc_map = driver_info->rc_map;
|
d->rc_map = driver_info->rc_map;
|
||||||
memcpy(&d->props, props, sizeof(struct dvb_usb_device_properties));
|
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) {
|
if (d->props.size_of_priv > 0) {
|
||||||
d->priv = kzalloc(d->props.size_of_priv, GFP_KERNEL);
|
d->priv = kzalloc(d->props.size_of_priv, GFP_KERNEL);
|
||||||
|
|
Loading…
Reference in New Issue