diff options
Diffstat (limited to 'drivers/media/dvb')
30 files changed, 36 insertions, 140 deletions
diff --git a/drivers/media/dvb/dvb-usb/af9015.c b/drivers/media/dvb/dvb-usb/af9015.c index 4cb31e7c13c..26690dfb326 100644 --- a/drivers/media/dvb/dvb-usb/af9015.c +++ b/drivers/media/dvb/dvb-usb/af9015.c | |||
| @@ -81,7 +81,6 @@ static int af9015_rw_udev(struct usb_device *udev, struct req_t *req) | |||
| 81 | 81 | ||
| 82 | switch (req->cmd) { | 82 | switch (req->cmd) { |
| 83 | case GET_CONFIG: | 83 | case GET_CONFIG: |
| 84 | case BOOT: | ||
| 85 | case READ_MEMORY: | 84 | case READ_MEMORY: |
| 86 | case RECONNECT_USB: | 85 | case RECONNECT_USB: |
| 87 | case GET_IR_CODE: | 86 | case GET_IR_CODE: |
| @@ -100,6 +99,7 @@ static int af9015_rw_udev(struct usb_device *udev, struct req_t *req) | |||
| 100 | case WRITE_VIRTUAL_MEMORY: | 99 | case WRITE_VIRTUAL_MEMORY: |
| 101 | case COPY_FIRMWARE: | 100 | case COPY_FIRMWARE: |
| 102 | case DOWNLOAD_FIRMWARE: | 101 | case DOWNLOAD_FIRMWARE: |
| 102 | case BOOT: | ||
| 103 | break; | 103 | break; |
| 104 | default: | 104 | default: |
| 105 | err("unknown command:%d", req->cmd); | 105 | err("unknown command:%d", req->cmd); |
diff --git a/drivers/media/dvb/frontends/cx22700.c b/drivers/media/dvb/frontends/cx22700.c index ace5cb17165..fbd838eca26 100644 --- a/drivers/media/dvb/frontends/cx22700.c +++ b/drivers/media/dvb/frontends/cx22700.c | |||
| @@ -380,7 +380,7 @@ struct dvb_frontend* cx22700_attach(const struct cx22700_config* config, | |||
| 380 | struct cx22700_state* state = NULL; | 380 | struct cx22700_state* state = NULL; |
| 381 | 381 | ||
| 382 | /* allocate memory for the internal state */ | 382 | /* allocate memory for the internal state */ |
| 383 | state = kmalloc(sizeof(struct cx22700_state), GFP_KERNEL); | 383 | state = kzalloc(sizeof(struct cx22700_state), GFP_KERNEL); |
| 384 | if (state == NULL) goto error; | 384 | if (state == NULL) goto error; |
| 385 | 385 | ||
| 386 | /* setup the state */ | 386 | /* setup the state */ |
diff --git a/drivers/media/dvb/frontends/cx22702.c b/drivers/media/dvb/frontends/cx22702.c index 5d1abe34bdd..00b5c7e91d5 100644 --- a/drivers/media/dvb/frontends/cx22702.c +++ b/drivers/media/dvb/frontends/cx22702.c | |||
| @@ -580,7 +580,7 @@ struct dvb_frontend *cx22702_attach(const struct cx22702_config *config, | |||
| 580 | struct cx22702_state *state = NULL; | 580 | struct cx22702_state *state = NULL; |
| 581 | 581 | ||
| 582 | /* allocate memory for the internal state */ | 582 | /* allocate memory for the internal state */ |
| 583 | state = kmalloc(sizeof(struct cx22702_state), GFP_KERNEL); | 583 | state = kzalloc(sizeof(struct cx22702_state), GFP_KERNEL); |
| 584 | if (state == NULL) | 584 | if (state == NULL) |
| 585 | goto error; | 585 | goto error; |
| 586 | 586 | ||
diff --git a/drivers/media/dvb/frontends/cx24110.c b/drivers/media/dvb/frontends/cx24110.c index 87ae29db024..ffbcfabd83f 100644 --- a/drivers/media/dvb/frontends/cx24110.c +++ b/drivers/media/dvb/frontends/cx24110.c | |||
| @@ -598,7 +598,7 @@ struct dvb_frontend* cx24110_attach(const struct cx24110_config* config, | |||
| 598 | int ret; | 598 | int ret; |
| 599 | 599 | ||
| 600 | /* allocate memory for the internal state */ | 600 | /* allocate memory for the internal state */ |
| 601 | state = kmalloc(sizeof(struct cx24110_state), GFP_KERNEL); | 601 | state = kzalloc(sizeof(struct cx24110_state), GFP_KERNEL); |
| 602 | if (state == NULL) goto error; | 602 | if (state == NULL) goto error; |
| 603 | 603 | ||
| 604 | /* setup the state */ | 604 | /* setup the state */ |
diff --git a/drivers/media/dvb/frontends/dvb_dummy_fe.c b/drivers/media/dvb/frontends/dvb_dummy_fe.c index db8a937cc63..a7fc7e53a55 100644 --- a/drivers/media/dvb/frontends/dvb_dummy_fe.c +++ b/drivers/media/dvb/frontends/dvb_dummy_fe.c | |||
| @@ -117,7 +117,7 @@ struct dvb_frontend* dvb_dummy_fe_ofdm_attach(void) | |||
| 117 | struct dvb_dummy_fe_state* state = NULL; | 117 | struct dvb_dummy_fe_state* state = NULL; |
| 118 | 118 | ||
| 119 | /* allocate memory for the internal state */ | 119 | /* allocate memory for the internal state */ |
| 120 | state = kmalloc(sizeof(struct dvb_dummy_fe_state), GFP_KERNEL); | 120 | state = kzalloc(sizeof(struct dvb_dummy_fe_state), GFP_KERNEL); |
| 121 | if (state == NULL) goto error; | 121 | if (state == NULL) goto error; |
| 122 | 122 | ||
| 123 | /* create dvb_frontend */ | 123 | /* create dvb_frontend */ |
| @@ -137,7 +137,7 @@ struct dvb_frontend *dvb_dummy_fe_qpsk_attach(void) | |||
| 137 | struct dvb_dummy_fe_state* state = NULL; | 137 | struct dvb_dummy_fe_state* state = NULL; |
| 138 | 138 | ||
| 139 | /* allocate memory for the internal state */ | 139 | /* allocate memory for the internal state */ |
| 140 | state = kmalloc(sizeof(struct dvb_dummy_fe_state), GFP_KERNEL); | 140 | state = kzalloc(sizeof(struct dvb_dummy_fe_state), GFP_KERNEL); |
| 141 | if (state == NULL) goto error; | 141 | if (state == NULL) goto error; |
| 142 | 142 | ||
| 143 | /* create dvb_frontend */ | 143 | /* create dvb_frontend */ |
| @@ -157,7 +157,7 @@ struct dvb_frontend *dvb_dummy_fe_qam_attach(void) | |||
| 157 | struct dvb_dummy_fe_state* state = NULL; | 157 | struct dvb_dummy_fe_state* state = NULL; |
| 158 | 158 | ||
| 159 | /* allocate memory for the internal state */ | 159 | /* allocate memory for the internal state */ |
| 160 | state = kmalloc(sizeof(struct dvb_dummy_fe_state), GFP_KERNEL); | 160 | state = kzalloc(sizeof(struct dvb_dummy_fe_state), GFP_KERNEL); |
| 161 | if (state == NULL) goto error; | 161 | if (state == NULL) goto error; |
| 162 | 162 | ||
| 163 | /* create dvb_frontend */ | 163 | /* create dvb_frontend */ |
diff --git a/drivers/media/dvb/frontends/l64781.c b/drivers/media/dvb/frontends/l64781.c index e1e70e9e0cb..3051b64aa17 100644 --- a/drivers/media/dvb/frontends/l64781.c +++ b/drivers/media/dvb/frontends/l64781.c | |||
| @@ -501,7 +501,7 @@ struct dvb_frontend* l64781_attach(const struct l64781_config* config, | |||
| 501 | { .addr = config->demod_address, .flags = I2C_M_RD, .buf = b1, .len = 1 } }; | 501 | { .addr = config->demod_address, .flags = I2C_M_RD, .buf = b1, .len = 1 } }; |
| 502 | 502 | ||
| 503 | /* allocate memory for the internal state */ | 503 | /* allocate memory for the internal state */ |
| 504 | state = kmalloc(sizeof(struct l64781_state), GFP_KERNEL); | 504 | state = kzalloc(sizeof(struct l64781_state), GFP_KERNEL); |
| 505 | if (state == NULL) goto error; | 505 | if (state == NULL) goto error; |
| 506 | 506 | ||
| 507 | /* setup the state */ | 507 | /* setup the state */ |
diff --git a/drivers/media/dvb/frontends/lgs8gl5.c b/drivers/media/dvb/frontends/lgs8gl5.c index 855852fddf2..bb37ed289a0 100644 --- a/drivers/media/dvb/frontends/lgs8gl5.c +++ b/drivers/media/dvb/frontends/lgs8gl5.c | |||
| @@ -387,7 +387,7 @@ lgs8gl5_attach(const struct lgs8gl5_config *config, struct i2c_adapter *i2c) | |||
| 387 | dprintk("%s\n", __func__); | 387 | dprintk("%s\n", __func__); |
| 388 | 388 | ||
| 389 | /* Allocate memory for the internal state */ | 389 | /* Allocate memory for the internal state */ |
| 390 | state = kmalloc(sizeof(struct lgs8gl5_state), GFP_KERNEL); | 390 | state = kzalloc(sizeof(struct lgs8gl5_state), GFP_KERNEL); |
| 391 | if (state == NULL) | 391 | if (state == NULL) |
| 392 | goto error; | 392 | goto error; |
| 393 | 393 | ||
diff --git a/drivers/media/dvb/frontends/mt312.c b/drivers/media/dvb/frontends/mt312.c index a621f727935..f69daaac78c 100644 --- a/drivers/media/dvb/frontends/mt312.c +++ b/drivers/media/dvb/frontends/mt312.c | |||
| @@ -782,7 +782,7 @@ struct dvb_frontend *mt312_attach(const struct mt312_config *config, | |||
| 782 | struct mt312_state *state = NULL; | 782 | struct mt312_state *state = NULL; |
| 783 | 783 | ||
| 784 | /* allocate memory for the internal state */ | 784 | /* allocate memory for the internal state */ |
| 785 | state = kmalloc(sizeof(struct mt312_state), GFP_KERNEL); | 785 | state = kzalloc(sizeof(struct mt312_state), GFP_KERNEL); |
| 786 | if (state == NULL) | 786 | if (state == NULL) |
| 787 | goto error; | 787 | goto error; |
| 788 | 788 | ||
diff --git a/drivers/media/dvb/frontends/nxt6000.c b/drivers/media/dvb/frontends/nxt6000.c index 0eef22dbf8a..a763ec756f7 100644 --- a/drivers/media/dvb/frontends/nxt6000.c +++ b/drivers/media/dvb/frontends/nxt6000.c | |||
| @@ -545,7 +545,7 @@ struct dvb_frontend* nxt6000_attach(const struct nxt6000_config* config, | |||
| 545 | struct nxt6000_state* state = NULL; | 545 | struct nxt6000_state* state = NULL; |
| 546 | 546 | ||
| 547 | /* allocate memory for the internal state */ | 547 | /* allocate memory for the internal state */ |
| 548 | state = kmalloc(sizeof(struct nxt6000_state), GFP_KERNEL); | 548 | state = kzalloc(sizeof(struct nxt6000_state), GFP_KERNEL); |
| 549 | if (state == NULL) goto error; | 549 | if (state == NULL) goto error; |
| 550 | 550 | ||
| 551 | /* setup the state */ | 551 | /* setup the state */ |
diff --git a/drivers/media/dvb/frontends/or51132.c b/drivers/media/dvb/frontends/or51132.c index 8133ea3cddd..38e67accb8c 100644 --- a/drivers/media/dvb/frontends/or51132.c +++ b/drivers/media/dvb/frontends/or51132.c | |||
| @@ -562,7 +562,7 @@ struct dvb_frontend* or51132_attach(const struct or51132_config* config, | |||
| 562 | struct or51132_state* state = NULL; | 562 | struct or51132_state* state = NULL; |
| 563 | 563 | ||
| 564 | /* Allocate memory for the internal state */ | 564 | /* Allocate memory for the internal state */ |
| 565 | state = kmalloc(sizeof(struct or51132_state), GFP_KERNEL); | 565 | state = kzalloc(sizeof(struct or51132_state), GFP_KERNEL); |
| 566 | if (state == NULL) | 566 | if (state == NULL) |
| 567 | return NULL; | 567 | return NULL; |
| 568 | 568 | ||
diff --git a/drivers/media/dvb/frontends/or51211.c b/drivers/media/dvb/frontends/or51211.c index 16cf2fdd5d7..c709ce6771c 100644 --- a/drivers/media/dvb/frontends/or51211.c +++ b/drivers/media/dvb/frontends/or51211.c | |||
| @@ -527,7 +527,7 @@ struct dvb_frontend* or51211_attach(const struct or51211_config* config, | |||
| 527 | struct or51211_state* state = NULL; | 527 | struct or51211_state* state = NULL; |
| 528 | 528 | ||
| 529 | /* Allocate memory for the internal state */ | 529 | /* Allocate memory for the internal state */ |
| 530 | state = kmalloc(sizeof(struct or51211_state), GFP_KERNEL); | 530 | state = kzalloc(sizeof(struct or51211_state), GFP_KERNEL); |
| 531 | if (state == NULL) | 531 | if (state == NULL) |
| 532 | return NULL; | 532 | return NULL; |
| 533 | 533 | ||
diff --git a/drivers/media/dvb/frontends/s5h1409.c b/drivers/media/dvb/frontends/s5h1409.c index 3e08d985d6e..fb301151842 100644 --- a/drivers/media/dvb/frontends/s5h1409.c +++ b/drivers/media/dvb/frontends/s5h1409.c | |||
| @@ -796,7 +796,7 @@ struct dvb_frontend *s5h1409_attach(const struct s5h1409_config *config, | |||
| 796 | u16 reg; | 796 | u16 reg; |
| 797 | 797 | ||
| 798 | /* allocate memory for the internal state */ | 798 | /* allocate memory for the internal state */ |
| 799 | state = kmalloc(sizeof(struct s5h1409_state), GFP_KERNEL); | 799 | state = kzalloc(sizeof(struct s5h1409_state), GFP_KERNEL); |
| 800 | if (state == NULL) | 800 | if (state == NULL) |
| 801 | goto error; | 801 | goto error; |
| 802 | 802 | ||
diff --git a/drivers/media/dvb/frontends/s5h1411.c b/drivers/media/dvb/frontends/s5h1411.c index 66e2dd6d6fe..d8adf1e3201 100644 --- a/drivers/media/dvb/frontends/s5h1411.c +++ b/drivers/media/dvb/frontends/s5h1411.c | |||
| @@ -844,7 +844,7 @@ struct dvb_frontend *s5h1411_attach(const struct s5h1411_config *config, | |||
| 844 | u16 reg; | 844 | u16 reg; |
| 845 | 845 | ||
| 846 | /* allocate memory for the internal state */ | 846 | /* allocate memory for the internal state */ |
| 847 | state = kmalloc(sizeof(struct s5h1411_state), GFP_KERNEL); | 847 | state = kzalloc(sizeof(struct s5h1411_state), GFP_KERNEL); |
| 848 | if (state == NULL) | 848 | if (state == NULL) |
| 849 | goto error; | 849 | goto error; |
| 850 | 850 | ||
diff --git a/drivers/media/dvb/frontends/si21xx.c b/drivers/media/dvb/frontends/si21xx.c index 0bd16af8a6c..9552a22ccff 100644 --- a/drivers/media/dvb/frontends/si21xx.c +++ b/drivers/media/dvb/frontends/si21xx.c | |||
| @@ -928,7 +928,7 @@ struct dvb_frontend *si21xx_attach(const struct si21xx_config *config, | |||
| 928 | dprintk("%s\n", __func__); | 928 | dprintk("%s\n", __func__); |
| 929 | 929 | ||
| 930 | /* allocate memory for the internal state */ | 930 | /* allocate memory for the internal state */ |
| 931 | state = kmalloc(sizeof(struct si21xx_state), GFP_KERNEL); | 931 | state = kzalloc(sizeof(struct si21xx_state), GFP_KERNEL); |
| 932 | if (state == NULL) | 932 | if (state == NULL) |
| 933 | goto error; | 933 | goto error; |
| 934 | 934 | ||
diff --git a/drivers/media/dvb/frontends/sp8870.c b/drivers/media/dvb/frontends/sp8870.c index 1c9a9b4051b..b85eb60a893 100644 --- a/drivers/media/dvb/frontends/sp8870.c +++ b/drivers/media/dvb/frontends/sp8870.c | |||
| @@ -557,7 +557,7 @@ struct dvb_frontend* sp8870_attach(const struct sp8870_config* config, | |||
| 557 | struct sp8870_state* state = NULL; | 557 | struct sp8870_state* state = NULL; |
| 558 | 558 | ||
| 559 | /* allocate memory for the internal state */ | 559 | /* allocate memory for the internal state */ |
| 560 | state = kmalloc(sizeof(struct sp8870_state), GFP_KERNEL); | 560 | state = kzalloc(sizeof(struct sp8870_state), GFP_KERNEL); |
| 561 | if (state == NULL) goto error; | 561 | if (state == NULL) goto error; |
| 562 | 562 | ||
| 563 | /* setup the state */ | 563 | /* setup the state */ |
diff --git a/drivers/media/dvb/frontends/sp887x.c b/drivers/media/dvb/frontends/sp887x.c index 559509ab4da..4a7c3d84260 100644 --- a/drivers/media/dvb/frontends/sp887x.c +++ b/drivers/media/dvb/frontends/sp887x.c | |||
| @@ -557,7 +557,7 @@ struct dvb_frontend* sp887x_attach(const struct sp887x_config* config, | |||
| 557 | struct sp887x_state* state = NULL; | 557 | struct sp887x_state* state = NULL; |
| 558 | 558 | ||
| 559 | /* allocate memory for the internal state */ | 559 | /* allocate memory for the internal state */ |
| 560 | state = kmalloc(sizeof(struct sp887x_state), GFP_KERNEL); | 560 | state = kzalloc(sizeof(struct sp887x_state), GFP_KERNEL); |
| 561 | if (state == NULL) goto error; | 561 | if (state == NULL) goto error; |
| 562 | 562 | ||
| 563 | /* setup the state */ | 563 | /* setup the state */ |
diff --git a/drivers/media/dvb/frontends/stv0288.c b/drivers/media/dvb/frontends/stv0288.c index ff1194de34c..2930a5d6768 100644 --- a/drivers/media/dvb/frontends/stv0288.c +++ b/drivers/media/dvb/frontends/stv0288.c | |||
| @@ -570,7 +570,7 @@ struct dvb_frontend *stv0288_attach(const struct stv0288_config *config, | |||
| 570 | int id; | 570 | int id; |
| 571 | 571 | ||
| 572 | /* allocate memory for the internal state */ | 572 | /* allocate memory for the internal state */ |
| 573 | state = kmalloc(sizeof(struct stv0288_state), GFP_KERNEL); | 573 | state = kzalloc(sizeof(struct stv0288_state), GFP_KERNEL); |
| 574 | if (state == NULL) | 574 | if (state == NULL) |
| 575 | goto error; | 575 | goto error; |
| 576 | 576 | ||
diff --git a/drivers/media/dvb/frontends/stv0297.c b/drivers/media/dvb/frontends/stv0297.c index 62caf802ed9..4fd7479bb62 100644 --- a/drivers/media/dvb/frontends/stv0297.c +++ b/drivers/media/dvb/frontends/stv0297.c | |||
| @@ -663,7 +663,7 @@ struct dvb_frontend *stv0297_attach(const struct stv0297_config *config, | |||
| 663 | struct stv0297_state *state = NULL; | 663 | struct stv0297_state *state = NULL; |
| 664 | 664 | ||
| 665 | /* allocate memory for the internal state */ | 665 | /* allocate memory for the internal state */ |
| 666 | state = kmalloc(sizeof(struct stv0297_state), GFP_KERNEL); | 666 | state = kzalloc(sizeof(struct stv0297_state), GFP_KERNEL); |
| 667 | if (state == NULL) | 667 | if (state == NULL) |
| 668 | goto error; | 668 | goto error; |
| 669 | 669 | ||
diff --git a/drivers/media/dvb/frontends/stv0299.c b/drivers/media/dvb/frontends/stv0299.c index 6c1cb1973c6..96887446972 100644 --- a/drivers/media/dvb/frontends/stv0299.c +++ b/drivers/media/dvb/frontends/stv0299.c | |||
| @@ -667,7 +667,7 @@ struct dvb_frontend* stv0299_attach(const struct stv0299_config* config, | |||
| 667 | int id; | 667 | int id; |
| 668 | 668 | ||
| 669 | /* allocate memory for the internal state */ | 669 | /* allocate memory for the internal state */ |
| 670 | state = kmalloc(sizeof(struct stv0299_state), GFP_KERNEL); | 670 | state = kzalloc(sizeof(struct stv0299_state), GFP_KERNEL); |
| 671 | if (state == NULL) goto error; | 671 | if (state == NULL) goto error; |
| 672 | 672 | ||
| 673 | /* setup the state */ | 673 | /* setup the state */ |
diff --git a/drivers/media/dvb/frontends/tda10021.c b/drivers/media/dvb/frontends/tda10021.c index f648fdb64bb..f5d7b3277a2 100644 --- a/drivers/media/dvb/frontends/tda10021.c +++ b/drivers/media/dvb/frontends/tda10021.c | |||
| @@ -413,7 +413,7 @@ struct dvb_frontend* tda10021_attach(const struct tda1002x_config* config, | |||
| 413 | u8 id; | 413 | u8 id; |
| 414 | 414 | ||
| 415 | /* allocate memory for the internal state */ | 415 | /* allocate memory for the internal state */ |
| 416 | state = kmalloc(sizeof(struct tda10021_state), GFP_KERNEL); | 416 | state = kzalloc(sizeof(struct tda10021_state), GFP_KERNEL); |
| 417 | if (state == NULL) goto error; | 417 | if (state == NULL) goto error; |
| 418 | 418 | ||
| 419 | /* setup the state */ | 419 | /* setup the state */ |
diff --git a/drivers/media/dvb/frontends/tda10048.c b/drivers/media/dvb/frontends/tda10048.c index cc8862ce4aa..4e2a7c8b2f6 100644 --- a/drivers/media/dvb/frontends/tda10048.c +++ b/drivers/media/dvb/frontends/tda10048.c | |||
| @@ -1095,7 +1095,7 @@ struct dvb_frontend *tda10048_attach(const struct tda10048_config *config, | |||
| 1095 | dprintk(1, "%s()\n", __func__); | 1095 | dprintk(1, "%s()\n", __func__); |
| 1096 | 1096 | ||
| 1097 | /* allocate memory for the internal state */ | 1097 | /* allocate memory for the internal state */ |
| 1098 | state = kmalloc(sizeof(struct tda10048_state), GFP_KERNEL); | 1098 | state = kzalloc(sizeof(struct tda10048_state), GFP_KERNEL); |
| 1099 | if (state == NULL) | 1099 | if (state == NULL) |
| 1100 | goto error; | 1100 | goto error; |
| 1101 | 1101 | ||
diff --git a/drivers/media/dvb/frontends/tda1004x.c b/drivers/media/dvb/frontends/tda1004x.c index 4981cef8b44..f2a8abe0a24 100644 --- a/drivers/media/dvb/frontends/tda1004x.c +++ b/drivers/media/dvb/frontends/tda1004x.c | |||
| @@ -1269,7 +1269,7 @@ struct dvb_frontend* tda10045_attach(const struct tda1004x_config* config, | |||
| 1269 | int id; | 1269 | int id; |
| 1270 | 1270 | ||
| 1271 | /* allocate memory for the internal state */ | 1271 | /* allocate memory for the internal state */ |
| 1272 | state = kmalloc(sizeof(struct tda1004x_state), GFP_KERNEL); | 1272 | state = kzalloc(sizeof(struct tda1004x_state), GFP_KERNEL); |
| 1273 | if (!state) { | 1273 | if (!state) { |
| 1274 | printk(KERN_ERR "Can't alocate memory for tda10045 state\n"); | 1274 | printk(KERN_ERR "Can't alocate memory for tda10045 state\n"); |
| 1275 | return NULL; | 1275 | return NULL; |
| @@ -1339,7 +1339,7 @@ struct dvb_frontend* tda10046_attach(const struct tda1004x_config* config, | |||
| 1339 | int id; | 1339 | int id; |
| 1340 | 1340 | ||
| 1341 | /* allocate memory for the internal state */ | 1341 | /* allocate memory for the internal state */ |
| 1342 | state = kmalloc(sizeof(struct tda1004x_state), GFP_KERNEL); | 1342 | state = kzalloc(sizeof(struct tda1004x_state), GFP_KERNEL); |
| 1343 | if (!state) { | 1343 | if (!state) { |
| 1344 | printk(KERN_ERR "Can't alocate memory for tda10046 state\n"); | 1344 | printk(KERN_ERR "Can't alocate memory for tda10046 state\n"); |
| 1345 | return NULL; | 1345 | return NULL; |
diff --git a/drivers/media/dvb/frontends/tda10086.c b/drivers/media/dvb/frontends/tda10086.c index a17ce3c4ad8..f2c8faac6f3 100644 --- a/drivers/media/dvb/frontends/tda10086.c +++ b/drivers/media/dvb/frontends/tda10086.c | |||
| @@ -745,7 +745,7 @@ struct dvb_frontend* tda10086_attach(const struct tda10086_config* config, | |||
| 745 | dprintk ("%s\n", __func__); | 745 | dprintk ("%s\n", __func__); |
| 746 | 746 | ||
| 747 | /* allocate memory for the internal state */ | 747 | /* allocate memory for the internal state */ |
| 748 | state = kmalloc(sizeof(struct tda10086_state), GFP_KERNEL); | 748 | state = kzalloc(sizeof(struct tda10086_state), GFP_KERNEL); |
| 749 | if (!state) | 749 | if (!state) |
| 750 | return NULL; | 750 | return NULL; |
| 751 | 751 | ||
diff --git a/drivers/media/dvb/frontends/tda8083.c b/drivers/media/dvb/frontends/tda8083.c index 5b843b2e67e..9369f7442f2 100644 --- a/drivers/media/dvb/frontends/tda8083.c +++ b/drivers/media/dvb/frontends/tda8083.c | |||
| @@ -417,7 +417,7 @@ struct dvb_frontend* tda8083_attach(const struct tda8083_config* config, | |||
| 417 | struct tda8083_state* state = NULL; | 417 | struct tda8083_state* state = NULL; |
| 418 | 418 | ||
| 419 | /* allocate memory for the internal state */ | 419 | /* allocate memory for the internal state */ |
| 420 | state = kmalloc(sizeof(struct tda8083_state), GFP_KERNEL); | 420 | state = kzalloc(sizeof(struct tda8083_state), GFP_KERNEL); |
| 421 | if (state == NULL) goto error; | 421 | if (state == NULL) goto error; |
| 422 | 422 | ||
| 423 | /* setup the state */ | 423 | /* setup the state */ |
diff --git a/drivers/media/dvb/frontends/ves1820.c b/drivers/media/dvb/frontends/ves1820.c index a184597f1d9..6e78e486551 100644 --- a/drivers/media/dvb/frontends/ves1820.c +++ b/drivers/media/dvb/frontends/ves1820.c | |||
| @@ -374,7 +374,7 @@ struct dvb_frontend* ves1820_attach(const struct ves1820_config* config, | |||
| 374 | struct ves1820_state* state = NULL; | 374 | struct ves1820_state* state = NULL; |
| 375 | 375 | ||
| 376 | /* allocate memory for the internal state */ | 376 | /* allocate memory for the internal state */ |
| 377 | state = kmalloc(sizeof(struct ves1820_state), GFP_KERNEL); | 377 | state = kzalloc(sizeof(struct ves1820_state), GFP_KERNEL); |
| 378 | if (state == NULL) | 378 | if (state == NULL) |
| 379 | goto error; | 379 | goto error; |
| 380 | 380 | ||
diff --git a/drivers/media/dvb/frontends/ves1x93.c b/drivers/media/dvb/frontends/ves1x93.c index bd558960bd8..8d7854c2fb0 100644 --- a/drivers/media/dvb/frontends/ves1x93.c +++ b/drivers/media/dvb/frontends/ves1x93.c | |||
| @@ -456,7 +456,7 @@ struct dvb_frontend* ves1x93_attach(const struct ves1x93_config* config, | |||
| 456 | u8 identity; | 456 | u8 identity; |
| 457 | 457 | ||
| 458 | /* allocate memory for the internal state */ | 458 | /* allocate memory for the internal state */ |
| 459 | state = kmalloc(sizeof(struct ves1x93_state), GFP_KERNEL); | 459 | state = kzalloc(sizeof(struct ves1x93_state), GFP_KERNEL); |
| 460 | if (state == NULL) goto error; | 460 | if (state == NULL) goto error; |
| 461 | 461 | ||
| 462 | /* setup the state */ | 462 | /* setup the state */ |
diff --git a/drivers/media/dvb/frontends/zl10353.c b/drivers/media/dvb/frontends/zl10353.c index 148b6f7f6cb..66f5c1fb307 100644 --- a/drivers/media/dvb/frontends/zl10353.c +++ b/drivers/media/dvb/frontends/zl10353.c | |||
| @@ -98,7 +98,6 @@ static int zl10353_read_register(struct zl10353_state *state, u8 reg) | |||
| 98 | static void zl10353_dump_regs(struct dvb_frontend *fe) | 98 | static void zl10353_dump_regs(struct dvb_frontend *fe) |
| 99 | { | 99 | { |
| 100 | struct zl10353_state *state = fe->demodulator_priv; | 100 | struct zl10353_state *state = fe->demodulator_priv; |
| 101 | char buf[52], buf2[4]; | ||
| 102 | int ret; | 101 | int ret; |
| 103 | u8 reg; | 102 | u8 reg; |
| 104 | 103 | ||
| @@ -106,19 +105,18 @@ static void zl10353_dump_regs(struct dvb_frontend *fe) | |||
| 106 | for (reg = 0; ; reg++) { | 105 | for (reg = 0; ; reg++) { |
| 107 | if (reg % 16 == 0) { | 106 | if (reg % 16 == 0) { |
| 108 | if (reg) | 107 | if (reg) |
| 109 | printk(KERN_DEBUG "%s\n", buf); | 108 | printk(KERN_CONT "\n"); |
| 110 | sprintf(buf, "%02x: ", reg); | 109 | printk(KERN_DEBUG "%02x:", reg); |
| 111 | } | 110 | } |
| 112 | ret = zl10353_read_register(state, reg); | 111 | ret = zl10353_read_register(state, reg); |
| 113 | if (ret >= 0) | 112 | if (ret >= 0) |
| 114 | sprintf(buf2, "%02x ", (u8)ret); | 113 | printk(KERN_CONT " %02x", (u8)ret); |
| 115 | else | 114 | else |
| 116 | strcpy(buf2, "-- "); | 115 | printk(KERN_CONT " --"); |
| 117 | strcat(buf, buf2); | ||
| 118 | if (reg == 0xff) | 116 | if (reg == 0xff) |
| 119 | break; | 117 | break; |
| 120 | } | 118 | } |
| 121 | printk(KERN_DEBUG "%s\n", buf); | 119 | printk(KERN_CONT "\n"); |
| 122 | } | 120 | } |
| 123 | 121 | ||
| 124 | static void zl10353_calc_nominal_rate(struct dvb_frontend *fe, | 122 | static void zl10353_calc_nominal_rate(struct dvb_frontend *fe, |
diff --git a/drivers/media/dvb/siano/Kconfig b/drivers/media/dvb/siano/Kconfig index dd863f26167..88847d1dcbb 100644 --- a/drivers/media/dvb/siano/Kconfig +++ b/drivers/media/dvb/siano/Kconfig | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | 4 | ||
| 5 | config DVB_SIANO_SMS1XXX | 5 | config DVB_SIANO_SMS1XXX |
| 6 | tristate "Siano SMS1XXX USB dongle support" | 6 | tristate "Siano SMS1XXX USB dongle support" |
| 7 | depends on DVB_CORE && USB | 7 | depends on DVB_CORE && USB && INPUT |
| 8 | ---help--- | 8 | ---help--- |
| 9 | Choose Y here if you have a USB dongle with a SMS1XXX chipset. | 9 | Choose Y here if you have a USB dongle with a SMS1XXX chipset. |
| 10 | 10 | ||
diff --git a/drivers/media/dvb/siano/sms-cards.c b/drivers/media/dvb/siano/sms-cards.c index d8b15d583bd..0420e2885e7 100644 --- a/drivers/media/dvb/siano/sms-cards.c +++ b/drivers/media/dvb/siano/sms-cards.c | |||
| @@ -116,99 +116,21 @@ static inline void sms_gpio_assign_11xx_default_led_config( | |||
| 116 | 116 | ||
| 117 | int sms_board_event(struct smscore_device_t *coredev, | 117 | int sms_board_event(struct smscore_device_t *coredev, |
| 118 | enum SMS_BOARD_EVENTS gevent) { | 118 | enum SMS_BOARD_EVENTS gevent) { |
| 119 | int board_id = smscore_get_board_id(coredev); | ||
| 120 | struct sms_board *board = sms_get_board(board_id); | ||
| 121 | struct smscore_gpio_config MyGpioConfig; | 119 | struct smscore_gpio_config MyGpioConfig; |
| 122 | 120 | ||
| 123 | sms_gpio_assign_11xx_default_led_config(&MyGpioConfig); | 121 | sms_gpio_assign_11xx_default_led_config(&MyGpioConfig); |
| 124 | 122 | ||
| 125 | switch (gevent) { | 123 | switch (gevent) { |
| 126 | case BOARD_EVENT_POWER_INIT: /* including hotplug */ | 124 | case BOARD_EVENT_POWER_INIT: /* including hotplug */ |
| 127 | switch (board_id) { | ||
| 128 | case SMS1XXX_BOARD_HAUPPAUGE_WINDHAM: | ||
| 129 | /* set I/O and turn off all LEDs */ | ||
| 130 | smscore_gpio_configure(coredev, | ||
| 131 | board->board_cfg.leds_power, | ||
| 132 | &MyGpioConfig); | ||
| 133 | smscore_gpio_set_level(coredev, | ||
| 134 | board->board_cfg.leds_power, 0); | ||
| 135 | smscore_gpio_configure(coredev, board->board_cfg.led0, | ||
| 136 | &MyGpioConfig); | ||
| 137 | smscore_gpio_set_level(coredev, | ||
| 138 | board->board_cfg.led0, 0); | ||
| 139 | smscore_gpio_configure(coredev, board->board_cfg.led1, | ||
| 140 | &MyGpioConfig); | ||
| 141 | smscore_gpio_set_level(coredev, | ||
| 142 | board->board_cfg.led1, 0); | ||
| 143 | break; | ||
| 144 | case SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD_R2: | ||
| 145 | case SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD: | ||
| 146 | /* set I/O and turn off LNA */ | ||
| 147 | smscore_gpio_configure(coredev, | ||
| 148 | board->board_cfg.foreign_lna0_ctrl, | ||
| 149 | &MyGpioConfig); | ||
| 150 | smscore_gpio_set_level(coredev, | ||
| 151 | board->board_cfg.foreign_lna0_ctrl, | ||
| 152 | 0); | ||
| 153 | break; | ||
| 154 | } | ||
| 155 | break; /* BOARD_EVENT_BIND */ | 125 | break; /* BOARD_EVENT_BIND */ |
| 156 | 126 | ||
| 157 | case BOARD_EVENT_POWER_SUSPEND: | 127 | case BOARD_EVENT_POWER_SUSPEND: |
| 158 | switch (board_id) { | ||
| 159 | case SMS1XXX_BOARD_HAUPPAUGE_WINDHAM: | ||
| 160 | smscore_gpio_set_level(coredev, | ||
| 161 | board->board_cfg.leds_power, 0); | ||
| 162 | smscore_gpio_set_level(coredev, | ||
| 163 | board->board_cfg.led0, 0); | ||
| 164 | smscore_gpio_set_level(coredev, | ||
| 165 | board->board_cfg.led1, 0); | ||
| 166 | break; | ||
| 167 | case SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD_R2: | ||
| 168 | case SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD: | ||
| 169 | smscore_gpio_set_level(coredev, | ||
| 170 | board->board_cfg.foreign_lna0_ctrl, | ||
| 171 | 0); | ||
| 172 | break; | ||
| 173 | } | ||
| 174 | break; /* BOARD_EVENT_POWER_SUSPEND */ | 128 | break; /* BOARD_EVENT_POWER_SUSPEND */ |
| 175 | 129 | ||
| 176 | case BOARD_EVENT_POWER_RESUME: | 130 | case BOARD_EVENT_POWER_RESUME: |
| 177 | switch (board_id) { | ||
| 178 | case SMS1XXX_BOARD_HAUPPAUGE_WINDHAM: | ||
| 179 | smscore_gpio_set_level(coredev, | ||
| 180 | board->board_cfg.leds_power, 1); | ||
| 181 | smscore_gpio_set_level(coredev, | ||
| 182 | board->board_cfg.led0, 1); | ||
| 183 | smscore_gpio_set_level(coredev, | ||
| 184 | board->board_cfg.led1, 0); | ||
| 185 | break; | ||
| 186 | case SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD_R2: | ||
| 187 | case SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD: | ||
| 188 | smscore_gpio_set_level(coredev, | ||
| 189 | board->board_cfg.foreign_lna0_ctrl, | ||
| 190 | 1); | ||
| 191 | break; | ||
| 192 | } | ||
| 193 | break; /* BOARD_EVENT_POWER_RESUME */ | 131 | break; /* BOARD_EVENT_POWER_RESUME */ |
| 194 | 132 | ||
| 195 | case BOARD_EVENT_BIND: | 133 | case BOARD_EVENT_BIND: |
| 196 | switch (board_id) { | ||
| 197 | case SMS1XXX_BOARD_HAUPPAUGE_WINDHAM: | ||
| 198 | smscore_gpio_set_level(coredev, | ||
| 199 | board->board_cfg.leds_power, 1); | ||
| 200 | smscore_gpio_set_level(coredev, | ||
| 201 | board->board_cfg.led0, 1); | ||
| 202 | smscore_gpio_set_level(coredev, | ||
| 203 | board->board_cfg.led1, 0); | ||
| 204 | break; | ||
| 205 | case SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD_R2: | ||
| 206 | case SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD: | ||
| 207 | smscore_gpio_set_level(coredev, | ||
| 208 | board->board_cfg.foreign_lna0_ctrl, | ||
| 209 | 1); | ||
| 210 | break; | ||
| 211 | } | ||
| 212 | break; /* BOARD_EVENT_BIND */ | 134 | break; /* BOARD_EVENT_BIND */ |
| 213 | 135 | ||
| 214 | case BOARD_EVENT_SCAN_PROG: | 136 | case BOARD_EVENT_SCAN_PROG: |
| @@ -218,20 +140,8 @@ int sms_board_event(struct smscore_device_t *coredev, | |||
| 218 | case BOARD_EVENT_EMERGENCY_WARNING_SIGNAL: | 140 | case BOARD_EVENT_EMERGENCY_WARNING_SIGNAL: |
| 219 | break; /* BOARD_EVENT_EMERGENCY_WARNING_SIGNAL */ | 141 | break; /* BOARD_EVENT_EMERGENCY_WARNING_SIGNAL */ |
| 220 | case BOARD_EVENT_FE_LOCK: | 142 | case BOARD_EVENT_FE_LOCK: |
| 221 | switch (board_id) { | ||
| 222 | case SMS1XXX_BOARD_HAUPPAUGE_WINDHAM: | ||
| 223 | smscore_gpio_set_level(coredev, | ||
| 224 | board->board_cfg.led1, 1); | ||
| 225 | break; | ||
| 226 | } | ||
| 227 | break; /* BOARD_EVENT_FE_LOCK */ | 143 | break; /* BOARD_EVENT_FE_LOCK */ |
| 228 | case BOARD_EVENT_FE_UNLOCK: | 144 | case BOARD_EVENT_FE_UNLOCK: |
| 229 | switch (board_id) { | ||
| 230 | case SMS1XXX_BOARD_HAUPPAUGE_WINDHAM: | ||
| 231 | smscore_gpio_set_level(coredev, | ||
| 232 | board->board_cfg.led1, 0); | ||
| 233 | break; | ||
| 234 | } | ||
| 235 | break; /* BOARD_EVENT_FE_UNLOCK */ | 145 | break; /* BOARD_EVENT_FE_UNLOCK */ |
| 236 | case BOARD_EVENT_DEMOD_LOCK: | 146 | case BOARD_EVENT_DEMOD_LOCK: |
| 237 | break; /* BOARD_EVENT_DEMOD_LOCK */ | 147 | break; /* BOARD_EVENT_DEMOD_LOCK */ |
| @@ -248,20 +158,8 @@ int sms_board_event(struct smscore_device_t *coredev, | |||
| 248 | case BOARD_EVENT_RECEPTION_LOST_0: | 158 | case BOARD_EVENT_RECEPTION_LOST_0: |
| 249 | break; /* BOARD_EVENT_RECEPTION_LOST_0 */ | 159 | break; /* BOARD_EVENT_RECEPTION_LOST_0 */ |
| 250 | case BOARD_EVENT_MULTIPLEX_OK: | 160 | case BOARD_EVENT_MULTIPLEX_OK: |
| 251 | switch (board_id) { | ||
| 252 | case SMS1XXX_BOARD_HAUPPAUGE_WINDHAM: | ||
| 253 | smscore_gpio_set_level(coredev, | ||
| 254 | board->board_cfg.led1, 1); | ||
| 255 | break; | ||
| 256 | } | ||
| 257 | break; /* BOARD_EVENT_MULTIPLEX_OK */ | 161 | break; /* BOARD_EVENT_MULTIPLEX_OK */ |
| 258 | case BOARD_EVENT_MULTIPLEX_ERRORS: | 162 | case BOARD_EVENT_MULTIPLEX_ERRORS: |
| 259 | switch (board_id) { | ||
| 260 | case SMS1XXX_BOARD_HAUPPAUGE_WINDHAM: | ||
| 261 | smscore_gpio_set_level(coredev, | ||
| 262 | board->board_cfg.led1, 0); | ||
| 263 | break; | ||
| 264 | } | ||
| 265 | break; /* BOARD_EVENT_MULTIPLEX_ERRORS */ | 163 | break; /* BOARD_EVENT_MULTIPLEX_ERRORS */ |
| 266 | 164 | ||
| 267 | default: | 165 | default: |
diff --git a/drivers/media/dvb/siano/smscoreapi.c b/drivers/media/dvb/siano/smscoreapi.c index a246903c334..bd9ab9d0d12 100644 --- a/drivers/media/dvb/siano/smscoreapi.c +++ b/drivers/media/dvb/siano/smscoreapi.c | |||
| @@ -816,7 +816,7 @@ int smscore_set_device_mode(struct smscore_device_t *coredev, int mode) | |||
| 816 | 816 | ||
| 817 | sms_debug("set device mode to %d", mode); | 817 | sms_debug("set device mode to %d", mode); |
| 818 | if (coredev->device_flags & SMS_DEVICE_FAMILY2) { | 818 | if (coredev->device_flags & SMS_DEVICE_FAMILY2) { |
| 819 | if (mode < DEVICE_MODE_DVBT || mode > DEVICE_MODE_RAW_TUNER) { | 819 | if (mode < DEVICE_MODE_DVBT || mode >= DEVICE_MODE_RAW_TUNER) { |
| 820 | sms_err("invalid mode specified %d", mode); | 820 | sms_err("invalid mode specified %d", mode); |
| 821 | return -EINVAL; | 821 | return -EINVAL; |
| 822 | } | 822 | } |
