mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 04:34:03 +02:00
PNP: ACPI: Stop using acpi_device_name()
Since acpi_device_name() checked by pnpacpi_add_device() is never populated, its length is always zero and the codition checking it is always false. Accordingly, drop that condition and use acpi_device_bid(device) for setting dev->name in pnpacpi_add_device() unconditionally. No intentional functional impact. This will facilitate the removal of device_name from struct acpi_device_pnp in the future. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://patch.msgid.link/23191780.EfDdHjke4D@rafael.j.wysocki
This commit is contained in:
parent
d215a3b2fe
commit
d4232e1c79
|
|
@ -248,10 +248,7 @@ static int __init pnpacpi_add_device(struct acpi_device *device)
|
|||
if (acpi_has_method(device->handle, "_DIS"))
|
||||
dev->capabilities |= PNP_DISABLE;
|
||||
|
||||
if (strlen(acpi_device_name(device)))
|
||||
strscpy(dev->name, acpi_device_name(device), sizeof(dev->name));
|
||||
else
|
||||
strscpy(dev->name, acpi_device_bid(device), sizeof(dev->name));
|
||||
strscpy(dev->name, acpi_device_bid(device), sizeof(dev->name));
|
||||
|
||||
if (dev->active)
|
||||
pnpacpi_parse_allocated_resource(dev);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user