lkml.org 
[lkml]   [2006]   [Jul]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRE: [PATCH -mm] acpi/scan: handle kset/kobject errors
Date
From
applied,
my only nitpick is that in the subject capital "ACPI:" is what we use --
as it is an acronym.

thanks,
-Len

>-----Original Message-----
>From: Randy.Dunlap [mailto:rdunlap@xenotime.net]
>Sent: Wednesday, July 12, 2006 2:08 AM
>To: lkml; linux-acpi@vger.kernel.org
>Cc: Brown, Len; akpm
>Subject: [PATCH -mm] acpi/scan: handle kset/kobject errors
>
>From: Randy Dunlap <rdunlap@xenotime.net>
>
>Check and handle kset_register() and kobject_register() init errors.
>
>Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
>---
> drivers/acpi/scan.c | 12 ++++++++++--
> 1 files changed, 10 insertions(+), 2 deletions(-)
>
>--- linux-2618-rc1mm1.orig/drivers/acpi/scan.c
>+++ linux-2618-rc1mm1/drivers/acpi/scan.c
>@@ -4,6 +4,7 @@
>
> #include <linux/module.h>
> #include <linux/init.h>
>+#include <linux/kernel.h>
> #include <linux/acpi.h>
>
> #include <acpi/acpi_drivers.h>
>@@ -113,6 +114,8 @@ static struct kset acpi_namespace_kset =
> static void acpi_device_register(struct acpi_device *device,
> struct acpi_device *parent)
> {
>+ int err;
>+
> /*
> * Linkage
> * -------
>@@ -138,7 +141,10 @@ static void acpi_device_register(struct
> device->kobj.parent = &parent->kobj;
> device->kobj.ktype = &ktype_acpi_ns;
> 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);
> }
>
>@@ -1450,7 +1456,9 @@ static int __init acpi_scan_init(void)
> if (acpi_disabled)
> 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);
> if (result) {
>
>
>---
>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-07-12 08:43    [W:0.024 / U:0.304 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site