[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20070315122654.468bdd39.kristen.c.accardi@intel.com>
Date: Thu, 15 Mar 2007 12:26:54 -0700
From: Kristen Carlson Accardi <kristen.c.accardi@...el.com>
To: Henrique de Moraes Holschuh <hmh@....eng.br>
Cc: Len Brown <lenb@...nel.org>, linux-kernel@...r.kernel.org,
linux-acpi@...r.kernel.org, Chris Wedgwood <cw@...f.org>,
ibm-acpi-devel@...ts.sourceforge.net
Subject: Re: [PATCH] ACPI: ibm-acpi: allow module to load when acpi
notifiers can't be set
On Thu, 15 Mar 2007 14:51:14 -0300
Henrique de Moraes Holschuh <hmh@....eng.br> wrote:
> This patch allows for ibm-acpi to coexist (with diminished functionality) with
> other drivers like ACPI_BAY. ibm-acpi will simply disable the functions it is
> not able to register ACPI notifiers for.
this patch gives me the following compile error:
drivers/acpi/ibm_acpi.c: In function ‘ibm_init’:
drivers/acpi/ibm_acpi.c:2605: warning: implicit declaration of function ‘ibm_exit’
drivers/acpi/ibm_acpi.c: At top level:
drivers/acpi/ibm_acpi.c:2616: warning: conflicting types for ‘ibm_exit’
drivers/acpi/ibm_acpi.c:2616: error: static declaration of ‘ibm_exit’ follows non-static declaration
drivers/acpi/ibm_acpi.c:2605: error: previous implicit declaration of ‘ibm_exit’ was here
>
> Signed-off-by: Henrique de Moraes Holschuh <hmh@....eng.br>
> Cc: Chris Wedgwood <cw@...f.org>
> Cc: Kristen Carlson Accardi <kristen.c.accardi@...el.com>
> ---
>
> Len, you can pull this patch from:
> git://repo.or.cz/linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git
> branch for-upstream/acpi-release
>
> Please send it to Linus for merge in 2.6.21.
>
> It will clash with the patches in acpi-test that are waiting for 2.6.22.
> I will rediff those, and send you a pull request when this patch
> gets accepted in mainline.
>
> drivers/acpi/ibm_acpi.c | 17 ++++++++++++++---
> 1 files changed, 14 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/acpi/ibm_acpi.c b/drivers/acpi/ibm_acpi.c
> index 3690136..f9f36f9 100644
> --- a/drivers/acpi/ibm_acpi.c
> +++ b/drivers/acpi/ibm_acpi.c
> @@ -2507,7 +2507,7 @@ static int __init setup_notify(struct ibm_struct *ibm)
> ret = acpi_bus_get_device(*ibm->handle, &ibm->device);
> if (ret < 0) {
> printk(IBM_ERR "%s device not present\n", ibm->name);
> - return 0;
> + return -ENODEV;
> }
>
> acpi_driver_data(ibm->device) = ibm;
> @@ -2516,8 +2516,13 @@ static int __init setup_notify(struct ibm_struct *ibm)
> status = acpi_install_notify_handler(*ibm->handle, ibm->type,
> dispatch_notify, ibm);
> if (ACPI_FAILURE(status)) {
> - printk(IBM_ERR "acpi_install_notify_handler(%s) failed: %d\n",
> - ibm->name, status);
> + if (status == AE_ALREADY_EXISTS) {
> + printk(IBM_NOTICE "another device driver is already handling %s events\n",
> + ibm->name);
> + } else {
> + printk(IBM_ERR "acpi_install_notify_handler(%s) failed: %d\n",
> + ibm->name, status);
> + }
> return -ENODEV;
> }
> ibm->notify_installed = 1;
> @@ -2594,6 +2599,12 @@ static int __init ibm_init(struct ibm_struct *ibm)
>
> if (ibm->notify) {
> ret = setup_notify(ibm);
> + if (ret == -ENODEV) {
> + printk(IBM_NOTICE "disabling subdriver %s\n",
> + ibm->name);
> + ibm_exit(ibm);
> + return 0;
> + }
> if (ret < 0)
> return ret;
> }
> --
> 1.5.0.3
>
>
> --
> "One disk to rule them all, One disk to find them. One disk to bring
> them all and in the darkness grind them. In the Land of Redmond
> where the shadows lie." -- The Silicon Valley Tarot
> Henrique Holschuh
>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists