aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMing Lei <ming.lei@canonical.com>2012-08-04 00:01:19 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-08-16 16:13:19 -0400
commit99c2aa72306079976369aad7fc62cc71931d692a (patch)
treed78941494cc9a1fc2a46af44daac5db9c186d897
parent0c25a850f7f336cd3bf2b0a479fe70cecb242c6e (diff)
firmware loader: fix creation failure of fw loader device
If one device driver calls request_firmware_nowait() to request several different firmwares' loading, device_add() will return failure since all firmware loader device use same name of the device who is requesting firmware. This patch always use the name of firmware image as the firmware loader device name to fix the problem since the following patches for caching firmware will make sure only one loading for same firmware is alllowd at the same time. Signed-off-by: Ming Lei <ming.lei@canonical.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/base/firmware_class.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c
index 0bd09c7545c..04c75b56f4f 100644
--- a/drivers/base/firmware_class.c
+++ b/drivers/base/firmware_class.c
@@ -452,7 +452,7 @@ fw_create_instance(struct firmware *firmware, const char *fw_name,
452 f_dev = &fw_priv->dev; 452 f_dev = &fw_priv->dev;
453 453
454 device_initialize(f_dev); 454 device_initialize(f_dev);
455 dev_set_name(f_dev, "%s", dev_name(device)); 455 dev_set_name(f_dev, "%s", fw_name);
456 f_dev->parent = device; 456 f_dev->parent = device;
457 f_dev->class = &firmware_class; 457 f_dev->class = &firmware_class;
458 458