From: Trent Piepho Date: Thu, 29 Jan 2009 00:32:59 +0000 (-0300) Subject: V4L/DVB (10563): bttv: clean up mux code for IVC-120G X-Git-Tag: v2.6.30-rc1~621^2~503 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=fb5deb1b9ecc3c64b713f33ec56781c01a0b11b9;p=~shefty%2Frdma-dev.git V4L/DVB (10563): bttv: clean up mux code for IVC-120G The card data for BTTV_BOARD_IVC120 set muxsel to a bunch of bogus values (1 to 16), which the common mux code would use to set the Bt878's mux to some random value. Then the custom code in ivc120_muxsel() would change the Bt878's mux to the right value (always MUX0). Better to just make the muxsel data correct (all zeros, easy!) and get the mux right to begin with. Then the extra Bt878 mux setting code in ivc120_muxsel() can be eliminated (the rest of the code for the IVC-120G's external mux is still there of course). This will help me clean up muxsel for some other changes. It should also get rid of an unnecessary mux switch when changing from certain inputs to certain other inputs on the IVC-120G. Cc: Alan Garfield Signed-off-by: Trent Piepho Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/video/bt8xx/bttv-cards.c b/drivers/media/video/bt8xx/bttv-cards.c index d545d48fac5..d055c277046 100644 --- a/drivers/media/video/bt8xx/bttv-cards.c +++ b/drivers/media/video/bt8xx/bttv-cards.c @@ -2104,8 +2104,7 @@ struct tvcard bttv_tvcards[] = { .no_tda9875 = 1, .no_tda7432 = 1, .gpiomask = 0x00, - .muxsel = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, - 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10 }, + .muxsel = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, .muxsel_hook = ivc120_muxsel, .pll = PLL_28, }, @@ -4445,8 +4444,7 @@ static void ivc120_muxsel(struct bttv *btv, unsigned int input) bttv_I2CWrite(btv, I2C_TDA8540_ALT6, 0x02, ((matrix == 2) ? 0x03 : 0x00), 1); /* 9-12 */ - /* Selects MUX0 for input on the 878 */ - btaor((0)<<5, ~(3<<5), BT848_IFORM); + /* 878's MUX0 is already selected for input via muxsel values */ }