aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc/thinkpad_acpi.h
diff options
context:
space:
mode:
authorHenrique de Moraes Holschuh <hmh@hmh.eng.br>2007-04-21 10:08:31 -0400
committerLen Brown <len.brown@intel.com>2007-04-21 23:30:33 -0400
commit5fba344cfdbaa79e6320da26c3db34dfb219a845 (patch)
tree7dd7629444f4ca95b469b56341b40268fad98aab /drivers/misc/thinkpad_acpi.h
parent132ce09123755ec5e3d3a8ae22f4f753c3baac97 (diff)
ACPI: thinkpad-acpi: clean up probing and move init to subdrivers
Move most of the probing code to its own function, and most of the subdriver-specific init code into subdriver init functions. This allows us to not define pci_handle unless the dock subdriver is enabled, as well. This patch causes a minor userland interface change: if a subdriver doesn't detect a capability, /proc entries for it are not created anymore (as opposed to a /proc entry that just returned "unsupported"). Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/misc/thinkpad_acpi.h')
-rw-r--r--drivers/misc/thinkpad_acpi.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/misc/thinkpad_acpi.h b/drivers/misc/thinkpad_acpi.h
index b2348d7a07c4..06d4c3839afd 100644
--- a/drivers/misc/thinkpad_acpi.h
+++ b/drivers/misc/thinkpad_acpi.h
@@ -104,7 +104,7 @@ static acpi_handle ecrd_handle, ecwr_handle; /* 570 EC access */
104static acpi_handle cmos_handle, hkey_handle; /* basic thinkpad handles */ 104static acpi_handle cmos_handle, hkey_handle; /* basic thinkpad handles */
105 105
106static void ibm_handle_init(char *name, 106static void ibm_handle_init(char *name,
107 acpi_handle * handle, acpi_handle parent, 107 acpi_handle *handle, acpi_handle parent,
108 char **paths, int num_paths, char **path); 108 char **paths, int num_paths, char **path);
109#define IBM_HANDLE_INIT(object) \ 109#define IBM_HANDLE_INIT(object) \
110 ibm_handle_init(#object, &object##_handle, *object##_parent, \ 110 ibm_handle_init(#object, &object##_handle, *object##_parent, \
@@ -242,8 +242,8 @@ static int cmos_write(char *buf);
242 * Dock subdriver 242 * Dock subdriver
243 */ 243 */
244 244
245static acpi_handle pci_handle;
246#ifdef CONFIG_THINKPAD_ACPI_DOCK 245#ifdef CONFIG_THINKPAD_ACPI_DOCK
246static acpi_handle pci_handle;
247static acpi_handle dock_handle; 247static acpi_handle dock_handle;
248 248
249static void dock_notify(struct ibm_struct *ibm, u32 event); 249static void dock_notify(struct ibm_struct *ibm, u32 event);