Re: [ibm-acpi-devel] [2.6.20-rc4 regression] ibm-acpi: bay support disabled

2007-01-09 Thread Adrian Bunk
On Tue, Jan 09, 2007 at 03:28:45PM -0200, Henrique de Moraes Holschuh wrote:
> A new one for you, it exists since 2.6.20-rc2.
> 
> Subject  : ThinkPad removable bay support disabled unconditionally
> References   : 
> http://marc.theaimsgroup.com/?l=linux-acpi&m=116750681901208&w=2
> Caused-By: Henrique de Moraes Holschuh <[EMAIL PROTECTED]>
> Handled-By   : Henrique de Moraes Holschuh <[EMAIL PROTECTED]>
> Status   : patch attached

Thanks, noted.

> From: Henrique de Moraes Holschuh <[EMAIL PROTECTED]>
> 
> ACPI: ibm-acpi: fix Kconfig entries for ibm-acpi bay and dock
> 
> Support for ACPI_BAY has not been merged in mainline yet.  Usage of
> "depends on FOO=n" fails if FOO is undefined, thus ibm-acpi support
> for bay was being made non-available in a kernel that has no other
> sort of bay support.
> 
> Fix it to use "depends on ! FOO" instead, that does the right thing
> when FOO is undefined.  Fix ACPI_IBM_DOCK accordingly as well while
> at it, and also improve the help text.
> 
> Signed-off-by: Henrique de Moraes Holschuh <[EMAIL PROTECTED]>
> ---
>  drivers/acpi/Kconfig |   17 ++---
>  1 files changed, 10 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig
> index 1639998..34cc8d5 100644
> --- a/drivers/acpi/Kconfig
> +++ b/drivers/acpi/Kconfig
> @@ -215,26 +215,29 @@ config ACPI_IBM
>  config ACPI_IBM_DOCK
>   bool "Legacy Docking Station Support"
>   depends on ACPI_IBM
> - depends on ACPI_DOCK=n
> - default n
> + depends on ! ACPI_DOCK
> + default y
>...

!ACPI_DOCK is wrong if the intention was ACPI_DOCK=n (since ACPI_DOCK is 
a tristate).

I'd say the right fix is to remove the negative dependencies on unmerged 
options and reintroduce them once these options themselves got merged.

cu
Adrian

-- 

   "Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
   "Only a promise," Lao Er said.
   Pearl S. Buck - Dragon Seed


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
ibm-acpi-devel mailing list
ibm-acpi-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ibm-acpi-devel


[ibm-acpi-devel] [2.6.23 regression fix] fix thinkpad_acpi without hardware

2007-08-05 Thread Adrian Bunk
René Treffer reported that booting a CONFIG_THINKPAD_ACPI=y kernel on a 
machine without the hardware results in an Oops.

The trace is thinkpad_acpi_module_init -> thinkpad_acpi_module_exit -> 
driver_remove_file -> sysfs_hash_and_remove.

The error handling if thinkpad_acpi_module_init() fails generally looks 
suspicious, but this patch at least fixes the common case if no hardware 
was found, and it seems in this case there isn't any cleanup 
actually required.

Broken by commit d5a2f2f1d68e2da538ac28540cddd9ccc733b001.

Signed-off-by: Adrian Bunk <[EMAIL PROTECTED]>

---
bfa7bcd2b872f2c20afa7f7260d9be7dffe92d2e 
diff --git a/drivers/misc/thinkpad_acpi.c b/drivers/misc/thinkpad_acpi.c
index fa80f35..c7432a7 100644
--- a/drivers/misc/thinkpad_acpi.c
+++ b/drivers/misc/thinkpad_acpi.c
@@ -4644,10 +4644,8 @@ static int __init thinkpad_acpi_module_init(void)
 
get_thinkpad_model_data(&thinkpad_id);
ret = probe_for_thinkpad();
-   if (ret) {
-   thinkpad_acpi_module_exit();
+   if (ret)
return ret;
-   }
 
/* Driver initialization */
 


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
ibm-acpi-devel mailing list
ibm-acpi-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ibm-acpi-devel