Re: 2.6.25-rc2 Regression Thinkpad acpi

Previous thread: [2.6.25-rc] pci_scan_child_bus, pci_acpi_scan_root section mismatch by Andrey Borzenkov on Monday, February 25, 2008 - 1:49 am. (1 message)

Next thread: vmlinux.lds cleanup by Cyrill Gorcunov on Monday, February 25, 2008 - 2:58 am. (3 messages)
From: Lukas Hejtmanek
Date: Monday, February 25, 2008 - 2:39 am

Hello, 

2.6.25-rc2-git7 has regression, thinkpad keys do not work any more.

Probably this commit broke things 6c231bd5eb07ce546517019f334652b9ecfc329a

-- 
Lukáš Hejtmánek
--

From: Rafael J. Wysocki
Date: Monday, February 25, 2008 - 4:47 am

Hi,


Please always provide the commit subject along with the hash in bug reports.

Also, CCing the author and the relevant list on a report usually is a good
idea. :-)

Thanks,
Rafael
--

From: Henrique de Moraes Holschuh
Date: Monday, February 25, 2008 - 1:03 pm

This commit is indeed broken, and I have a tentative fix for it.  But I'd
like to have a better description of just "how" the thinkpad keys do not
work anymore, to make sure I fix the entire breakage in one go.  I will
stare at the code and the fix a bit more before sending in any patches,

Make it "mandatory" if you want a fast reply :^)

-- 
  "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
--

From: Lukas Hejtmanek
Date: Monday, February 25, 2008 - 1:49 pm

Well, keys generate ACPI interrupt but acpid never receives any event.

I would be happy to test fixes to see whether things go well.

-- 
Lukáš Hejtmánek
--

From: Henrique de Moraes Holschuh
Date: Monday, February 25, 2008 - 2:01 pm

Not even over the new netlink socket?  Or the thinkpad-acpi input device?

Sure, try this one:

diff --git a/drivers/misc/thinkpad_acpi.c b/drivers/misc/thinkpad_acpi.c
index 7500c44..0f74351 100644
--- a/drivers/misc/thinkpad_acpi.c
+++ b/drivers/misc/thinkpad_acpi.c
@@ -1078,7 +1078,8 @@ static int hotkey_get_tablet_mode(int *status)
 	if (!acpi_evalf(hkey_handle, &s, "MHKG", "d"))
 		return -EIO;
 
