From: Len Brown <len.brown@intel.com>
To: akpm@osdl.org
Cc: linux-acpi@vger.kernel.org, rdunlap@xenotime.net
Subject: Re: [patch 06/14] acpi/scan: handle kset/kobject errors
Date: Tue, 15 Aug 2006 23:32:40 -0400 [thread overview]
Message-ID: <200608152332.40706.len.brown@intel.com> (raw)
In-Reply-To: <200608150537.k7F5bOdJ011545@shell0.pdx.osdl.net>
applied.
thanks,
-len
On Tuesday 15 August 2006 01:37, akpm@osdl.org wrote:
> From: Randy Dunlap <rdunlap@xenotime.net>
>
> Check and handle kset_register() and kobject_register() init errors.
>
> Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
> Signed-off-by: Andrew Morton <akpm@osdl.org>
> ---
>
> drivers/acpi/scan.c | 12 ++++++++++--
> 1 file changed, 10 insertions(+), 2 deletions(-)
>
> diff -puN drivers/acpi/scan.c~acpi-scan-handle-kset-kobject-errors drivers/acpi/scan.c
> --- a/drivers/acpi/scan.c~acpi-scan-handle-kset-kobject-errors
> +++ a/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-acpi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
prev parent reply other threads:[~2006-08-16 3:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-15 5:37 [patch 06/14] acpi/scan: handle kset/kobject errors akpm
2006-08-16 3:32 ` Len Brown [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200608152332.40706.len.brown@intel.com \
--to=len.brown@intel.com \
--cc=akpm@osdl.org \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=rdunlap@xenotime.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.