Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 353725
b: refs/heads/master
c: 807be03
h: refs/heads/master
i:
  353723: caf42b5
v: v3
  • Loading branch information
Takashi Iwai authored and Greg Kroah-Hartman committed Feb 4, 2013
1 parent 65dd9d6 commit 503c0d6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: cd7239fab7d32e56909027bfb5a6c2d7d3d862f8
refs/heads/master: 807be03cae191cb88e2f267adcd49aba785c658b
11 changes: 9 additions & 2 deletions trunk/drivers/base/firmware_class.c
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,9 @@ static void fw_load_abort(struct firmware_priv *fw_priv)
complete_all(&buf->completion);
}

#define is_fw_load_aborted(buf) \
test_bit(FW_STATUS_ABORT, &(buf)->status)

static ssize_t firmware_timeout_show(struct class *class,
struct class_attribute *attr,
char *buf)
Expand Down Expand Up @@ -891,6 +894,10 @@ fw_load_from_user_helper(struct firmware *firmware, const char *name,
{
return -ENOENT;
}

/* No abort during direct loading */
#define is_fw_load_aborted(buf) false

#endif /* CONFIG_FW_LOADER_USER_HELPER */


Expand All @@ -901,7 +908,7 @@ static int sync_cached_firmware_buf(struct firmware_buf *buf)

mutex_lock(&fw_lock);
while (!test_bit(FW_STATUS_DONE, &buf->status)) {
if (test_bit(FW_STATUS_ABORT, &buf->status)) {
if (is_fw_load_aborted(buf)) {
ret = -ENOENT;
break;
}
Expand Down Expand Up @@ -963,7 +970,7 @@ static int assign_firmware_buf(struct firmware *fw, struct device *device)
struct firmware_buf *buf = fw->priv;

mutex_lock(&fw_lock);
if (!buf->size || test_bit(FW_STATUS_ABORT, &buf->status)) {
if (!buf->size || is_fw_load_aborted(buf)) {
mutex_unlock(&fw_lock);
return -ENOENT;
}
Expand Down

0 comments on commit 503c0d6

Please sign in to comment.