diff options
-rw-r--r-- | drivers/media/dvb/frontends/tda1004x.c | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/drivers/media/dvb/frontends/tda1004x.c b/drivers/media/dvb/frontends/tda1004x.c index c47501ae8b0e..dbfc94a9c3f7 100644 --- a/drivers/media/dvb/frontends/tda1004x.c +++ b/drivers/media/dvb/frontends/tda1004x.c | |||
@@ -515,18 +515,24 @@ static int tda10046_fwupload(struct dvb_frontend* fe) | |||
515 | if (tda1004x_check_upload_ok(state) == 0) | 515 | if (tda1004x_check_upload_ok(state) == 0) |
516 | return 0; | 516 | return 0; |
517 | 517 | ||
518 | /* request the firmware, this will block until someone uploads it */ | 518 | if (state->config->request_firmware != NULL) { |
519 | printk(KERN_INFO "tda1004x: waiting for firmware upload...\n"); | 519 | /* request the firmware, this will block until someone uploads it */ |
520 | ret = state->config->request_firmware(fe, &fw, TDA10046_DEFAULT_FIRMWARE); | 520 | printk(KERN_INFO "tda1004x: waiting for firmware upload...\n"); |
521 | if (ret) { | 521 | ret = state->config->request_firmware(fe, &fw, TDA10046_DEFAULT_FIRMWARE); |
522 | /* remain compatible to old bug: try to load with tda10045 image name */ | ||
523 | ret = state->config->request_firmware(fe, &fw, TDA10045_DEFAULT_FIRMWARE); | ||
524 | if (ret) { | 522 | if (ret) { |
525 | printk(KERN_ERR "tda1004x: no firmware upload (timeout or file not found?)\n"); | 523 | /* remain compatible to old bug: try to load with tda10045 image name */ |
526 | return ret; | 524 | ret = state->config->request_firmware(fe, &fw, TDA10045_DEFAULT_FIRMWARE); |
527 | } else | 525 | if (ret) { |
528 | printk(KERN_INFO "tda1004x: please rename the firmware file to %s\n", | 526 | printk(KERN_ERR "tda1004x: no firmware upload (timeout or file not found?)\n"); |
529 | TDA10046_DEFAULT_FIRMWARE); | 527 | return ret; |
528 | } else { | ||
529 | printk(KERN_INFO "tda1004x: please rename the firmware file to %s\n", | ||
530 | TDA10046_DEFAULT_FIRMWARE); | ||
531 | } | ||
532 | } | ||
533 | } else { | ||
534 | printk(KERN_ERR "tda1004x: no request function defined, can't upload from file\n"); | ||
535 | return -EIO; | ||
530 | } | 536 | } |
531 | tda1004x_write_mask(state, TDA1004X_CONFC4, 8, 8); // going to boot from HOST | 537 | tda1004x_write_mask(state, TDA1004X_CONFC4, 8, 8); // going to boot from HOST |
532 | ret = tda1004x_do_upload(state, fw->data, fw->size, TDA10046H_CODE_CPT, TDA10046H_CODE_IN); | 538 | ret = tda1004x_do_upload(state, fw->data, fw->size, TDA10046H_CODE_CPT, TDA10046H_CODE_IN); |