Commit e9a315bc authored by Randy Dunlap's avatar Randy Dunlap Committed by Len Brown

ACPI: verbose on kset/kobject_register errors

Signed-off-by: default avatarRandy Dunlap <rdunlap@xenotime.net>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent 7daef607
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
#include <linux/module.h> #include <linux/module.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/kernel.h>
#include <linux/acpi.h> #include <linux/acpi.h>
#include <acpi/acpi_drivers.h> #include <acpi/acpi_drivers.h>
...@@ -113,6 +114,8 @@ static struct kset acpi_namespace_kset = { ...@@ -113,6 +114,8 @@ static struct kset acpi_namespace_kset = {
static void acpi_device_register(struct acpi_device *device, static void acpi_device_register(struct acpi_device *device,
struct acpi_device *parent) struct acpi_device *parent)
{ {
int err;
/* /*
* Linkage * Linkage
* ------- * -------
...@@ -138,7 +141,10 @@ static void acpi_device_register(struct acpi_device *device, ...@@ -138,7 +141,10 @@ static void acpi_device_register(struct acpi_device *device,
device->kobj.parent = &parent->kobj; device->kobj.parent = &parent->kobj;
device->kobj.ktype = &ktype_acpi_ns; device->kobj.ktype = &ktype_acpi_ns;
device->kobj.kset = &acpi_namespace_kset; device->kobj.kset = &acpi_namespace_kset;
kobject_register(&device->kobj); err = kobject_register(&device->kobj);
if (err < 0)
printk(KERN_WARNING "%s: kobject_register error: %d\n",
__FUNCTION__, err);
create_sysfs_device_files(device); create_sysfs_device_files(device);
} }
...@@ -1450,7 +1456,9 @@ static int __init acpi_scan_init(void) ...@@ -1450,7 +1456,9 @@ static int __init acpi_scan_init(void)
if (acpi_disabled) if (acpi_disabled)
return 0; return 0;
kset_register(&acpi_namespace_kset); result = kset_register(&acpi_namespace_kset);
if (result < 0)
printk(KERN_ERR PREFIX "kset_register error: %d\n", result);
result = bus_register(&acpi_bus_type); result = bus_register(&acpi_bus_type);
if (result) { if (result) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment