diff options
Diffstat (limited to 'drivers/base')
-rw-r--r-- | drivers/base/firmware_class.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c index c0a979a5074b..97ab5bd1c4d6 100644 --- a/drivers/base/firmware_class.c +++ b/drivers/base/firmware_class.c | |||
@@ -31,8 +31,6 @@ enum { | |||
31 | FW_STATUS_LOADING, | 31 | FW_STATUS_LOADING, |
32 | FW_STATUS_DONE, | 32 | FW_STATUS_DONE, |
33 | FW_STATUS_ABORT, | 33 | FW_STATUS_ABORT, |
34 | FW_STATUS_READY, | ||
35 | FW_STATUS_READY_NOHOTPLUG, | ||
36 | }; | 34 | }; |
37 | 35 | ||
38 | static int loading_timeout = 60; /* In seconds */ | 36 | static int loading_timeout = 60; /* In seconds */ |
@@ -96,9 +94,6 @@ static int firmware_uevent(struct device *dev, char **envp, int num_envp, | |||
96 | struct firmware_priv *fw_priv = dev_get_drvdata(dev); | 94 | struct firmware_priv *fw_priv = dev_get_drvdata(dev); |
97 | int i = 0, len = 0; | 95 | int i = 0, len = 0; |
98 | 96 | ||
99 | if (!test_bit(FW_STATUS_READY, &fw_priv->status)) | ||
100 | return -ENODEV; | ||
101 | |||
102 | if (add_uevent_var(envp, num_envp, &i, buffer, buffer_size, &len, | 97 | if (add_uevent_var(envp, num_envp, &i, buffer, buffer_size, &len, |
103 | "FIRMWARE=%s", fw_priv->fw_id)) | 98 | "FIRMWARE=%s", fw_priv->fw_id)) |
104 | return -ENOMEM; | 99 | return -ENOMEM; |
@@ -333,6 +328,7 @@ static int fw_register_device(struct device **dev_p, const char *fw_name, | |||
333 | f_dev->parent = device; | 328 | f_dev->parent = device; |
334 | f_dev->class = &firmware_class; | 329 | f_dev->class = &firmware_class; |
335 | dev_set_drvdata(f_dev, fw_priv); | 330 | dev_set_drvdata(f_dev, fw_priv); |
331 | f_dev->uevent_suppress = 1; | ||
336 | retval = device_register(f_dev); | 332 | retval = device_register(f_dev); |
337 | if (retval) { | 333 | if (retval) { |
338 | printk(KERN_ERR "%s: device_register failed\n", | 334 | printk(KERN_ERR "%s: device_register failed\n", |
@@ -382,9 +378,7 @@ static int fw_setup_device(struct firmware *fw, struct device **dev_p, | |||
382 | } | 378 | } |
383 | 379 | ||
384 | if (uevent) | 380 | if (uevent) |
385 | set_bit(FW_STATUS_READY, &fw_priv->status); | 381 | f_dev->uevent_suppress = 0; |
386 | else | ||
387 | set_bit(FW_STATUS_READY_NOHOTPLUG, &fw_priv->status); | ||
388 | *dev_p = f_dev; | 382 | *dev_p = f_dev; |
389 | goto out; | 383 | goto out; |
390 | 384 | ||