Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 324372
b: refs/heads/master
c: 0cfc1e1
h: refs/heads/master
v: v3
  • Loading branch information
Ming Lei authored and Greg Kroah-Hartman committed Aug 16, 2012
1 parent b1fb9fb commit 6b65fad
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2887b3959c8b2f6ed1f62ce95c0888aedb1ea84b
refs/heads/master: 0cfc1e1e7b5347b4b6df1212f365ce6620bdd98f
6 changes: 6 additions & 0 deletions trunk/drivers/base/firmware_class.c
Original file line number Diff line number Diff line change
Expand Up @@ -742,6 +742,8 @@ static int _request_firmware_load(struct firmware_priv *fw_priv, bool uevent,
* @name will be used as $FIRMWARE in the uevent environment and
* should be distinctive enough not to be confused with any other
* firmware image for this or any other device.
*
* Caller must hold the reference count of @device.
**/
int
request_firmware(const struct firmware **firmware_p, const char *name,
Expand Down Expand Up @@ -823,6 +825,7 @@ static void request_firmware_work_func(struct work_struct *work)

out:
fw_work->cont(fw, fw_work->context);
put_device(fw_work->device);

module_put(fw_work->module);
kfree(fw_work);
Expand All @@ -841,6 +844,8 @@ static void request_firmware_work_func(struct work_struct *work)
* @cont: function will be called asynchronously when the firmware
* request is over.
*
* Caller must hold the reference count of @device.
*
* Asynchronous variant of request_firmware() for user contexts where
* it is not possible to sleep for long time. It can't be called
* in atomic contexts.
Expand Down Expand Up @@ -869,6 +874,7 @@ request_firmware_nowait(
return -EFAULT;
}

get_device(fw_work->device);
INIT_WORK(&fw_work->work, request_firmware_work_func);
schedule_work(&fw_work->work);
return 0;
Expand Down

0 comments on commit 6b65fad

Please sign in to comment.