[media] cx231xx, em28xx: pass media_device to si2157

As si2157 doesn't use the subdev, but has instead a binding
logic that doesn't have any core framework, we need to manually
pass the media_device struct via platform data on every place
it is called.

This fixes support for HVR-955Q when MC is enabled.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
This commit is contained in:
Mauro Carvalho Chehab 2016-02-11 22:18:36 -02:00
parent 8b0a81c733
commit 133bc4e4a3
2 changed files with 12 additions and 0 deletions

View File

@ -801,6 +801,9 @@ static int dvb_init(struct cx231xx *dev)
/* attach tuner */ /* attach tuner */
memset(&si2157_config, 0, sizeof(si2157_config)); memset(&si2157_config, 0, sizeof(si2157_config));
si2157_config.fe = dev->dvb->frontend; si2157_config.fe = dev->dvb->frontend;
#ifdef CONFIG_MEDIA_CONTROLLER_DVB
si2157_config.mdev = dev->media_dev;
#endif
si2157_config.if_port = 1; si2157_config.if_port = 1;
si2157_config.inversion = true; si2157_config.inversion = true;
strlcpy(info.type, "si2157", I2C_NAME_SIZE); strlcpy(info.type, "si2157", I2C_NAME_SIZE);
@ -857,6 +860,9 @@ static int dvb_init(struct cx231xx *dev)
/* attach tuner */ /* attach tuner */
memset(&si2157_config, 0, sizeof(si2157_config)); memset(&si2157_config, 0, sizeof(si2157_config));
si2157_config.fe = dev->dvb->frontend; si2157_config.fe = dev->dvb->frontend;
#ifdef CONFIG_MEDIA_CONTROLLER_DVB
si2157_config.mdev = dev->media_dev;
#endif
si2157_config.if_port = 1; si2157_config.if_port = 1;
si2157_config.inversion = true; si2157_config.inversion = true;
strlcpy(info.type, "si2157", I2C_NAME_SIZE); strlcpy(info.type, "si2157", I2C_NAME_SIZE);

View File

@ -1671,6 +1671,9 @@ static int em28xx_dvb_init(struct em28xx *dev)
memset(&si2157_config, 0, sizeof(si2157_config)); memset(&si2157_config, 0, sizeof(si2157_config));
si2157_config.fe = dvb->fe[0]; si2157_config.fe = dvb->fe[0];
si2157_config.if_port = 1; si2157_config.if_port = 1;
#ifdef CONFIG_MEDIA_CONTROLLER_DVB
si2157_config.mdev = dev->media_dev;
#endif
memset(&info, 0, sizeof(struct i2c_board_info)); memset(&info, 0, sizeof(struct i2c_board_info));
strlcpy(info.type, "si2157", I2C_NAME_SIZE); strlcpy(info.type, "si2157", I2C_NAME_SIZE);
info.addr = 0x60; info.addr = 0x60;
@ -1732,6 +1735,9 @@ static int em28xx_dvb_init(struct em28xx *dev)
memset(&si2157_config, 0, sizeof(si2157_config)); memset(&si2157_config, 0, sizeof(si2157_config));
si2157_config.fe = dvb->fe[0]; si2157_config.fe = dvb->fe[0];
si2157_config.if_port = 0; si2157_config.if_port = 0;
#ifdef CONFIG_MEDIA_CONTROLLER_DVB
si2157_config.mdev = dev->media_dev;
#endif
memset(&info, 0, sizeof(struct i2c_board_info)); memset(&info, 0, sizeof(struct i2c_board_info));
strlcpy(info.type, "si2146", I2C_NAME_SIZE); strlcpy(info.type, "si2146", I2C_NAME_SIZE);
info.addr = 0x60; info.addr = 0x60;