V4L/DVB: tm6000: only register after initialized
Udev calls an utility when it senses a v4l device. So, register needs to be delayed, otherwise it may cause block conditions. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
parent
f8960ee7a4
commit
762e17eb52
1 changed files with 6 additions and 5 deletions
|
@ -453,11 +453,6 @@ static int tm6000_init_dev(struct tm6000_core *dev)
|
||||||
if (rc<0)
|
if (rc<0)
|
||||||
goto err;
|
goto err;
|
||||||
|
|
||||||
/* register and initialize V4L2 */
|
|
||||||
rc=tm6000_v4l2_register(dev);
|
|
||||||
if (rc<0)
|
|
||||||
goto err;
|
|
||||||
|
|
||||||
/* Default values for STD and resolutions */
|
/* Default values for STD and resolutions */
|
||||||
dev->width = 720;
|
dev->width = 720;
|
||||||
dev->height = 480;
|
dev->height = 480;
|
||||||
|
@ -480,12 +475,18 @@ static int tm6000_init_dev(struct tm6000_core *dev)
|
||||||
v4l2_i2c_new_subdev(&dev->v4l2_dev, &dev->i2c_adap,
|
v4l2_i2c_new_subdev(&dev->v4l2_dev, &dev->i2c_adap,
|
||||||
"tvaudio", "tvaudio", I2C_ADDR_TDA9874, NULL);
|
"tvaudio", "tvaudio", I2C_ADDR_TDA9874, NULL);
|
||||||
|
|
||||||
|
/* register and initialize V4L2 */
|
||||||
|
rc=tm6000_v4l2_register(dev);
|
||||||
|
if (rc<0)
|
||||||
|
goto err;
|
||||||
|
|
||||||
if(dev->caps.has_dvb) {
|
if(dev->caps.has_dvb) {
|
||||||
dev->dvb = kzalloc(sizeof(*(dev->dvb)), GFP_KERNEL);
|
dev->dvb = kzalloc(sizeof(*(dev->dvb)), GFP_KERNEL);
|
||||||
if(!dev->dvb) {
|
if(!dev->dvb) {
|
||||||
rc = -ENOMEM;
|
rc = -ENOMEM;
|
||||||
goto err2;
|
goto err2;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_VIDEO_TM6000_DVB
|
#ifdef CONFIG_VIDEO_TM6000_DVB
|
||||||
rc = tm6000_dvb_register(dev);
|
rc = tm6000_dvb_register(dev);
|
||||||
if(rc < 0) {
|
if(rc < 0) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue