From: Len Brown <len.brown@intel.com>
To: linux-acpi@vger.kernel.org
Cc: Henrique de Moraes Holschuh <hmh@debian.org>,
Henrique de Moraes Holschuh <hmh@hmh.eng.br>,
Len Brown <len.brown@intel.com>
Subject: [PATCH 054/105] ACPI: thinkpad-acpi: uncouple subdriver init from ibms struct
Date: Sun, 29 Apr 2007 00:50:54 -0400 [thread overview]
Message-ID: <11778223551720-git-send-email-len.brown@intel.com> (raw)
Message-ID: <a5763f2223ce3fdbc75923f8c948fc7b59ed2f96.1177822058.git.len.brown@intel.com> (raw)
In-Reply-To: <11778223553521-git-send-email-len.brown@intel.com>
In-Reply-To: <ac122bb64b0d51f0512185d3522a75f3f3a80bc9.1177822058.git.len.brown@intel.com>
From: Henrique de Moraes Holschuh <hmh@debian.org>
Move the .init method from ibms struct to another struct, and use a list
head to control which subdrivers have been activated.
This allows us to have the subdriver init methods marked __init, saving
quite a lot of .text size, and even a bit of .data size as some data can
now be made __initdata.
Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
---
drivers/misc/thinkpad_acpi.c | 402 ++++++++++++++++++++++++++----------------
drivers/misc/thinkpad_acpi.h | 51 +++---
2 files changed, 278 insertions(+), 175 deletions(-)
diff --git a/drivers/misc/thinkpad_acpi.c b/drivers/misc/thinkpad_acpi.c
index e8fc8da..5611268 100644
--- a/drivers/misc/thinkpad_acpi.c
+++ b/drivers/misc/thinkpad_acpi.c
@@ -470,7 +470,7 @@ static char *next_cmd(char **cmds)
* thinkpad-acpi init subdriver
*/
-static int thinkpad_acpi_driver_init(void)
+static int __init thinkpad_acpi_driver_init(struct ibm_init_struct *iibm)
{
printk(IBM_INFO "%s v%s\n", IBM_DESC, IBM_VERSION);
printk(IBM_INFO "%s\n", IBM_URL);
@@ -492,6 +492,11 @@ static int thinkpad_acpi_driver_read(char *p)
return len;
}
+static struct ibm_struct thinkpad_acpi_driver_data = {
+ .name = "driver",
+ .read = thinkpad_acpi_driver_read,
+};
+
/*************************************************************************
* Hotkey subdriver
*/
@@ -501,7 +506,7 @@ static int hotkey_mask_supported;
static int hotkey_orig_status;
static int hotkey_orig_mask;
-static int hotkey_init(void)
+static int __init hotkey_init(struct ibm_init_struct *iibm)
{
vdbg_printk(TPACPI_DBG_INIT, "initializing hotkey subdriver\n");
@@ -640,13 +645,24 @@ static int hotkey_write(char *buf)
return 0;
}
+static struct ibm_struct hotkey_driver_data = {
+ .name = "hotkey",
+ .hid = IBM_HKEY_HID,
+ .read = hotkey_read,
+ .write = hotkey_write,
+ .exit = hotkey_exit,
+ .notify = hotkey_notify,
+ .handle = &hkey_handle,
+ .type = ACPI_DEVICE_NOTIFY,
+};
+
/*************************************************************************
* Bluetooth subdriver
*/
static int bluetooth_supported;
-static int bluetooth_init(void)
+static int __init bluetooth_init(struct ibm_init_struct *iibm)
{
vdbg_printk(TPACPI_DBG_INIT, "initializing bluetooth subdriver\n");
@@ -716,13 +732,19 @@ static int bluetooth_write(char *buf)
return 0;
}
+static struct ibm_struct bluetooth_driver_data = {
+ .name = "bluetooth",
+ .read = bluetooth_read,
+ .write = bluetooth_write,
+};
+
/*************************************************************************
* Wan subdriver
*/
static int wan_supported;
-static int wan_init(void)
+static int __init wan_init(struct ibm_init_struct *iibm)
{
vdbg_printk(TPACPI_DBG_INIT, "initializing wan subdriver\n");
@@ -789,6 +811,13 @@ static int wan_write(char *buf)
return 0;
}
+static struct ibm_struct wan_driver_data = {
+ .name = "wan",
+ .read = wan_read,
+ .write = wan_write,
+ .experimental = 1,
+};
+
/*************************************************************************
* Video subdriver
*/
@@ -805,7 +834,7 @@ IBM_HANDLE(vid, root, "\\_SB.PCI.AGP.VGA", /* 570 */
IBM_HANDLE(vid2, root, "\\_SB.PCI0.AGPB.VID"); /* G41 */
-static int video_init(void)
+static int __init video_init(struct ibm_init_struct *iibm)
{
int ivga;
@@ -1011,6 +1040,13 @@ static int video_write(char *buf)
return 0;
}
+static struct ibm_struct video_driver_data = {
+ .name = "video",
+ .read = video_read,
+ .write = video_write,
+ .exit = video_exit,
+};
+
/*************************************************************************
* Light (thinklight) subdriver
*/
@@ -1021,7 +1057,7 @@ static int light_status_supported;
IBM_HANDLE(lght, root, "\\LGHT"); /* A21e, A2xm/p, T20-22, X20-21 */
IBM_HANDLE(ledb, ec, "LEDB"); /* G4x */
-static int light_init(void)
+static int __init light_init(struct ibm_init_struct *iibm)
{
vdbg_printk(TPACPI_DBG_INIT, "initializing light subdriver\n");
@@ -1093,6 +1129,12 @@ static int light_write(char *buf)
return 0;
}
+static struct ibm_struct light_driver_data = {
+ .name = "light",
+ .read = light_read,
+ .write = light_write,
+};
+
/*************************************************************************
* Dock subdriver
*/
@@ -1110,7 +1152,7 @@ IBM_HANDLE(pci, root, "\\_SB.PCI"); /* 570 */
#define dock_docked() (_sta(dock_handle) & 1)
-static int dock_init(void)
+static int __init dock_init(struct ibm_init_struct *iibm)
{
vdbg_printk(TPACPI_DBG_INIT, "initializing dock subdriver\n");
@@ -1184,6 +1226,24 @@ static int dock_write(char *buf)
return 0;
}
+static struct ibm_struct dock_driver_data[2] = {
+ {
+ .name = "dock",
+ .read = dock_read,
+ .write = dock_write,
+ .notify = dock_notify,
+ .handle = &dock_handle,
+ .type = ACPI_SYSTEM_NOTIFY,
+ },
+ {
+ .name = "dock",
+ .hid = IBM_PCI_HID,
+ .notify = dock_notify,
+ .handle = &pci_handle,
+ .type = ACPI_SYSTEM_NOTIFY,
+ },
+};
+
#endif /* CONFIG_THINKPAD_ACPI_DOCK */
/*************************************************************************
@@ -1211,7 +1271,7 @@ IBM_HANDLE(bay2_ej, bay2, "_EJ3", /* 600e/x, 770e, A3x */
"_EJ0", /* 770x */
); /* all others */
-static int bay_init(void)
+static int __init bay_init(struct ibm_init_struct *iibm)
{
vdbg_printk(TPACPI_DBG_INIT, "initializing bay subdriver\n");
@@ -1298,13 +1358,23 @@ static int bay_write(char *buf)
return 0;
}
+
+static struct ibm_struct bay_driver_data = {
+ .name = "bay",
+ .read = bay_read,
+ .write = bay_write,
+ .notify = bay_notify,
+ .handle = &bay_handle,
+ .type = ACPI_SYSTEM_NOTIFY,
+};
+
#endif /* CONFIG_THINKPAD_ACPI_BAY */
/*************************************************************************
* CMOS subdriver
*/
-static int cmos_init(void)
+static int __init cmos_init(struct ibm_init_struct *iibm)
{
vdbg_printk(TPACPI_DBG_INIT,
"initializing cmos commands subdriver\n");
@@ -1362,6 +1432,11 @@ static int cmos_write(char *buf)
return 0;
}
+static struct ibm_struct cmos_driver_data = {
+ .name = "cmos",
+ .read = cmos_read,
+ .write = cmos_write,
+};
/*************************************************************************
* LED subdriver
@@ -1374,7 +1449,7 @@ IBM_HANDLE(led, ec, "SLED", /* 570 */
"LED", /* all others */
); /* R30, R31 */
-static int led_init(void)
+static int __init led_init(struct ibm_init_struct *iibm)
{
vdbg_printk(TPACPI_DBG_INIT, "initializing LED subdriver\n");
@@ -1487,13 +1562,19 @@ static int led_write(char *buf)
return 0;
}
+static struct ibm_struct led_driver_data = {
+ .name = "led",
+ .read = led_read,
+ .write = led_write,
+};
+
/*************************************************************************
* Beep subdriver
*/
IBM_HANDLE(beep, ec, "BEEP"); /* all except R30, R31 */
-static int beep_init(void)
+static int __init beep_init(struct ibm_init_struct *iibm)
{
vdbg_printk(TPACPI_DBG_INIT, "initializing beep subdriver\n");
@@ -1540,13 +1621,19 @@ static int beep_write(char *buf)
return 0;
}
+static struct ibm_struct beep_driver_data = {
+ .name = "beep",
+ .read = beep_read,
+ .write = beep_write,
+};
+
/*************************************************************************
* Thermal subdriver
*/
static enum thermal_access_mode thermal_read_mode;
-static int thermal_init(void)
+static int __init thermal_init(struct ibm_init_struct *iibm)
{
u8 t, ta1, ta2;
int i;
@@ -1692,6 +1779,11 @@ static int thermal_read(char *p)
return len;
}
+static struct ibm_struct thermal_driver_data = {
+ .name = "thermal",
+ .read = thermal_read,
+};
+
/*************************************************************************
* EC Dump subdriver
*/
@@ -1755,6 +1847,13 @@ static int ecdump_write(char *buf)
return 0;
}
+static struct ibm_struct ecdump_driver_data = {
+ .name = "ecdump",
+ .read = ecdump_read,
+ .write = ecdump_write,
+ .experimental = 1,
+};
+
/*************************************************************************
* Backlight/brightness subdriver
*/
@@ -1766,7 +1865,7 @@ static struct backlight_ops ibm_backlight_data = {
.update_status = brightness_update_status,
};
-static int brightness_init(void)
+static int __init brightness_init(struct ibm_init_struct *iibm)
{
int b;
@@ -1883,6 +1982,13 @@ static int brightness_write(char *buf)
return 0;
}
+static struct ibm_struct brightness_driver_data = {
+ .name = "brightness",
+ .read = brightness_read,
+ .write = brightness_write,
+ .exit = brightness_exit,
+};
+
/*************************************************************************
* Volume subdriver
*/
@@ -1967,6 +2073,11 @@ static int volume_write(char *buf)
return 0;
}
+static struct ibm_struct volume_driver_data = {
+ .name = "volume",
+ .read = volume_read,
+ .write = volume_write,
+};
/*************************************************************************
* Fan subdriver
@@ -2092,7 +2203,7 @@ IBM_HANDLE(sfan, ec, "SFAN", /* 570 */
"JFNS", /* 770x-JL */
); /* all others */
-static int fan_init(void)
+static int __init fan_init(struct ibm_init_struct *iibm)
{
vdbg_printk(TPACPI_DBG_INIT, "initializing fan subdriver\n");
@@ -2568,6 +2679,14 @@ static int fan_write(char *buf)
return rc;
}
+static struct ibm_struct fan_driver_data = {
+ .name = "fan",
+ .read = fan_read,
+ .write = fan_write,
+ .exit = fan_exit,
+ .experimental = 1,
+};
+
/****************************************************************************
****************************************************************************
*
@@ -2580,159 +2699,45 @@ static int fan_write(char *buf)
static struct proc_dir_entry *proc_dir = NULL;
/* Subdriver registry */
-static struct ibm_struct ibms[] = {
- {
- .name = "driver",
- .init = thinkpad_acpi_driver_init,
- .read = thinkpad_acpi_driver_read,
- },
- {
- .name = "hotkey",
- .hid = IBM_HKEY_HID,
- .init = hotkey_init,
- .read = hotkey_read,
- .write = hotkey_write,
- .exit = hotkey_exit,
- .notify = hotkey_notify,
- .handle = &hkey_handle,
- .type = ACPI_DEVICE_NOTIFY,
- },
- {
- .name = "bluetooth",
- .init = bluetooth_init,
- .read = bluetooth_read,
- .write = bluetooth_write,
- },
- {
- .name = "wan",
- .init = wan_init,
- .read = wan_read,
- .write = wan_write,
- .experimental = 1,
- },
- {
- .name = "video",
- .init = video_init,
- .read = video_read,
- .write = video_write,
- .exit = video_exit,
- },
- {
- .name = "light",
- .init = light_init,
- .read = light_read,
- .write = light_write,
- },
-#ifdef CONFIG_THINKPAD_ACPI_DOCK
- {
- .name = "dock",
- .init = dock_init,
- .read = dock_read,
- .write = dock_write,
- .notify = dock_notify,
- .handle = &dock_handle,
- .type = ACPI_SYSTEM_NOTIFY,
- },
- {
- .name = "dock",
- .hid = IBM_PCI_HID,
- .notify = dock_notify,
- .handle = &pci_handle,
- .type = ACPI_SYSTEM_NOTIFY,
- },
-#endif
-#ifdef CONFIG_THINKPAD_ACPI_BAY
- {
- .name = "bay",
- .init = bay_init,
- .read = bay_read,
- .write = bay_write,
- .notify = bay_notify,
- .handle = &bay_handle,
- .type = ACPI_SYSTEM_NOTIFY,
- },
-#endif /* CONFIG_THINKPAD_ACPI_BAY */
- {
- .name = "cmos",
- .init = cmos_init,
- .read = cmos_read,
- .write = cmos_write,
- },
- {
- .name = "led",
- .init = led_init,
- .read = led_read,
- .write = led_write,
- },
- {
- .name = "beep",
- .init = beep_init,
- .read = beep_read,
- .write = beep_write,
- },
- {
- .name = "thermal",
- .init = thermal_init,
- .read = thermal_read,
- },
- {
- .name = "ecdump",
- .read = ecdump_read,
- .write = ecdump_write,
- .experimental = 1,
- },
- {
- .name = "brightness",
- .read = brightness_read,
- .write = brightness_write,
- .init = brightness_init,
- .exit = brightness_exit,
- },
- {
- .name = "volume",
- .read = volume_read,
- .write = volume_write,
- },
- {
- .name = "fan",
- .read = fan_read,
- .write = fan_write,
- .init = fan_init,
- .exit = fan_exit,
- .experimental = 1,
- },
-};
+static LIST_HEAD(tpacpi_all_drivers);
+
/*
* Module and infrastructure proble, init and exit handling
*/
#ifdef CONFIG_THINKPAD_ACPI_DEBUG
-static const char * str_supported(int is_supported)
+static const char * __init str_supported(int is_supported)
{
- static const char * const text_unsupported = "not supported";
+ static char text_unsupported[] __initdata = "not supported";
- return (is_supported)? text_unsupported + 4 : text_unsupported;
+ return (is_supported)? &text_unsupported[4] : &text_unsupported[0];
}
#endif /* CONFIG_THINKPAD_ACPI_DEBUG */
-static int __init ibm_init(struct ibm_struct *ibm)
+static int __init ibm_init(struct ibm_init_struct *iibm)
{
int ret;
+ struct ibm_struct *ibm = iibm->data;
struct proc_dir_entry *entry;
+ BUG_ON(ibm == NULL);
+
+ INIT_LIST_HEAD(&ibm->all_drivers);
+
if (ibm->experimental && !experimental)
return 0;
dbg_printk(TPACPI_DBG_INIT,
"probing for %s\n", ibm->name);
- if (ibm->init) {
- ret = ibm->init();
+ if (iibm->init) {
+ ret = iibm->init(iibm);
if (ret > 0)
return 0; /* probe failed */
if (ret)
return ret;
+
ibm->init_called = 1;
}
@@ -2775,6 +2780,8 @@ static int __init ibm_init(struct ibm_struct *ibm)
ibm->proc_created = 1;
}
+ list_add_tail(&ibm->all_drivers, &tpacpi_all_drivers);
+
return 0;
err_out:
@@ -2789,6 +2796,9 @@ err_out:
static void ibm_exit(struct ibm_struct *ibm)
{
dbg_printk(TPACPI_DBG_EXIT, "removing %s\n", ibm->name);
+
+ list_del_init(&ibm->all_drivers);
+
if (ibm->notify_installed) {
dbg_printk(TPACPI_DBG_EXIT,
"%s: acpi_remove_notify_handler\n", ibm->name);
@@ -2817,6 +2827,8 @@ static void ibm_exit(struct ibm_struct *ibm)
ibm->exit();
ibm->init_called = 0;
}
+
+ dbg_printk(TPACPI_DBG_INIT, "finished removing %s\n", ibm->name);
}
/* Probing */
@@ -2875,18 +2887,95 @@ static int __init probe_for_thinkpad(void)
/* Module init, exit, parameters */
+static struct ibm_init_struct ibms_init[] __initdata = {
+ {
+ .init = thinkpad_acpi_driver_init,
+ .data = &thinkpad_acpi_driver_data,
+ },
+ {
+ .init = hotkey_init,
+ .data = &hotkey_driver_data,
+ },
+ {
+ .init = bluetooth_init,
+ .data = &bluetooth_driver_data,
+ },
+ {
+ .init = wan_init,
+ .data = &wan_driver_data,
+ },
+ {
+ .init = video_init,
+ .data = &video_driver_data,
+ },
+ {
+ .init = light_init,
+ .data = &light_driver_data,
+ },
+#ifdef CONFIG_THINKPAD_ACPI_DOCK
+ {
+ .init = dock_init,
+ .data = &dock_driver_data[0],
+ },
+ {
+ .data = &dock_driver_data[1],
+ },
+#endif
+#ifdef CONFIG_THINKPAD_ACPI_BAY
+ {
+ .init = bay_init,
+ .data = &bay_driver_data,
+ },
+#endif
+ {
+ .init = cmos_init,
+ .data = &cmos_driver_data,
+ },
+ {
+ .init = led_init,
+ .data = &led_driver_data,
+ },
+ {
+ .init = beep_init,
+ .data = &beep_driver_data,
+ },
+ {
+ .init = thermal_init,
+ .data = &thermal_driver_data,
+ },
+ {
+ .data = &ecdump_driver_data,
+ },
+ {
+ .init = brightness_init,
+ .data = &brightness_driver_data,
+ },
+ {
+ .data = &volume_driver_data,
+ },
+ {
+ .init = fan_init,
+ .data = &fan_driver_data,
+ },
+};
+
static int __init set_ibm_param(const char *val, struct kernel_param *kp)
{
unsigned int i;
+ struct ibm_struct *ibm;
- for (i = 0; i < ARRAY_SIZE(ibms); i++)
- if (strcmp(ibms[i].name, kp->name) == 0 && ibms[i].write) {
- if (strlen(val) > sizeof(ibms[i].param) - 2)
+ for (i = 0; i < ARRAY_SIZE(ibms_init); i++) {
+ ibm = ibms_init[i].data;
+ BUG_ON(ibm == NULL);
+
+ if (strcmp(ibm->name, kp->name) == 0 && ibm->write) {
+ if (strlen(val) > sizeof(ibms_init[i].param) - 2)
return -ENOSPC;
- strcpy(ibms[i].param, val);
- strcat(ibms[i].param, ",");
+ strcpy(ibms_init[i].param, val);
+ strcat(ibms_init[i].param, ",");
return 0;
}
+ }
return -EINVAL;
}
@@ -2938,10 +3027,10 @@ static int __init thinkpad_acpi_module_init(void)
}
proc_dir->owner = THIS_MODULE;
- for (i = 0; i < ARRAY_SIZE(ibms); i++) {
- ret = ibm_init(&ibms[i]);
- if (ret >= 0 && *ibms[i].param)
- ret = ibms[i].write(ibms[i].param);
+ for (i = 0; i < ARRAY_SIZE(ibms_init); i++) {
+ ret = ibm_init(&ibms_init[i]);
+ if (ret >= 0 && *ibms_init[i].param)
+ ret = ibms_init[i].data->write(ibms_init[i].param);
if (ret < 0) {
thinkpad_acpi_module_exit();
return ret;
@@ -2953,10 +3042,15 @@ static int __init thinkpad_acpi_module_init(void)
static void thinkpad_acpi_module_exit(void)
{
- int i;
+ struct ibm_struct *ibm, *itmp;
+
+ list_for_each_entry_safe_reverse(ibm, itmp,
+ &tpacpi_all_drivers,
+ all_drivers) {
+ ibm_exit(ibm);
+ }
- for (i = ARRAY_SIZE(ibms) - 1; i >= 0; i--)
- ibm_exit(&ibms[i]);
+ dbg_printk(TPACPI_DBG_INIT, "finished subdriver exit path...\n");
if (proc_dir)
remove_proc_entry(IBM_DIR, acpi_root_dir);
diff --git a/drivers/misc/thinkpad_acpi.h b/drivers/misc/thinkpad_acpi.h
index beb1447..97467b7 100644
--- a/drivers/misc/thinkpad_acpi.h
+++ b/drivers/misc/thinkpad_acpi.h
@@ -29,6 +29,7 @@
#include <linux/init.h>
#include <linux/types.h>
#include <linux/string.h>
+#include <linux/list.h>
#include <linux/proc_fs.h>
#include <linux/backlight.h>
@@ -116,8 +117,6 @@ static void ibm_handle_init(char *name,
/* procfs support */
static struct proc_dir_entry *proc_dir;
-static int thinkpad_acpi_driver_init(void);
-static int thinkpad_acpi_driver_read(char *p);
/* procfs helpers */
static int dispatch_read(char *page, char **start, off_t off, int count,
@@ -142,12 +141,10 @@ static void thinkpad_acpi_module_exit(void);
struct ibm_struct {
char *name;
- char param[32];
char *hid;
struct acpi_driver *driver;
- int (*init) (void);
int (*read) (char *);
int (*write) (char *);
void (*exit) (void);
@@ -157,6 +154,8 @@ struct ibm_struct {
int type;
struct acpi_device *device;
+ struct list_head all_drivers;
+
int driver_registered;
int proc_created;
int init_called;
@@ -165,16 +164,26 @@ struct ibm_struct {
int experimental;
};
-static struct ibm_struct ibms[];
+struct ibm_init_struct {
+ char param[32];
+
+ int (*init) (struct ibm_init_struct *);
+ struct ibm_struct *data;
+};
+
+static struct list_head tpacpi_all_drivers;
+
+static struct ibm_init_struct ibms_init[];
static int set_ibm_param(const char *val, struct kernel_param *kp);
-static int ibm_init(struct ibm_struct *ibm);
+static int ibm_init(struct ibm_init_struct *iibm);
static void ibm_exit(struct ibm_struct *ibm);
-/* ACPI devices */
-static void dispatch_notify(acpi_handle handle, u32 event, void *data);
-static int setup_notify(struct ibm_struct *ibm);
-static int ibm_device_add(struct acpi_device *device);
-static int register_tpacpi_subdriver(struct ibm_struct *ibm);
+
+/*
+ * procfs master subdriver
+ */
+static int thinkpad_acpi_driver_init(struct ibm_init_struct *iibm);
+static int thinkpad_acpi_driver_read(char *p);
/*
@@ -188,7 +197,7 @@ static int bay_status2_supported, bay_eject2_supported;
static acpi_handle bay_handle, bay_ej_handle;
static acpi_handle bay2_handle, bay2_ej_handle;
-static int bay_init(void);
+static int bay_init(struct ibm_init_struct *iibm);
static void bay_notify(struct ibm_struct *ibm, u32 event);
static int bay_read(char *p);
static int bay_write(char *buf);
@@ -211,7 +220,7 @@ static int beep_write(char *buf);
static int bluetooth_supported;
-static int bluetooth_init(void);
+static int bluetooth_init(struct ibm_init_struct *iibm);
static int bluetooth_status(void);
static int bluetooth_read(char *p);
static int bluetooth_write(char *buf);
@@ -224,7 +233,7 @@ static int bluetooth_write(char *buf);
static struct backlight_device *ibm_backlight_device;
static int brightness_offset = 0x31;
-static int brightness_init(void);
+static int brightness_init(struct ibm_init_struct *iibm);
static void brightness_exit(void);
static int brightness_get(struct backlight_device *bd);
static int brightness_set(int value);
@@ -306,7 +315,7 @@ static int fan_watchdog_maxinterval;
static acpi_handle fans_handle, gfan_handle, sfan_handle;
-static int fan_init(void);
+static int fan_init(struct ibm_init_struct *iibm);
static void fan_exit(void);
static int fan_get_status(u8 *status);
static int fan_get_speed(unsigned int *speed);
@@ -334,7 +343,7 @@ static int hotkey_mask_supported;
static int hotkey_orig_status;
static int hotkey_orig_mask;
-static int hotkey_init(void);
+static int hotkey_init(struct ibm_init_struct *iibm);
static void hotkey_exit(void);
static int hotkey_get(int *status, int *mask);
static int hotkey_set(int status, int mask);
@@ -363,7 +372,7 @@ enum { /* For TPACPI_LED_OLD */
static enum led_access_mode led_supported;
static acpi_handle led_handle;
-static int led_init(void);
+static int led_init(struct ibm_init_struct *iibm);
static int led_read(char *p);
static int led_write(char *buf);
@@ -375,7 +384,7 @@ static int light_supported;
static int light_status_supported;
static acpi_handle lght_handle, ledb_handle;
-static int light_init(void);
+static int light_init(struct ibm_init_struct *iibm);
static int light_read(char *p);
static int light_write(char *buf);
@@ -397,7 +406,7 @@ struct ibm_thermal_sensors_struct {
s32 temp[TPACPI_MAX_THERMAL_SENSORS];
};
-static int thermal_init(void);
+static int thermal_init(struct ibm_init_struct *iibm);
static int thermal_get_sensors(struct ibm_thermal_sensors_struct *s);
static int thermal_read(char *p);
@@ -417,7 +426,7 @@ static enum video_access_mode video_supported;
static int video_orig_autosw;
static acpi_handle vid_handle, vid2_handle;
-static int video_init(void);
+static int video_init(struct ibm_init_struct *iibm);
static void video_exit(void);
static int video_status(void);
static int video_autosw(void);
@@ -444,7 +453,7 @@ static int volume_write(char *buf);
static int wan_supported;
-static int wan_init(void);
+static int wan_init(struct ibm_init_struct *iibm);
static int wan_status(void);
static int wan_read(char *p);
static int wan_write(char *buf);
--
1.5.2.rc0.34.gda94
next prev parent reply other threads:[~2007-04-29 4:52 UTC|newest]
Thread overview: 89+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-29 4:50 ACPI patches for 2.6.22 merge window Len Brown
[not found] ` <11778223068-git-send-email-len.brown@intel.com>
[not found] ` <ac122bb64b0d51f0512185d3522a75f3f3a80bc9.1177822058.git.len.brown@intel.com>
2007-04-29 4:50 ` [PATCH 002/105] ACPI: EC: Don't use Global Lock if not asked to do so Len Brown
2007-04-29 4:50 ` Len Brown
2007-04-29 4:50 ` [PATCH 003/105] ACPI: EC: Make EC to initialize first in ACPI Len Brown
2007-04-29 4:50 ` Len Brown
2007-04-29 4:50 ` [PATCH 004/105] ACPI: EC: "Fake ECDT" workaround is not needed any longer Len Brown
2007-04-29 4:50 ` Len Brown
2007-04-29 4:50 ` [PATCH 005/105] ACPI: EC: enable burst functionality in EC Len Brown
2007-04-29 4:50 ` Len Brown
2007-04-29 4:50 ` [PATCH 006/105] ACPI: EC: Remove casts to/from void* from ec.c Len Brown
2007-04-29 4:50 ` Len Brown
2007-04-29 4:50 ` [PATCH 007/105] ACPI: EC: Put install handlers into separate function Len Brown
2007-04-29 4:50 ` Len Brown
2007-04-29 4:50 ` [PATCH 008/105] ACPI: EC: Clean ECDT and namespace parsing Len Brown
2007-04-29 4:50 ` Len Brown
2007-04-29 4:50 ` [PATCH 009/105] ACPI: EC: Rename ec_ecdt to more informative boot_ec Len Brown
2007-04-29 4:50 ` Len Brown
2007-04-29 4:50 ` [PATCH 010/105] ACPI: EC: first_ec is better to be acpi_ec than acpi_device Len Brown
2007-04-29 4:50 ` Len Brown
2007-04-29 4:50 ` [PATCH 011/105] ACPI: EC: Cleanup of EC initialization Len Brown
2007-04-29 4:50 ` Len Brown
2007-04-29 4:50 ` [PATCH 012/105] ACPI: EC: Block queries until EC is fully initialized Len Brown
2007-04-29 4:50 ` Len Brown
2007-04-29 4:50 ` [PATCH 013/105] asus-laptop: use acpi_evaluate_integer instead of read_acpi_int Len Brown
2007-04-29 4:50 ` Len Brown
2007-04-29 4:50 ` [PATCH 014/105] asus-laptop: clean write_status Len Brown
2007-04-29 4:50 ` Len Brown
2007-04-29 4:50 ` [PATCH 015/105] asus-laptop: add GLED Len Brown
2007-04-29 4:50 ` Len Brown
2007-04-29 4:50 ` [PATCH 016/105] asus-laptop: add wapf param Len Brown
2007-04-29 4:50 ` Len Brown
2007-04-29 4:50 ` [PATCH 017/105] asus-laptop: version bump Len Brown
2007-04-29 4:50 ` Len Brown
2007-04-29 4:50 ` [PATCH 018/105] ACPI: sbs: use EC rather than I2C Len Brown
2007-04-29 4:50 ` Len Brown
2007-04-29 4:50 ` [PATCH 019/105] ACPI: sbs: remove I2C Kconfig dependency Len Brown
2007-04-29 4:50 ` Len Brown
2007-04-29 4:50 ` [PATCH 020/105] ACPI: sbs: remove I2C Makefile hooks Len Brown
2007-04-29 4:50 ` Len Brown
2007-04-29 4:50 ` [PATCH 021/105] ACPI: sbs: Debug messages correction/improvement Len Brown
2007-04-29 4:50 ` Len Brown
2007-04-29 4:50 ` [PATCH 022/105] ACPI: sbs: Common interface with CM battery Len Brown
2007-04-29 4:50 ` Len Brown
2007-04-29 4:50 ` [PATCH 023/105] ACPI: sbs: remove i2c_ec.[ch] Len Brown
2007-04-29 4:50 ` Len Brown
2007-04-29 4:50 ` [PATCH 024/105] ACPI: ibm-acpi: kill trailing whitespace Len Brown
2007-04-29 4:50 ` Len Brown
2007-04-29 4:50 ` [PATCH 025/105] ACPI: ibm-acpi: rename some identifiers Len Brown
2007-04-29 4:50 ` Len Brown
2007-04-29 4:50 ` [PATCH 026/105] ACPI: ibm-acpi: add header file Len Brown
2007-04-29 4:50 ` Len Brown
2007-04-29 4:50 ` [PATCH 027/105] ACPI: ibm-acpi: organize code Len Brown
2007-04-29 4:50 ` Len Brown
2007-04-29 4:50 ` [PATCH 028/105] ACPI: ibm-acpi: update copyright notice Len Brown
2007-04-29 4:50 ` Len Brown
2007-04-29 4:50 ` [PATCH 029/105] ACPI: ibm-acpi: update documentation Len Brown
2007-04-29 4:50 ` Len Brown
2007-04-29 4:50 ` [PATCH 031/105] ACPI: dock: use NULL for pointer Len Brown
2007-04-29 4:50 ` Len Brown
2007-04-29 4:50 ` [PATCH 033/105] ACPI: thinkpad-acpi: cleanup Kconfig for thinkpad-acpi Len Brown
2007-04-29 4:50 ` Len Brown
2007-04-29 4:50 ` [PATCH 034/105] ACPI: thinkpad-acpi: add compatibility MODULE_ALIAS entry Len Brown
2007-04-29 4:50 ` Len Brown
2007-04-29 4:50 ` [PATCH 035/105] ACPI: thinkpad-acpi: cleanup after rename Len Brown
2007-04-29 4:50 ` Len Brown
2007-04-29 4:50 ` [PATCH 036/105] ACPI: thinkpad-acpi: update MAINTAINERS Len Brown
2007-04-29 4:50 ` Len Brown
[not found] ` <11778223411658-git-send-email-len.brown@intel.com>
[not found] ` <11778223412672-git-send-email-len.brown@intel.com>
[not found] ` <11778223423-git-send-email-len.brown@intel.com>
[not found] ` <1177822343712-git-send-email-len.brown@intel.com>
[not found] ` <11778223442065-git-send-email-len.brown@intel.com>
[not found] ` <11778223452843-git-send-email-len.brown@intel.com>
[not found] ` <11778223461282-git-send-email-len.brown@intel.com>
[not found] ` <11778223472316-git-send-email-len.brown@intel.com>
2007-04-29 4:50 ` [PATCH 046/105] ACPI: thinkpad-acpi: rename register_ibmacpi_subdriver Len Brown
2007-04-29 4:50 ` Len Brown
2007-04-29 4:50 ` [PATCH 047/105] ACPI: thinkpad-acpi: rename one stray use of ibm-acpi in a comment Len Brown
2007-04-29 4:50 ` Len Brown
2007-04-29 4:50 ` [PATCH 048/105] ACPI: thinkpad-acpi: rename module glue Len Brown
2007-04-29 4:50 ` Len Brown
2007-04-29 4:50 ` [PATCH 049/105] ACPI: thinkpad-acpi: rename thinkpad constants Len Brown
2007-04-29 4:50 ` Len Brown
2007-04-29 4:50 ` [PATCH 050/105] ACPI: thinkpad-acpi: update fan firmware documentation Len Brown
2007-04-29 4:50 ` Len Brown
2007-04-29 4:50 ` [PATCH 051/105] ACPI: thinkpad-acpi: add debug mode Len Brown
2007-04-29 4:50 ` Len Brown
2007-04-29 4:50 ` [PATCH 052/105] ACPI: thinkpad-acpi: clean up probing and move init to subdrivers Len Brown
2007-04-29 4:50 ` Len Brown
2007-04-29 4:50 ` [PATCH 053/105] ACPI: thinkpad-acpi: add subdriver debug statements Len Brown
2007-04-29 4:50 ` Len Brown
2007-04-29 4:50 ` Len Brown [this message]
2007-04-29 4:50 ` [PATCH 054/105] ACPI: thinkpad-acpi: uncouple subdriver init from ibms struct Len Brown
2007-04-29 4:50 ` [PATCH 055/105] ACPI: thinkpad-acpi: improve thinkpad detection Len Brown
2007-04-29 4:50 ` Len Brown
2007-04-29 4:50 ` [PATCH 056/105] ACPI: thinkpad-acpi: use bitfields to hold subdriver flags Len Brown
2007-04-29 4:50 ` Len Brown
2007-04-29 4:50 ` [PATCH 057/105] ACPI: thinkpad-acpi: use bitfields for module flags Len Brown
2007-04-29 4:50 ` Len Brown
2007-04-29 4:50 ` [PATCH 058/105] ACPI: thinkpad-acpi: prepare for device model conversion Len Brown
2007-04-29 4:50 ` Len Brown
2007-04-29 4:50 ` [PATCH 059/105] ACPI: thinkpad-acpi: mark acpi helper functions __must_check Len Brown
2007-04-29 4:50 ` Len Brown
2007-04-29 4:51 ` [PATCH 060/105] ACPI: thinkpad-acpi: clean up hotkey subdriver Len Brown
2007-04-29 4:51 ` Len Brown
2007-04-29 4:51 ` [PATCH 061/105] ACPI: thinkpad-acpi: cleanup bluetooth and wan for sysfs conversion Len Brown
2007-04-29 4:51 ` Len Brown
2007-04-29 4:51 ` [PATCH 062/105] ACPI: thinkpad-acpi: cleanup video subdriver Len Brown
2007-04-29 4:51 ` Len Brown
2007-04-29 4:51 ` [PATCH 063/105] ACPI: thinkpad-acpi: clean up CMOS commands subdriver Len Brown
2007-04-29 4:51 ` Len Brown
2007-04-29 4:51 ` [PATCH 064/105] ACPI: thinkpad-acpi: cleanup thermal subdriver for sysfs conversion Len Brown
2007-04-29 4:51 ` Len Brown
2007-04-29 4:51 ` [PATCH 065/105] ACPI: thinkpad-acpi: improve fan watchdog messages Len Brown
2007-04-29 4:51 ` Len Brown
2007-04-29 4:51 ` [PATCH 066/105] ACPI: Disable MSI on request of FADT Len Brown
2007-04-29 4:51 ` Len Brown
2007-04-29 4:51 ` [PATCH 067/105] ACPI: Improve acpi debug documentation Len Brown
2007-04-29 4:51 ` Len Brown
2007-04-29 4:51 ` [PATCH 068/105] ACPI: thinkpad-acpi: register with the device model Len Brown
2007-04-29 4:51 ` Len Brown
2007-04-29 4:51 ` [PATCH 069/105] ACPI: thinkpad-acpi: driver sysfs conversion Len Brown
2007-04-29 4:51 ` Len Brown
2007-04-29 4:51 ` [PATCH 070/105] ACPI: thinkpad-acpi: add infrastructure for the sysfs device attributes Len Brown
2007-04-29 4:51 ` Len Brown
2007-04-29 4:51 ` [PATCH 071/105] ACPI: thinkpad-acpi: protect fan and hotkey data structures Len Brown
2007-04-29 4:51 ` Len Brown
2007-04-29 4:51 ` [PATCH 072/105] ACPI: thinkpad-acpi: add sysfs support to the thermal subdriver Len Brown
2007-04-29 4:51 ` Len Brown
2007-04-29 4:51 ` [PATCH 073/105] ACPI: thinkpad-acpi: add sysfs support to fan subdriver Len Brown
2007-04-29 4:51 ` Len Brown
2007-04-29 4:51 ` [PATCH 074/105] ACPI: thinkpad-acpi: add a safety net for TPEC fan control mode Len Brown
2007-04-29 4:51 ` Len Brown
2007-04-29 4:51 ` [PATCH 075/105] ACPI: thinkpad-acpi: add sysfs support to the cmos command subdriver Len Brown
2007-04-29 4:51 ` Len Brown
2007-04-29 4:51 ` [PATCH 076/105] ACPI: thinkpad-acpi: update brightness sysfs interface support Len Brown
2007-04-29 4:51 ` Len Brown
2007-04-29 4:51 ` [PATCH 077/105] ACPI: remove duplicate include Len Brown
2007-04-29 4:51 ` Len Brown
2007-04-29 4:51 ` [PATCH 078/105] ACPI: Remove duplicate definitions for _STA bits Len Brown
2007-04-29 4:51 ` Len Brown
2007-04-29 4:51 ` [PATCH 079/105] ACPI: use _STA bit names rather than 0x0F Len Brown
2007-04-29 4:51 ` Len Brown
2007-04-29 4:51 ` [PATCH 080/105] ACPI: correct pathname in comment Len Brown
2007-04-29 4:51 ` Len Brown
2007-04-29 4:51 ` [PATCH 081/105] ACPI: word-smith kconfig help Len Brown
2007-04-29 4:51 ` Len Brown
2007-04-29 4:51 ` [PATCH 082/105] ACPI: make /proc/acpi/wakeup more useful Len Brown
2007-04-29 4:51 ` Len Brown
2007-04-29 4:51 ` [PATCH 083/105] ACPI: prevent ACPI quirk warning mass spamming in logs Len Brown
2007-04-29 4:51 ` Len Brown
2007-04-29 9:58 ` Andi Kleen
2007-04-29 4:51 ` [PATCH 084/105] ACPI: Remove a warning about unused variable in !CONFIG_ACPI compilation Len Brown
2007-04-29 4:51 ` Len Brown
2007-04-29 9:59 ` Andi Kleen
2007-04-29 4:51 ` [PATCH 085/105] ACPICA: clear fields reserved before FADT r3 Len Brown
2007-04-29 4:51 ` Len Brown
2007-04-29 4:51 ` [PATCH 086/105] ACPI: thinkpad-acpi: add a fan-control feature master toggle Len Brown
2007-04-29 4:51 ` Len Brown
2007-04-29 4:51 ` [PATCH 087/105] ACPI: thinkpad-acpi: do not arm fan watchdog if it would not work Len Brown
2007-04-29 4:51 ` Len Brown
2007-04-29 4:51 ` [PATCH 088/105] ACPI: thinkpad-acpi: fix a fan watchdog invocation Len Brown
2007-04-29 4:51 ` Len Brown
2007-04-29 4:51 ` [PATCH 089/105] ACPI: thinkpad-acpi: map ENXIO to EINVAL for fan sysfs Len Brown
2007-04-29 4:51 ` Len Brown
2007-04-29 4:51 ` [PATCH 090/105] ACPI: thinkpad-acpi: improve fan control documentation Len Brown
2007-04-29 4:51 ` Len Brown
2007-04-29 4:51 ` [PATCH 091/105] ACPI: thinkpad-acpi: improve debugging for acpi helpers Len Brown
2007-04-29 4:51 ` Len Brown
2007-04-29 4:51 ` [PATCH 092/105] ACPI: thinkpad-acpi: improve dock subdriver initialization Len Brown
2007-04-29 4:51 ` Len Brown
2007-04-29 4:51 ` [PATCH 093/105] ACPI: thinkpad-acpi: add sysfs support to hotkey subdriver Len Brown
2007-04-29 4:51 ` Len Brown
2007-04-29 4:51 ` [PATCH 094/105] ACPI: thinkpad-acpi: add sysfs support to wan and bluetooth subdrivers Len Brown
2007-04-29 4:51 ` Len Brown
2007-04-29 4:51 ` [PATCH 095/105] thinkpad-acpi: make drivers/misc/thinkpad_acpi:fan_mutex static Len Brown
2007-04-29 4:51 ` Len Brown
[not found] ` <11778223931192-git-send-email-len.brown@intel.com>
[not found] ` <11778223942367-git-send-email-len.brown@intel.com>
[not found] ` <11778223942377-git-send-email-len.brown@intel.com>
[not found] ` <1177822395384-git-send-email-len.brown@intel.com>
[not found] ` <11778223963095-git-send-email-len.brown@intel.com>
[not found] ` <11778223972558-git-send-email-len.brown@intel.com>
[not found] ` <11778223981263-git-send-email-len.brown@intel.com>
[not found] ` <117782239917-git-send-email-len.brown@intel.com>
2007-04-29 4:51 ` [PATCH 105/105] sonypi: use mutex instead of semaphore Len Brown
2007-04-29 4:51 ` Len Brown
2007-05-01 2:19 ` ACPI patches for 2.6.22 merge window Mattia Dongili
2007-05-10 6:44 ` Len Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=11778223551720-git-send-email-len.brown@intel.com \
--to=len.brown@intel.com \
--cc=hmh@debian.org \
--cc=hmh@hmh.eng.br \
--cc=linux-acpi@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.