diff options
Diffstat (limited to 'drivers/media/common')
-rw-r--r-- | drivers/media/common/b2c2/flexcop-fe-tuner.c | 2 | ||||
-rw-r--r-- | drivers/media/common/saa7146/saa7146_vbi.c | 5 | ||||
-rw-r--r-- | drivers/media/common/saa7146/saa7146_video.c | 5 | ||||
-rw-r--r-- | drivers/media/common/tveeprom.c | 4 | ||||
-rw-r--r-- | drivers/media/common/v4l2-tpg/v4l2-tpg-core.c | 9 |
5 files changed, 15 insertions, 10 deletions
diff --git a/drivers/media/common/b2c2/flexcop-fe-tuner.c b/drivers/media/common/b2c2/flexcop-fe-tuner.c index 5f10151ecec9..7636606f0be5 100644 --- a/drivers/media/common/b2c2/flexcop-fe-tuner.c +++ b/drivers/media/common/b2c2/flexcop-fe-tuner.c @@ -473,7 +473,7 @@ static int airstar_atsc1_attach(struct flexcop_device *fc, /* AirStar ATSC 2nd generation */ #if FE_SUPPORTED(NXT200X) && FE_SUPPORTED(PLL) -static struct nxt200x_config samsung_tbmv_config = { +static const struct nxt200x_config samsung_tbmv_config = { .demod_address = 0x0a, }; diff --git a/drivers/media/common/saa7146/saa7146_vbi.c b/drivers/media/common/saa7146/saa7146_vbi.c index 49237518d65f..3553ac4cba5c 100644 --- a/drivers/media/common/saa7146/saa7146_vbi.c +++ b/drivers/media/common/saa7146/saa7146_vbi.c @@ -365,9 +365,8 @@ static void vbi_init(struct saa7146_dev *dev, struct saa7146_vv *vv) INIT_LIST_HEAD(&vv->vbi_dmaq.queue); - init_timer(&vv->vbi_dmaq.timeout); - vv->vbi_dmaq.timeout.function = saa7146_buffer_timeout; - vv->vbi_dmaq.timeout.data = (unsigned long)(&vv->vbi_dmaq); + setup_timer(&vv->vbi_dmaq.timeout, saa7146_buffer_timeout, + (unsigned long)(&vv->vbi_dmaq)); vv->vbi_dmaq.dev = dev; init_waitqueue_head(&vv->vbi_wq); diff --git a/drivers/media/common/saa7146/saa7146_video.c b/drivers/media/common/saa7146/saa7146_video.c index e034bcfcf757..b3b29d4f36ed 100644 --- a/drivers/media/common/saa7146/saa7146_video.c +++ b/drivers/media/common/saa7146/saa7146_video.c @@ -1201,9 +1201,8 @@ static void video_init(struct saa7146_dev *dev, struct saa7146_vv *vv) { INIT_LIST_HEAD(&vv->video_dmaq.queue); - init_timer(&vv->video_dmaq.timeout); - vv->video_dmaq.timeout.function = saa7146_buffer_timeout; - vv->video_dmaq.timeout.data = (unsigned long)(&vv->video_dmaq); + setup_timer(&vv->video_dmaq.timeout, saa7146_buffer_timeout, + (unsigned long)(&vv->video_dmaq)); vv->video_dmaq.dev = dev; /* set some default values */ diff --git a/drivers/media/common/tveeprom.c b/drivers/media/common/tveeprom.c index 6e1020227f9f..ccf2d3b12aec 100644 --- a/drivers/media/common/tveeprom.c +++ b/drivers/media/common/tveeprom.c @@ -420,8 +420,8 @@ static int hasRadioTuner(int tunerType) return 0; } -void tveeprom_hauppauge_analog(struct i2c_client *c, struct tveeprom *tvee, - unsigned char *eeprom_data) +void tveeprom_hauppauge_analog(struct tveeprom *tvee, + unsigned char *eeprom_data) { /* ---------------------------------------------- ** The hauppauge eeprom format is tagged diff --git a/drivers/media/common/v4l2-tpg/v4l2-tpg-core.c b/drivers/media/common/v4l2-tpg/v4l2-tpg-core.c index e47b46e2d26c..3dd22da7e17d 100644 --- a/drivers/media/common/v4l2-tpg/v4l2-tpg-core.c +++ b/drivers/media/common/v4l2-tpg/v4l2-tpg-core.c @@ -927,7 +927,14 @@ static void precalculate_color(struct tpg_data *tpg, int k) y >>= 4; cb >>= 4; cr >>= 4; - if (tpg->real_quantization == V4L2_QUANTIZATION_LIM_RANGE) { + /* + * XV601/709 use the header/footer margins to encode R', G' + * and B' values outside the range [0-1]. So do not clamp + * XV601/709 values. + */ + if (tpg->real_quantization == V4L2_QUANTIZATION_LIM_RANGE && + tpg->real_ycbcr_enc != V4L2_YCBCR_ENC_XV601 && + tpg->real_ycbcr_enc != V4L2_YCBCR_ENC_XV709) { y = clamp(y, 16, 235); cb = clamp(cb, 16, 240); cr = clamp(cr, 16, 240); |