Skip to content

Commit 99c2aa7

Browse files
Ming Leigregkh
authored andcommitted
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 <[email protected]> Cc: Linus Torvalds <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 0c25a85 commit 99c2aa7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/base/firmware_class.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ fw_create_instance(struct firmware *firmware, const char *fw_name,
452452
f_dev = &fw_priv->dev;
453453

454454
device_initialize(f_dev);
455-
dev_set_name(f_dev, "%s", dev_name(device));
455+
dev_set_name(f_dev, "%s", fw_name);
456456
f_dev->parent = device;
457457
f_dev->class = &firmware_class;
458458

0 commit comments

Comments
 (0)