[PATCH 2/2] ACPI: Print diagnostic messages if device links cannot be created

From: Rafael J. Wysocki
Date: Wed Aug 07 2013 - 19:45:57 EST

From: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx>

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 <rafael.j.wysocki@xxxxxxxxx>
drivers/acpi/glue.c | 7 +++++++
1 file changed, 7 insertions(+)

Index: linux-pm/drivers/acpi/glue.c
--- linux-pm.orig/drivers/acpi/glue.c
+++ linux-pm/drivers/acpi/glue.c
@@ -252,8 +252,15 @@ int acpi_bind_one(struct device *dev, ac
acpi_physnode_link_name(physical_node_name, node_id);
retval = sysfs_create_link(&acpi_dev->dev.kobj, &dev->kobj,
+ 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,
+ if (retval)
+ dev_err(dev, "Failed to create link firmware_node (%d)\n",
+ retval);


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/