From: Rafael J. Wysocki Date: Thu, 8 Aug 2013 14:19:19 +0000 (+0200) Subject: ACPI: Print diagnostic messages if device links cannot be created X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=464c114717ae221202ebdbd9aa216035b4626f18;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git ACPI: Print diagnostic messages if device links cannot be created Although the device links created by acpi_bind_one() are not essential from the kernel functionality point of view, user space may be confused when they are missing, so print diagnostic messages to the kernel log if they can't be created. Signed-off-by: Rafael J. Wysocki Acked-by: Toshi Kani --- diff --git a/drivers/acpi/glue.c b/drivers/acpi/glue.c index f3ead0ce37ab..94672297e1b1 100644 --- a/drivers/acpi/glue.c +++ b/drivers/acpi/glue.c @@ -252,8 +252,15 @@ int acpi_bind_one(struct device *dev, acpi_handle handle) acpi_physnode_link_name(physical_node_name, node_id); retval = sysfs_create_link(&acpi_dev->dev.kobj, &dev->kobj, physical_node_name); + if (retval) + dev_err(&acpi_dev->dev, "Failed to create link %s (%d)\n", + physical_node_name, retval); + retval = sysfs_create_link(&dev->kobj, &acpi_dev->dev.kobj, "firmware_node"); + if (retval) + dev_err(dev, "Failed to create link firmware_node (%d)\n", + retval); mutex_unlock(&acpi_dev->physical_node_lock);