Picon
Favicon

[PATCH 1/7] ACPI: thinkpad-acpi: minor refactor on radio switch init

Change the code of hotkey_init, wan_init and bluetooth_init a bit to make it
much easier to add some Kconfig-selected debugging code later.

Signed-off-by: Henrique de Moraes Holschuh <hmh@...>
---
 drivers/misc/thinkpad_acpi.c |   49 ++++++++++++++++++++++-------------------
 1 files changed, 26 insertions(+), 23 deletions(-)

diff --git a/drivers/misc/thinkpad_acpi.c b/drivers/misc/thinkpad_acpi.c
index b596929..c800855 100644
--- a/drivers/misc/thinkpad_acpi.c
+++ b/drivers/misc/thinkpad_acpi.c
 <at>  <at>  -2167,9 +2167,10  <at>  <at>  static int __init hotkey_init(struct ibm_init_struct *iibm)
 		printk(TPACPI_INFO
 			"radio switch found; radios are %s\n",
 			enabled(status, 0));
+	}
+	if (tp_features.hotkey_wlsw)
 		res = add_to_attr_set(hotkey_dev_attributes,
 				&dev_attr_hotkey_radio_sw.attr);
-	}

 	/* For X41t, X60t, X61t Tablets... */
 	if (!res && acpi_evalf(hkey_handle, &status, "MHKG", "qd")) {
 <at>  <at>  -2646,18 +2647,19  <at>  <at>  static int __init bluetooth_init(struct ibm_init_struct *iibm)
 		str_supported(tp_features.bluetooth),
 		status);

+	if (tp_features.bluetooth &&
+	    !(status & TP_ACPI_BLUETOOTH_HWPRESENT)) {
(Continue reading)

Andi Kleen | 1 Jul 2008 20:44

Re: [PATCH 1/7] ACPI: thinkpad-acpi: minor refactor on radio switch init

Henrique de Moraes Holschuh wrote:
> Change the code of hotkey_init, wan_init and bluetooth_init a bit to make it
> much easier to add some Kconfig-selected debugging code later.

The later seems to be wrong, the debugging code is already included?

Description seems to be incomplete.

-Andi
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Picon
Favicon

Re: [PATCH 1/7] ACPI: thinkpad-acpi: minor refactor on radio switch init

On Tue, 01 Jul 2008, Andi Kleen wrote:
> Henrique de Moraes Holschuh wrote:
> > Change the code of hotkey_init, wan_init and bluetooth_init a bit to make it
> > much easier to add some Kconfig-selected debugging code later.
> 
> The later seems to be wrong, the debugging code is already included?

No, that patch just moves some code around and changes the way some
conditionals were written so it would be easier to add the debugging
code later.  It is supposed to change nothing as far as functionality
goes.

I do have that debugging code, but I didn't see a reason to submit it
for mainline yet.  But it helps me a whole deal if it is easy to just
patch it in when I needed it, so patch 1/7 is something I'd like merged.

The debugging code itself is a harness to simulate the thinkpad rfkill
firmware, as my T43 doesn't have bluetooth, WWAN or the WLSW rfkill
switch and I needed a way to test those codepaths.  As I said, it is a
separate patch I didn't submit yet (and might decide not to submit at
all, unless someone asks for it or I find out it would be helpful to
track some sort of bug).

I.e. the patch does exactly what the description says :-)

But I have nothing against changing that description, I just don't know
what to put in there that would be better...

--

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
(Continue reading)


Gmane