瀏覽代碼

ACPI / watchdog: Print out error number when device creation fails

If the platform device creation fails for whichever reason the driver
prints out something like:

  [    0.978837] ACPI: watchdog: Failed to create platform device

However, that is quite confusing and does not include any information
why it failed. To make it more understandable, reword it like:

  [    0.978837] ACPI: watchdog: Device creation failed: -16

Which tells that we failed to create the watchdog device because some of
the resources were already reserved (-EBUSY).

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Mika Westerberg 8 年之前
父節點
當前提交
c6e2c1e113
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/acpi/acpi_watchdog.c

+ 1 - 1
drivers/acpi/acpi_watchdog.c

@@ -114,7 +114,7 @@ void __init acpi_watchdog_init(void)
 	pdev = platform_device_register_simple("wdat_wdt", PLATFORM_DEVID_NONE,
 	pdev = platform_device_register_simple("wdat_wdt", PLATFORM_DEVID_NONE,
 					       resources, nresources);
 					       resources, nresources);
 	if (IS_ERR(pdev))
 	if (IS_ERR(pdev))
-		pr_err("Failed to create platform device\n");
+		pr_err("Device creation failed: %ld\n", PTR_ERR(pdev));
 
 
 	kfree(resources);
 	kfree(resources);