diff options
Diffstat (limited to 'drivers/media/video')
76 files changed, 1276 insertions, 1224 deletions
diff --git a/drivers/media/video/Kconfig b/drivers/media/video/Kconfig index 2fe260fff85..d82c8a30ba4 100644 --- a/drivers/media/video/Kconfig +++ b/drivers/media/video/Kconfig @@ -183,7 +183,7 @@ config VIDEO_STRADIS help Say Y here to enable support for the Stradis 4:2:2 MPEG-2 video driver for PCI. There is a product page at - <http://www.stradis.com/decoder.html>. + <http://www.stradis.com/>. config VIDEO_ZORAN tristate "Zoran ZR36057/36067 Video For Linux" diff --git a/drivers/media/video/adv7170.c b/drivers/media/video/adv7170.c index e61003de1d5..4ce07ae62da 100644 --- a/drivers/media/video/adv7170.c +++ b/drivers/media/video/adv7170.c @@ -413,10 +413,9 @@ adv7170_detect_client (struct i2c_adapter *adapter, if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA)) return 0; - client = kmalloc(sizeof(struct i2c_client), GFP_KERNEL); + client = kzalloc(sizeof(struct i2c_client), GFP_KERNEL); if (client == 0) return -ENOMEM; - memset(client, 0, sizeof(struct i2c_client)); client->addr = address; client->adapter = adapter; client->driver = &i2c_driver_adv7170; @@ -433,12 +432,11 @@ adv7170_detect_client (struct i2c_adapter *adapter, } strlcpy(I2C_NAME(client), dname, sizeof(I2C_NAME(client))); - encoder = kmalloc(sizeof(struct adv7170), GFP_KERNEL); + encoder = kzalloc(sizeof(struct adv7170), GFP_KERNEL); if (encoder == NULL) { kfree(client); return -ENOMEM; } - memset(encoder, 0, sizeof(struct adv7170)); encoder->norm = VIDEO_MODE_NTSC; encoder->input = 0; encoder->enable = 1; diff --git a/drivers/media/video/adv7175.c b/drivers/media/video/adv7175.c index 6d9536a71ee..4e218f22b21 100644 --- a/drivers/media/video/adv7175.c +++ b/drivers/media/video/adv7175.c @@ -463,10 +463,9 @@ adv7175_detect_client (struct i2c_adapter *adapter, if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA)) return 0; - client = kmalloc(sizeof(struct i2c_client), GFP_KERNEL); + client = kzalloc(sizeof(struct i2c_client), GFP_KERNEL); if (client == 0) return -ENOMEM; - memset(client, 0, sizeof(struct i2c_client)); client->addr = address; client->adapter = adapter; client->driver = &i2c_driver_adv7175; @@ -483,12 +482,11 @@ adv7175_detect_client (struct i2c_adapter *adapter, } strlcpy(I2C_NAME(client), dname, sizeof(I2C_NAME(client))); - encoder = kmalloc(sizeof(struct adv7175), GFP_KERNEL); + encoder = kzalloc(sizeof(struct adv7175), GFP_KERNEL); if (encoder == NULL) { kfree(client); return -ENOMEM; } - memset(encoder, 0, sizeof(struct adv7175)); encoder->norm = VIDEO_MODE_PAL; encoder->input = 0; encoder->enable = 1; diff --git a/drivers/media/video/bt819.c b/drivers/media/video/bt819.c index 560b9989175..d6447791d0e 100644 --- a/drivers/media/video/bt819.c +++ b/drivers/media/video/bt819.c @@ -528,21 +528,18 @@ bt819_detect_client (struct i2c_adapter *adapter, if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA)) return 0; - client = kmalloc(sizeof(struct i2c_client), GFP_KERNEL); + client = kzalloc(sizeof(struct i2c_client), GFP_KERNEL); if (client == 0) return -ENOMEM; - memset(client, 0, sizeof(struct i2c_client)); client->addr = address; client->adapter = adapter; client->driver = &i2c_driver_bt819; - decoder = kmalloc(sizeof(struct bt819), GFP_KERNEL); + decoder = kzalloc(sizeof(struct bt819), GFP_KERNEL); if (decoder == NULL) { kfree(client); return -ENOMEM; } - - memset(decoder, 0, sizeof(struct bt819)); decoder->norm = VIDEO_MODE_NTSC; decoder->input = 0; decoder->enable = 1; diff --git a/drivers/media/video/bt832.c b/drivers/media/video/bt832.c index dda4aa6bef2..07c78f1f7a4 100644 --- a/drivers/media/video/bt832.c +++ b/drivers/media/video/bt832.c @@ -75,13 +75,13 @@ int bt832_hexdump(struct i2c_client *i2c_client_s, unsigned char *buf) if(debug>1) { int i; - v4l_dbg(2,i2c_client_s,"hexdump:"); + v4l_dbg(2, debug,i2c_client_s,"hexdump:"); for(i=1;i<65;i++) { if(i!=1) { if(((i-1)%8)==0) printk(" "); if(((i-1)%16)==0) { printk("\n"); - v4l_dbg(2,i2c_client_s,"hexdump:"); + v4l_dbg(2, debug,i2c_client_s,"hexdump:"); } } printk(" %02x",buf[i]); @@ -167,9 +167,8 @@ static int bt832_attach(struct i2c_adapter *adap, int addr, int kind) client_template.adapter = adap; client_template.addr = addr; - if (NULL == (t = kmalloc(sizeof(*t), GFP_KERNEL))) + if (NULL == (t = kzalloc(sizeof(*t), GFP_KERNEL))) return -ENOMEM; - memset(t,0,sizeof(*t)); t->client = client_template; i2c_set_clientdata(&t->client, t); i2c_attach_client(&t->client); diff --git a/drivers/media/video/bt856.c b/drivers/media/video/bt856.c index 60508069bbe..909b593530e 100644 --- a/drivers/media/video/bt856.c +++ b/drivers/media/video/bt856.c @@ -316,21 +316,19 @@ bt856_detect_client (struct i2c_adapter *adapter, if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA)) return 0; - client = kmalloc(sizeof(struct i2c_client), GFP_KERNEL); + client = kzalloc(sizeof(struct i2c_client), GFP_KERNEL); if (client == 0) return -ENOMEM; - memset(client, 0, sizeof(struct i2c_client)); client->addr = address; client->adapter = adapter; client->driver = &i2c_driver_bt856; strlcpy(I2C_NAME(client), "bt856", sizeof(I2C_NAME(client))); - encoder = kmalloc(sizeof(struct bt856), GFP_KERNEL); + encoder = kzalloc(sizeof(struct bt856), GFP_KERNEL); if (encoder == NULL) { kfree(client); return -ENOMEM; } - memset(encoder, 0, sizeof(struct bt856)); encoder->norm = VIDEO_MODE_NTSC; encoder->enable = 1; i2c_set_clientdata(client, encoder); diff --git a/drivers/media/video/bttv-cards.c b/drivers/media/video/bttv-cards.c index 1621ab133d2..65323e78d5f 100644 --- a/drivers/media/video/bttv-cards.c +++ b/drivers/media/video/bttv-cards.c @@ -321,7 +321,7 @@ struct tvcard bttv_tvcards[] = { .audio_inputs = 1, .tuner = 0, .svhs = 2, - .muxsel = { 2, 3, 1, 0}, + .muxsel = { 2, 3, 1, 0 }, .tuner_type = -1, .tuner_addr = ADDR_UNSET, .radio_addr = ADDR_UNSET, @@ -333,8 +333,8 @@ struct tvcard bttv_tvcards[] = { .tuner = 0, .svhs = 2, .gpiomask = 15, - .muxsel = { 2, 3, 1, 1}, - .audiomux = { 2, 0, 0, 0, 10}, + .muxsel = { 2, 3, 1, 1 }, + .audiomux = { 2, 0, 0, 0, 10 }, .needs_tvaudio = 1, .tuner_type = -1, .tuner_addr = ADDR_UNSET, @@ -347,8 +347,8 @@ struct tvcard bttv_tvcards[] = { .tuner = 0, .svhs = 2, .gpiomask = 7, - .muxsel = { 2, 3, 1, 1}, - .audiomux = { 0, 1, 2, 3, 4}, + .muxsel = { 2, 3, 1, 1 }, + .audiomux = { 0, 1, 2, 3, 4 }, .needs_tvaudio = 1, .tuner_type = -1, .tuner_addr = ADDR_UNSET, @@ -361,8 +361,8 @@ struct tvcard bttv_tvcards[] = { .tuner = 0, .svhs = 2, .gpiomask = 7, - .muxsel = { 2, 3, 1, 1}, - .audiomux = { 4, 0, 2, 3, 1}, + .muxsel = { 2, 3, 1, 1 }, + .audiomux = { 4, 0, 2, 3, 1 }, .no_msp34xx = 1, .needs_tvaudio = 1, .tuner_type = TUNER_PHILIPS_NTSC, @@ -380,7 +380,7 @@ struct tvcard bttv_tvcards[] = { .tuner = -1, .svhs = 2, .gpiomask = 0, - .muxsel = { 2, 3, 1, 1}, + .muxsel = { 2, 3, 1, 1 }, .audiomux = { 0 }, .needs_tvaudio = 0, .tuner_type = 4, @@ -394,8 +394,8 @@ struct tvcard bttv_tvcards[] = { .tuner = 0, .svhs = 2, .gpiomask = 3, - .muxsel = { 2, 3, 1, 0}, - .audiomux = { 0, 1, 0, 1, 3}, + .muxsel = { 2, 3, 1, 0 }, + .audiomux = { 0, 1, 0, 1, 3 }, .needs_tvaudio = 1, .tuner_type = -1, .tuner_addr = ADDR_UNSET, @@ -407,9 +407,9 @@ struct tvcard bttv_tvcards[] = { .audio_inputs = 1, .tuner = 0, .svhs = 3, - .muxsel = { 2, 3, 1, 1}, + .muxsel = { 2, 3, 1, 1 }, .gpiomask = 0x0f, - .audiomux = { 0x0c, 0x04, 0x08, 0x04, 0}, + .audiomux = { 0x0c, 0x04, 0x08, 0x04, 0 }, /* 0x04 for some cards ?? */ .needs_tvaudio = 1, .tuner_type = -1, @@ -425,8 +425,8 @@ struct tvcard bttv_tvcards[] = { .tuner = -1, .svhs = 3, .gpiomask = 0, - .muxsel = { 2, 3, 1, 0, 0}, - .audiomux = {0 }, + .muxsel = { 2, 3, 1, 0, 0 }, + .audiomux = { 0 }, .needs_tvaudio = 1, .tuner_type = -1, .tuner_addr = ADDR_UNSET, @@ -441,8 +441,8 @@ struct tvcard bttv_tvcards[] = { .tuner = 0, .svhs = 2, .gpiomask = 0xc00, - .muxsel = { 2, 3, 1, 1}, - .audiomux = { 0, 0xc00, 0x800, 0x400, 0xc00, 0}, + .muxsel = { 2, 3, 1, 1 }, + .audiomux = { 0, 0xc00, 0x800, 0x400, 0xc00, 0 }, .needs_tvaudio = 1, .pll = PLL_28, .tuner_type = -1, @@ -456,8 +456,8 @@ struct tvcard bttv_tvcards[] = { .tuner = 0, .svhs = 2, .gpiomask = 3, - .muxsel = { 2, 3, 1, 1}, - .audiomux = { 1, 1, 2, 3, 0}, + .muxsel = { 2, 3, 1, 1 }, + .audiomux = { 1, 1, 2, 3, 0 }, .needs_tvaudio = 0, .pll = PLL_28, .tuner_type = TUNER_TEMIC_PAL, @@ -471,8 +471,8 @@ struct tvcard bttv_tvcards[] = { .tuner = 0, .svhs = 2, .gpiomask = 0x0f, /* old: 7 */ - .muxsel = { 2, 0, 1, 1}, - .audiomux = { 0, 1, 2, 3, 4}, + .muxsel = { 2, 0, 1, 1 }, + .audiomux = { 0, 1, 2, 3, 4 }, .needs_tvaudio = 1, .pll = PLL_28, .tuner_type = -1, @@ -486,8 +486,8 @@ struct tvcard bttv_tvcards[] = { .tuner = 0, .svhs = 2, .gpiomask = 0x3014f, - .muxsel = { 2, 3, 1, 1}, - .audiomux = { 0x20001,0x10001, 0, 0,10}, + .muxsel = { 2, 3, 1, 1 }, + .audiomux = { 0x20001,0x10001, 0, 0,10 }, .needs_tvaudio = 1, .tuner_type = -1, .tuner_addr = ADDR_UNSET, @@ -502,8 +502,8 @@ struct tvcard bttv_tvcards[] = { .tuner = 0, .svhs = 2, .gpiomask = 15, - .muxsel = { 2, 3, 1, 1}, - .audiomux = { 13, 14, 11, 7, 0, 0}, + .muxsel = { 2, 3, 1, 1 }, + .audiomux = { 13, 14, 11, 7, 0, 0 }, .needs_tvaudio = 1, .tuner_type = -1, .tuner_addr = ADDR_UNSET, @@ -516,8 +516,8 @@ struct tvcard bttv_tvcards[] = { .tuner = 0, .svhs = 2, .gpiomask = 15, - .muxsel = { 2, 3, 1, 1}, - .audiomux = { 13, 14, 11, 7, 0, 0}, + .muxsel = { 2, 3, 1, 1 }, + .audiomux = { 13, 14, 11, 7, 0, 0 }, .needs_tvaudio = 1, .msp34xx_alt = 1, .pll = PLL_28, @@ -534,8 +534,8 @@ struct tvcard bttv_tvcards[] = { .tuner = 0, .svhs = 2, .gpiomask = 7, - .muxsel = { 2, 3, 1, 1}, - .audiomux = { 0, 2, 1, 3, 4}, /* old: { 0, 1, 2, 3, 4} */ + .muxsel = { 2, 3, 1, 1 }, + .audiomux = { 0, 2, 1, 3, 4 }, /* old: {0, 1, 2, 3, 4} */ .needs_tvaudio = 1, .pll = PLL_28, .tuner_type = -1, @@ -549,8 +549,8 @@ struct tvcard bttv_tvcards[] = { .tuner = 0, .svhs = 2, .gpiomask = 15, - .muxsel = { 2, 3, 1, 1}, - .audiomux = {0 , 0, 1 , 0, 10}, + .muxsel = { 2, 3, 1, 1 }, + .audiomux = { 0 , 0, 1 , 0, 10 }, .needs_tvaudio = 1, .tuner_type = -1, .tuner_addr = ADDR_UNSET, @@ -565,7 +565,7 @@ struct tvcard bttv_tvcards[] = { .tuner = 0, .svhs = 2, .gpiomask = 0x01fe00, - .muxsel = { 2, 3, 1, 1}, + .muxsel = { 2, 3, 1, 1 }, #if 0 /* old */ .audiomux = { 0x01c000, 0, 0x018000, 0x014000, 0x002000, 0 }, @@ -584,8 +584,8 @@ struct tvcard bttv_tvcards[] = { .tuner = 0, .svhs = 2, .gpiomask = 0x8300f8, - .muxsel = { 2, 3, 1, 1,0}, - .audiomux = { 0x4fa007,0xcfa007,0xcfa007,0xcfa007,0xcfa007,0xcfa007}, + .muxsel = { 2, 3, 1, 1,0 }, + .audiomux = { 0x4fa007,0xcfa007,0xcfa007,0xcfa007,0xcfa007,0xcfa007 }, .needs_tvaudio = 1, .tuner_type = -1, .tuner_addr = ADDR_UNSET, @@ -600,8 +600,8 @@ struct tvcard bttv_tvcards[] = { .tuner = 0, .svhs = 2, .gpiomask = 0, - .muxsel = {2, 3, 1, 1}, - .audiomux = {1, 0, 0, 0, 0}, + .muxsel = { 2, 3, 1, 1 }, + .audiomux = { 1, 0, 0, 0, 0 }, .needs_tvaudio = 1, .tuner_type = -1, .tuner_addr = ADDR_UNSET, @@ -614,7 +614,7 @@ struct tvcard bttv_tvcards[] = { .tuner = -1, .svhs = -1, .gpiomask = 0x8dff00, - .muxsel = { 2, 3, 1, 1}, + .muxsel = { 2, 3, 1, 1 }, .audiomux = { 0 }, .no_msp34xx = 1, .tuner_type = -1, @@ -629,7 +629,7 @@ struct tvcard bttv_tvcards[] = { .audio_inputs = 3, .tuner = 0, .svhs = 2, - .muxsel = {2, 3, 1, 1}, + .muxsel = { 2, 3, 1, 1 }, .tuner_type = -1, .tuner_addr = ADDR_UNSET, .radio_addr = ADDR_UNSET, @@ -641,8 +641,8 @@ struct tvcard bttv_tvcards[] = { .tuner = 0, .svhs = 2, .gpiomask = 0x1800, - .muxsel = { 2, 3, 1, 1}, - .audiomux = { 0, 0x800, 0x1000, 0x1000, 0x1800}, + .muxsel = { 2, 3, 1, 1 }, + .audiomux = { 0, 0x800, 0x1000, 0x1000, 0x1800 }, .pll = PLL_28, .tuner_type = TUNER_PHILIPS_PAL_I, .tuner_addr = ADDR_UNSET, @@ -655,8 +655,8 @@ struct tvcard bttv_tvcards[] = { .tuner = 0, .svhs = 2, .gpiomask = 0xc00, - .muxsel = { 2, 3, 1, 1}, - .audiomux = {0, 1, 0x800, 0x400, 0xc00, 0}, + .muxsel = { 2, 3, 1, 1 }, + .audiomux = { 0, 1, 0x800, 0x400, 0xc00, 0 }, .needs_tvaudio = 1, .pll = PLL_28, .tuner_type = -1, @@ -688,8 +688,8 @@ struct tvcard bttv_tvcards[] = { .tuner = 0, .svhs = 2, .gpiomask = 0xe00, - .muxsel = { 2, 3, 1, 1}, - .audiomux = {0x400, 0x400, 0x400, 0x400, 0xc00}, + .muxsel = { 2, 3, 1, 1 }, + .audiomux = {0x400, 0x400, 0x400, 0x400, 0xc00 }, .needs_tvaudio = 1, .pll = PLL_28, .tuner_type = -1, @@ -704,8 +704,8 @@ struct tvcard bttv_tvcards[] = { .tuner = 0, .svhs = 2, .gpiomask = 0x1f0fff, - .muxsel = { 2, 3, 1, 1}, - .audiomux = { 0x20000, 0x30000, 0x10000, 0, 0x40000}, + .muxsel = { 2, 3, 1, 1 }, + .audiomux = { 0x20000, 0x30000, 0x10000, 0, 0x40000 }, .needs_tvaudio = 0, .tuner_type = TUNER_PHILIPS_PAL, .tuner_addr = ADDR_UNSET, @@ -719,8 +719,8 @@ struct tvcard bttv_tvcards[] = { .tuner = 0, .svhs = 3, .gpiomask = 7, - .muxsel = { 2, 0, 1, 1}, - .audiomux = { 0, 1, 2, 3, 4}, + .muxsel = { 2, 0, 1, 1 }, + .audiomux = { 0, 1, 2, 3, 4 }, .needs_tvaudio = 1, .tuner_type = -1, .tuner_addr = ADDR_UNSET, @@ -733,8 +733,8 @@ struct tvcard bttv_tvcards[] = { .tuner = 0, .svhs = 2, .gpiomask = 0x1800, - .muxsel = { 2, 3, 1, 1}, - .audiomux = { 0, 0x800, 0x1000, 0x1000, 0x1800}, + .muxsel = { 2, 3, 1, 1 }, + .audiomux = { 0, 0x800, 0x1000, 0x1000, 0x1800 }, .pll = PLL_28, .tuner_type = TUNER_PHILIPS_SECAM, .tuner_addr = ADDR_UNSET, @@ -749,8 +749,8 @@ struct tvcard bttv_tvcards[] = { .tuner = 0, .svhs = 2, .gpiomask = 0x1f0fff, - .muxsel = { 2, 3, 1, 1}, - .audiomux = { 0x20000, 0x30000, 0x10000, 0x00000, 0x40000}, + .muxsel = { 2, 3, 1, 1 }, + .audiomux = { 0x20000, 0x30000, 0x10000, 0x00000, 0x40000 }, .needs_tvaudio = 0, .tuner_type = TUNER_PHILIPS_PAL, .tuner_addr = ADDR_UNSET, @@ -812,7 +812,7 @@ struct tvcard bttv_tvcards[] = { .tuner = 0, .svhs = 2, .gpiomask = 0x1800, /* 0x8dfe00 */ - .muxsel = { 2, 3, 1, 1}, + .muxsel = { 2, 3, 1, 1 }, .audiomux = { 0, 0x0800, 0x1000, 0x1000, 0x1800, 0 }, .pll = PLL_28, .tuner_type = -1, @@ -826,7 +826,7 @@ struct tvcard bttv_tvcards[] = { .tuner = 0, .svhs = 3, .gpiomask = 1, - .muxsel = { 2, 3, 1, 1}, + .muxsel = { 2, 3, 1, 1 }, .audiomux = { 1, 0, 0, 0, 0 }, .pll = PLL_28, .tuner_type = TUNER_PHILIPS_PAL, @@ -842,7 +842,7 @@ struct tvcard bttv_tvcards[] = { .tuner = -1, .svhs = 2, .gpiomask = 0, - .muxsel = { 2, 3, 1, 1}, + .muxsel = { 2, 3, 1, 1 }, |