diff options
author | Benoit Goby <benoit@android.com> | 2010-11-09 18:10:24 -0800 |
---|---|---|
committer | Benoit Goby <benoit@android.com> | 2010-11-09 18:49:40 -0800 |
commit | 609d8828d3b8266a80606bf902d1294296962cf3 (patch) | |
tree | 7dacbd44006ea6f4f0a9a11ddadd0adddb19801e /init | |
parent | 16ae478af46100a435c2875afa020721a59a411a (diff) | |
download | system_core-609d8828d3b8266a80606bf902d1294296962cf3.zip system_core-609d8828d3b8266a80606bf902d1294296962cf3.tar.gz system_core-609d8828d3b8266a80606bf902d1294296962cf3.tar.bz2 |
init: Abort firmware transfer if firmware is missing
If firmware is not found, write -1 /sys/$DEVPATH/loading to cancel the
firmware load. Otherwise the driver has to wait for the 60s timeout.
Change-Id: Id2787cda9b2be45b9adea41f6f161cd54cda212e
Signed-off-by: Benoit Goby <benoit@android.com>
Diffstat (limited to 'init')
-rw-r--r-- | init/devices.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/init/devices.c b/init/devices.c index 1e4ee6d..db229d3 100644 --- a/init/devices.c +++ b/init/devices.c @@ -589,8 +589,10 @@ static void process_firmware_event(struct uevent *uevent) fw_fd = open(file1, O_RDONLY); if(fw_fd < 0) { fw_fd = open(file2, O_RDONLY); - if(fw_fd < 0) + if (fw_fd < 0) { + write(loading_fd, "-1", 2); goto data_close_out; + } } if(!load_firmware(fw_fd, loading_fd, data_fd)) |