Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f4546e702a89d2e483570f0f16c5155bb781cc38
Commit:     f4546e702a89d2e483570f0f16c5155bb781cc38
Parent:     58ef4f924cf2824ae198b1fec3eea1e4059a021c
Author:     Hartmut Hackmann <[EMAIL PROTECTED]>
AuthorDate: Fri Apr 27 12:31:13 2007 -0300
Committer:  Mauro Carvalho Chehab <[EMAIL PROTECTED]>
CommitDate: Fri Apr 27 15:43:33 2007 -0300

    V4L/DVB (5315): Tda1004x: check request firmware for NULL ponter again
    
    In older versions, this was used to decide whether to boot from
    eeprom or file. This is no longer necessary but the check helps to avoid
    an oops with misconfigured cards.
    
    Signed-off-by: Hartmut Hackmann <[EMAIL PROTECTED]>
    Signed-off-by: Mauro Carvalho Chehab <[EMAIL PROTECTED]>
---
 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 c47501a..dbfc94a 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)
        if (tda1004x_check_upload_ok(state) == 0)
                return 0;
 
-       /* request the firmware, this will block until someone uploads it */
-       printk(KERN_INFO "tda1004x: waiting for firmware upload...\n");
-       ret = state->config->request_firmware(fe, &fw, 
TDA10046_DEFAULT_FIRMWARE);
-       if (ret) {
-               /* remain compatible to old bug: try to load with tda10045 
image name */
-               ret = state->config->request_firmware(fe, &fw, 
TDA10045_DEFAULT_FIRMWARE);
+       if (state->config->request_firmware != NULL) {
+               /* request the firmware, this will block until someone uploads 
it */
+               printk(KERN_INFO "tda1004x: waiting for firmware upload...\n");
+               ret = state->config->request_firmware(fe, &fw, 
TDA10046_DEFAULT_FIRMWARE);
                if (ret) {
-                       printk(KERN_ERR "tda1004x: no firmware upload (timeout 
or file not found?)\n");
-                       return ret;
-               } else
-                       printk(KERN_INFO "tda1004x: please rename the firmware 
file to %s\n",
-                                         TDA10046_DEFAULT_FIRMWARE);
+                       /* remain compatible to old bug: try to load with 
tda10045 image name */
+                       ret = state->config->request_firmware(fe, &fw, 
TDA10045_DEFAULT_FIRMWARE);
+                       if (ret) {
+                               printk(KERN_ERR "tda1004x: no firmware upload 
(timeout or file not found?)\n");
+                               return ret;
+                       } else {
+                               printk(KERN_INFO "tda1004x: please rename the 
firmware file to %s\n",
+                                                 TDA10046_DEFAULT_FIRMWARE);
+                       }
+               }
+       } else {
+               printk(KERN_ERR "tda1004x: no request function defined, can't 
upload from file\n");
+               return -EIO;
        }
        tda1004x_write_mask(state, TDA1004X_CONFC4, 8, 8); // going to boot 
from HOST
        ret = tda1004x_do_upload(state, fw->data, fw->size, TDA10046H_CODE_CPT, 
TDA10046H_CODE_IN);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to