-	return ((s & TP_HOTKEY_TABLET_MASK) != 0);
+	*status = ((s & TP_HOTKEY_TABLET_MASK) != 0);
+	return 0;
 }
 
 /*

-- 
  "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
--

From: Lukas Hejtmanek
Date: Monday, February 25, 2008 - 3:07 pm

how can I check this?

volume keys work. But anything through acpid does not. Even AC/battery switch

[  247.170385] thinkpad_acpi: ThinkPad ACPI Extras v0.19
[  247.170398] thinkpad_acpi: http://ibm-acpi.sf.net/
[  247.170402] thinkpad_acpi: ThinkPad BIOS 7LETB0WW (2.10 ), EC 7KHT24WW-1.08
[  247.170407] thinkpad_acpi: Lenovo ThinkPad T61
[  247.171289] thinkpad_acpi: radio switch found; radios are enabled
[  247.184889] thinkpad_acpi: requested hot key mask 0xffffffff, but firmware forced it to 0x00ffffff
[  247.188509] thinkpad_acpi: detected a 16-level brightness capable ThinkPad
[  247.189027] input: ThinkPad Extra Buttons as /devices/virtual/input/input10
[  418.790341] thinkpad_acpi: drv_acpi_handle_init: Found ACPI handle \_SB.PCI0.LPC.EC for ec
[  418.793747] thinkpad_acpi: ibm_init: probing for driver
[  418.793758] thinkpad_acpi: ThinkPad ACPI Extras v0.19
[  418.793762] thinkpad_acpi: http://ibm-acpi.sf.net/
[  418.793766] thinkpad_acpi: ThinkPad BIOS 7LETB0WW (2.10 ), EC 7KHT24WW-1.08
[  418.793771] thinkpad_acpi: Lenovo ThinkPad T61
[  418.793775] thinkpad_acpi: ibm_init: driver installed
[  418.793780] thinkpad_acpi: ibm_init: probing for hotkey
[  418.793827] thinkpad_acpi: drv_acpi_handle_init: Found ACPI handle HKEY for hkey
[  428.258389] thinkpad_acpi: radio switch found; radios are enabled
[  428.258423] thinkpad_acpi: hotkey_init: using Lenovo default hot key map
[  428.258431] thinkpad_acpi: hotkey_init: enabling hot key handling
[  428.264778] thinkpad_acpi: hotkey_init: legacy hot key reporting over procfs enabled
[  418.806536] thinkpad_acpi: register_tpacpi_subdriver: registering hotkey as an ACPI driver
[  418.808594] thinkpad_acpi: ibm_init: hotkey installed
[  418.816087] thinkpad_acpi: requested hot key mask 0xffffffff, but firmware forced it to 0x00ffffff
[  418.816100] thinkpad_acpi: ibm_init: probing for bluetooth
[  418.816114] thinkpad_acpi: drv_acpi_handle_init: Found ACPI handle HKEY for hkey
[  418.821862] thinkpad_acpi: ibm_init: ...
From: Henrique de Moraes Holschuh
Date: Monday, February 25, 2008 - 4:00 pm

Yeah, there is an EC-related regression in 2.6.25-rc3 that bites your
thinkpad.  I don't have a link to it right now, but if you look for the

Don't do this.  Just let the driver select the default mask, unless you

It wouldn't fix any EC issues.  If you just revert the
6c231bd5eb07ce546517019f334652b9ecfc329a commit entirely (note, I don't mean
revert TO THE COMMIT), by doing something like this:

git checkout v2.6.25-rc3
git show 6c231bd5eb07ce546517019f334652b9ecfc329a | patch -p1 -R

Does it fix anything ?

-- 
  "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
--

From: Rafael J. Wysocki
Date: Monday, February 25, 2008 - 4:05 pm

http://bugzilla.kernel.org/show_bug.cgi?id=10100

(easy to remember ;=))

Thanks,
Rafael
--

From: Nuno Tavares
Date: Wednesday, February 27, 2008 - 4:54 am

Greetings to all,

I recently stumbled across a Dell OptiPlex 320 which brings a nasty
assembly of hardware. Besides the many issues reported (system/bios time
de-sync, SATA controller detection, etc), this particular model doesn't
seem to correctly recognize the CPU, which I'm not even sure what it is
(I haven't seen anyone else complaining about it). As far as I could
investigate, it looks like a weird P4 1.8Ghz, dual core.
However, /proc/cpuinfo only reports 1 processor, 1.8Ghz. I'm saying that
it's a dual core because I've seen an identical machine running Windows,
showing 2 CPUs. Besides, other tools report it as "dual core".

Below is the output of /proc/cpuinfo and some head lines of dmesg. Here
is the output of Todd Allen's cpuid tool (20060917):
   (multi-processing synth): hyper-threaded (t=2)
   (synth) = Intel Core 2 Duo (Conroe/Allendale) / Core 2 Extreme
Processor (Conroe) / Dual-Core Xeon Processor 5100 (Woodcrest), 65nm

I've tried OpenSuSE 10.3 default kernel, 2.6.22.5, the oSuSE last
update, 2.6.22.17, and a custom-built 2.6.24.2, all 32bit. I just notice
now that I could have tried downgrading...

What I'm looking for is some guidance in how can I trace this for you
and perhaps help you/me somehow. I've digged this mailing-list and lots
of other sources, and no one seems to complain about this, which is
odd...





------------------- /proc/cpuinfo --------------------
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 15
model name : Genuine Intel(R) CPU            2160  @ 1.80GHz
stepping : 2
cpu MHz : 1800.256
cache size : 1024 KB
physical id : 0
siblings : 1
core id : 0
cpu cores : 1
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 10
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov
pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm
constant_tsc up pni monitor ds_cpl est tm2 ssse3 cx16 xtpr lahf_lm
bogomips : 3614.79
clflush size ...
From: Xavier Bestel
Date: Wednesday, February 27, 2008 - 6:09 am

On Wed, 2008-02-27 at 11:54 +0000, Nuno Tavares wrote:

FYI, DELL often changes its hardware for the same model number.

	Xav


--

From: Lennart Sorensen
Date: Wednesday, February 27, 2008 - 7:32 am

Multi processor requires acpi, so your acpi=off will disable all but the
first CPU.

Is the system really so broken that you have to tell the kernel to
disable everything?

--
Len Sorensen
--

From: Lukas Hejtmanek
Date: Tuesday, February 26, 2008 - 11:49 am

this one fixes all my troubles with thinkpad hotkeys in rc3.

OK, thanks.

-- 
Lukáš Hejtmánek
--

From: Jens Axboe
Date: Tuesday, March 4, 2008 - 12:45 pm

Ping - is anyone sending this upstream? Would be nice to have my x60
usable for -rc4 at least.

-- 
Jens Axboe

--

From: Alexey Starikovskiy
Date: Tuesday, March 4, 2008 - 2:09 pm

Please take a look at patches in #10100.

Alex.



--

From: Jens Axboe
Date: Tuesday, March 4, 2008 - 2:12 pm

Can you be more specific (eg if you want me to test any/all of them, let
me know)?

-- 
Jens Axboe

--

From: Alexey Starikovskiy
Date: Tuesday, March 4, 2008 - 2:24 pm

Patch from comment #3 is in -mm at the moment, and has good chance to 
appear in linus tree.
I am trying to invent something less crufty along the lines of comment 
#4, but not succeeded yet.


--

From: Jens Axboe
Date: Wednesday, March 12, 2008 - 5:59 am

Updating and doing what the bugzilla entry suggests, that is reverting
the offending commit. That makes my brightness controls work, but the
volume and mute keys still do not work.

-- 
Jens Axboe

--

From: Henrique de Moraes Holschuh
Date: Wednesday, March 12, 2008 - 6:17 am

Those are not an ACPI business in your thinkpad anymore.  They go over the
KDC, so we're out of the loop.   That means the bug is fixed completely.

-- 
  "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
--

From: Jens Axboe
Date: Wednesday, March 12, 2008 - 6:24 am

KDC? Pressing the buttons used to indicate mute and volume level in
kmix, now they don't. That is somewhat annoying. If there's a way to get
that working, please let me know.

-- 
Jens Axboe

--

From: Henrique de Moraes Holschuh
Date: Wednesday, March 12, 2008 - 6:35 am

You shouldn't need to do anything other than teach userspace to respond to
them, as they generate the proper KEY_* events.  If you are giving the AML
_OSI(Linux), at least...

But maybe looking at the keyboard output in console mode, to make triple
sure the events ARE being sent over the KDC as they should, would be in
order?

-- 
  "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
--

From: Lukas Hejtmanek
Date: Wednesday, March 12, 2008 - 6:55 am

so, do I understand correctly that volume keys have been controlled by ACPI
and seemed to work independently on SW and now (exactly since when?) are
passed complety to the user space as key codes?

-- 
Lukáš Hejtmánek
--

From: Henrique de Moraes Holschuh
Date: Wednesday, March 12, 2008 - 10:39 am

Yes, since the first *61 model.  And field-upgradeable firmware revisons
have a say on how this thing works, since the entire KDC is software in a
Lenovo ThinkPad (it is just a small part of the EC firmware, that comes with
the BIOS upgrades).

I have some long email sitting on my draft folders about how to restore full
sanity to thinkpad mixer behaviour on Linux, but I have to cool down for a
few days before I revise it and send it.

-- 
  "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
--

From: Arkadiusz Miskiewicz
Date: Wednesday, March 12, 2008 - 11:52 am

I'm also seeing regression on my thinkpad z60m where with git tree (tested 
again with 2 days old git) "thinkvantage" button stopped working (pressing it 
was previously seen by some userspace kde which run konsole).

On 2.6.24 presses are seen.

-- 
Arkadiusz Miśkiewicz        PLD/Linux Team
arekm / maven.pl            http://ftp.pld-linux.org/
--

From: Lukas Hejtmanek
Date: Wednesday, March 12, 2008 - 12:36 pm

well, on 2.6.25-rc4, some keys are not reported as input (xev does not see any
key press), some keys are. Is this desired? Or all the keys (fn+f1-12 + volume
+ backlight + think vantage) should be reported as some input event and thus
acpid makes no sense any more?

-- 
Lukáš Hejtmánek
--

From: Henrique de Moraes Holschuh
Date: Wednesday, March 12, 2008 - 2:13 pm

xev has to get events from somewhere.  That somewhere happens to be a buggy
mess right now (X.org evdev device).  Or it is getting it through some other
middleware, like HAL, which can have its own problems.

If you want to test thinkpad-acpi functionality, get HAL and X.org out of
the way.  The easiest way is to do it in single user mode.

-- 
  "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
--

From: Arkadiusz Miskiewicz
Date: Thursday, March 13, 2008 - 12:30 am

In my thinkpad z60m case. On 2.6.24 kernels pressing "thinkvantage" key is 
seen by acpid like this:

Mar 13 08:27:48 tarm acpid: received event "ibm/hotkey HKEY 00000080 00001018"
Mar 13 08:27:48 tarm acpid: notifying client 4071[126:126]
Mar 13 08:27:48 tarm acpid: notifying client 4096[0:0]
Mar 13 08:27:48 tarm acpid: notifying client 4230[0:0]
Mar 13 08:27:48 tarm acpid: completed event "ibm/hotkey HKEY 00000080 
00001018"
(this log was done while X was running + some kde apps).

Now under git kernel there is no such event. X has nothing to do with it since 
I tested without X running, too.

-- 
Arkadiusz Miśkiewicz        PLD/Linux Team
arekm / maven.pl            http://ftp.pld-linux.org/
--

From: Lukas Hejtmanek
Date: Thursday, March 13, 2008 - 12:33 am

I got this event under 2.6.25-rc3-git1.

However, I wonder why some keys are reported as key press through input device
and some only for acpid. I thing, all the key should be reported in the same
way...

-- 
Lukáš Hejtmánek
--

From: Jens Axboe
Date: Thursday, March 13, 2008 - 5:05 am

And lets now get back to reality - the reality that now breaks the
previously working setup of lots of users. So you are telling me that in
order to get my volume key functionality back I have to get rid of HAL
and X?

Lets turn back time a bit. Why was this change made? IOW, what was the
reason for breaking a working setup for lots of users? It better be a
damn good reason, or I would heavily argue for reverting this change so
that 2.6.25 actually WORKS as expected for thinkpad users.

-- 
Jens Axboe

--

From: Lukas Hejtmanek
Date: Thursday, March 13, 2008 - 5:23 am

so, you are telling that xev does not show keycodes of volume buttons for you,
right? Because for me, it works. Thinkvantage does not work.

-- 
Lukáš Hejtmánek
--

From: Jens Axboe
Date: Thursday, March 13, 2008 - 5:46 am

They do not generate any events, xev reports nothing. The ThinkVantage
button doesn't generate any events either.

-- 
Jens Axboe

--

From: Lukas Hejtmanek
Date: Thursday, March 13, 2008 - 5:55 am

what about BIOS upgrade? I think this really should work.

Ahh, maybe you are facing EC problems? Are you using just stock vanila kernel
or some additional patches?

-- 
Lukáš Hejtmánek
--

From: Jens Axboe
Date: Thursday, March 13, 2008 - 5:59 am

It's stock -git as of this morning, with the
208c70a45624400fafd7511b96bc426bf01f8f5e commit reverted. And some other
unrelated patches I'm working on, but nothing that has anything remotely
to do with this.

-- 
Jens Axboe

--

From: Lukas Hejtmanek
Date: Thursday, March 13, 2008 - 6:09 am

I use the latest BIOS for my T61 and it just works. At least the event is
generated either for acpid or for Xserver.
 
-- 
Lukáš Hejtmánek
--

From: Jens Axboe
Date: Thursday, March 13, 2008 - 6:13 am

This is an x60, so there may be other differences there.

-- 
Jens Axboe

--

From: Alexey Starikovskiy
Date: Thursday, March 13, 2008 - 7:37 am

There are was some playing with acpi_osi=Linux in this timeframe, known
to deal with sound buttons too.
Some of Thinkpads were inserted into the blacklist to need this OSI.
It might be that your Thinkpad needs it too...

Regards,
Alex.
--

From: Jens Axboe
Date: Thursday, March 13, 2008 - 7:39 am

Please talk to me like I'm an ACPI ignorant - because I am. Where is
this blacklist?

-- 
Jens Axboe

--

From: Alexey Starikovskiy
Date: Thursday, March 13, 2008 - 7:52 am

drivers/acpi/blacklist.c:485.
You probably could set acp_osi=Linux as kernel parameter to check if it 
helps.
--

From: Jens Axboe
Date: Thursday, March 13, 2008 - 7:59 am

I booted with acpi_osi=Linux and it has made no difference.

-- 
Jens Axboe

--

From: Alexey Starikovskiy
Date: Thursday, March 13, 2008 - 8:04 am

What is the last kernel there these buttons work?

--

From: Jens Axboe
Date: Thursday, March 13, 2008 - 8:09 am

It worked fine in 2.6.24, not sure when it broke in 2.6.25-rcX, but it
was some time ago. I initially thought it was the same issue and would
be fixed by the revert of 208c70a45624400fafd7511b96bc426bf01f8f5e, but
that turned out not to be the case.

-- 
Jens Axboe

--

From: Henrique de Moraes Holschuh
Date: Thursday, March 13, 2008 - 3:55 pm

On a T61/X61 Thinkpad, anything but the very latest BIOS is too old.  They
have been modifying the BIOS in areas that are directly related to Linux

EC problems anywhere in the entire ACPI subsystem can, and have, caused
weird thinkpad-acpi issues.

-- 
  "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
--

From: Henrique de Moraes Holschuh
Date: Thursday, March 13, 2008 - 3:53 pm

I am telling you to go single user mode to check if the problem is in
thinkpad-acpi.  Nothing more, nothing less.  AFTER we find out where the

What change?  For all we know, it could be a bug.  And if it is not a bug,
read the thinkpad-acpi documentation, and complain to me exactly about
whatever change described in there that is giving you issues.  Or give me a
bissect culprit.  Or do the testing I asked you to do, and tell me the

I will get pissed very fast, if you keep up with this tone.  I certainly did
not send in any changes that should cause what you describe on purpose,
UNLESS you have disabled with the "deprecated" /proc/acpi/event stuff.  In
which case, it is your problem to get proper userspace.

-- 
  "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
--

From: Henrique de Moraes Holschuh
Date: Thursday, March 13, 2008 - 4:17 pm

There were no changes to thinkpad-acpi that should have caused this.  So I
need more data to find out what is happening.  Might be a problem elsewhere
in ACPI, or some bug in thinkpad-acpi.

You DO have /proc/acpi/event, correct?  Please send me the debug output of
thinkpad-acpi when it is loaded with "debug=0xffff" as a parameter (and for
extra bonus, please compile it with the verbose debug Kconfig option).

Also, send me the output of 
"grep . /sys/bus/platform/devices/thinkpad_acpi/*"

-- 
  "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
--

From: Jens Axboe
Date: Friday, March 14, 2008 - 12:05 am

Yep, I do have /proc/acpi event. I'll build thinkpad-acpi modular and

/sys/bus/platform/devices/thinkpad_acpi/bluetooth_enable:0
grep: /sys/bus/platform/devices/thinkpad_acpi/cmos_command: Permission denied
/sys/bus/platform/devices/thinkpad_acpi/hotkey_all_mask:0x00ffffff
/sys/bus/platform/devices/thinkpad_acpi/hotkey_bios_enabled:0
/sys/bus/platform/devices/thinkpad_acpi/hotkey_bios_mask:0x0000080c
/sys/bus/platform/devices/thinkpad_acpi/hotkey_enable:1
/sys/bus/platform/devices/thinkpad_acpi/hotkey_mask:0x008c7fff
/sys/bus/platform/devices/thinkpad_acpi/hotkey_radio_sw:1
/sys/bus/platform/devices/thinkpad_acpi/hotkey_recommended_mask:0x008c7fff
/sys/bus/platform/devices/thinkpad_acpi/hotkey_report_mode:1
/sys/bus/platform/devices/thinkpad_acpi/modalias:platform:thinkpad_acpi
/sys/bus/platform/devices/thinkpad_acpi/uevent:DRIVER=thinkpad_acpi
/sys/bus/platform/devices/thinkpad_acpi/uevent:PHYSDEVBUS=platform
/sys/bus/platform/devices/thinkpad_acpi/uevent:PHYSDEVDRIVER=thinkpad_acpi
/sys/bus/platform/devices/thinkpad_acpi/uevent:MODALIAS=platform:thinkpad_acpi
/sys/bus/platform/devices/thinkpad_acpi/wakeup_hotunplug_complete:0
/sys/bus/platform/devices/thinkpad_acpi/wakeup_reason:0

-- 
Jens Axboe

--

From: Jens Axboe
Date: Friday, March 14, 2008 - 12:30 am

Updated to current kernel (saw it had a bunch of acpi fixes), and it now
works correctly! xev sees the events and the mixer sees mute/unmute and
volume up+down events.

So I think we can lay this one to rest, thankfully.

-- 
Jens Axboe

--

From: Arkadiusz Miskiewicz
Date: Friday, March 14, 2008 - 11:23 am

Same here, recent git works fine on z60m.

-- 
Arkadiusz Miśkiewicz        PLD/Linux Team
arekm / maven.pl            http://ftp.pld-linux.org/
--

From: Tomas Carnecky
Date: Monday, February 25, 2008 - 4:03 pm

A while ago I worked on a new acpi daemon that could receive events from 
both netlink and /dev/input devices. Right now it's more like a testing 
tool then a real replacement for the current acpid. I haven't had time 
to work on it.

http://git.dbservice.com/?p=acpid;a=summary
$ git clone git://dbservice.com/acpid

You'll need dbus and lua to compile it. There's also a readme that 
describes how to get it running and how it works. In its default 
configuration it will print the events into stdout.

tom

--

From: Henrique de Moraes Holschuh
Date: Tuesday, February 26, 2008 - 3:12 pm

I used the wrong return convention on hotkey_get_tablet_mode(), breaking a
lot of stuff.  Bad Henrique!

Fix it to return the status in the parameter-by-reference, and IO status on
the function return value. Duh.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Cc: Zdenek Kabelac <zdenek.kabelac@gmail.com>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Lukas Hejtmanek <xhejtman@ics.muni.cz>
---
 drivers/misc/thinkpad_acpi.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/misc/thinkpad_acpi.c b/drivers/misc/thinkpad_acpi.c
index bb269d0..6cb7812 100644
--- a/drivers/misc/thinkpad_acpi.c
+++ b/drivers/misc/thinkpad_acpi.c
@@ -1078,7 +1078,8 @@ static int hotkey_get_tablet_mode(int *status)
 	if (!acpi_evalf(hkey_handle, &s, "MHKG", "d"))
 		return -EIO;
 
-	return ((s & TP_HOTKEY_TABLET_MASK) != 0);
+	*status = ((s & TP_HOTKEY_TABLET_MASK) != 0);
+	return 0;
 }
 
 /*
-- 
1.5.4.2

--

Previous thread: [2.6.25-rc] pci_scan_child_bus, pci_acpi_scan_root section mismatch by Andrey Borzenkov on Monday, February 25, 2008 - 1:49 am. (1 message)

Next thread: vmlinux.lds cleanup by Cyrill Gorcunov on Monday, February 25, 2008 - 2:58 am. (3 messages)