Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 196044
b: refs/heads/master
c: e9045f9
h: refs/heads/master
v: v3
  • Loading branch information
Johannes Berg authored and Greg Kroah-Hartman committed May 21, 2010
1 parent 567c243 commit f3628ed
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 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: 1704f47b50b5d9e1b825e43e1baaf2c5897baf03
refs/heads/master: e9045f9178f3e3445a3a5b85206f8681b3869562
16 changes: 11 additions & 5 deletions trunk/drivers/base/firmware_class.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ struct firmware_priv {
int page_array_size;
const char *vdata;
struct timer_list timeout;
bool nowait;
};

#ifdef CONFIG_FW_LOADER
Expand Down Expand Up @@ -112,6 +113,8 @@ static int firmware_uevent(struct device *dev, struct kobj_uevent_env *env)
return -ENOMEM;
if (add_uevent_var(env, "TIMEOUT=%i", loading_timeout))
return -ENOMEM;
if (add_uevent_var(env, "ASYNC=%d", fw_priv->nowait))
return -ENOMEM;

return 0;
}
Expand Down Expand Up @@ -441,7 +444,7 @@ static int fw_register_device(struct device **dev_p, const char *fw_name,

static int fw_setup_device(struct firmware *fw, struct device **dev_p,
const char *fw_name, struct device *device,
int uevent)
int uevent, bool nowait)
{
struct device *f_dev;
struct firmware_priv *fw_priv;
Expand All @@ -457,6 +460,8 @@ static int fw_setup_device(struct firmware *fw, struct device **dev_p,

fw_priv = dev_get_drvdata(f_dev);

fw_priv->nowait = nowait;

fw_priv->fw = fw;
sysfs_bin_attr_init(&fw_priv->attr_data);
retval = sysfs_create_bin_file(&f_dev->kobj, &fw_priv->attr_data);
Expand Down Expand Up @@ -484,7 +489,7 @@ static int fw_setup_device(struct firmware *fw, struct device **dev_p,

static int
_request_firmware(const struct firmware **firmware_p, const char *name,
struct device *device, int uevent)
struct device *device, int uevent, bool nowait)
{
struct device *f_dev;
struct firmware_priv *fw_priv;
Expand Down Expand Up @@ -516,7 +521,8 @@ _request_firmware(const struct firmware **firmware_p, const char *name,
if (uevent)
dev_dbg(device, "firmware: requesting %s\n", name);

retval = fw_setup_device(firmware, &f_dev, name, device, uevent);
retval = fw_setup_device(firmware, &f_dev, name, device,
uevent, nowait);
if (retval)
goto error_kfree_fw;

Expand Down Expand Up @@ -573,7 +579,7 @@ request_firmware(const struct firmware **firmware_p, const char *name,
struct device *device)
{
int uevent = 1;
return _request_firmware(firmware_p, name, device, uevent);
return _request_firmware(firmware_p, name, device, uevent, false);
}

/**
Expand Down Expand Up @@ -619,7 +625,7 @@ request_firmware_work_func(void *arg)
return 0;
}
ret = _request_firmware(&fw, fw_work->name, fw_work->device,
fw_work->uevent);
fw_work->uevent, true);

fw_work->cont(fw, fw_work->context);

Expand Down

0 comments on commit f3628ed

Please sign in to comment.