diff options
author | Henrique de Moraes Holschuh <hmh@hmh.eng.br> | 2007-04-21 11:08:37 -0300 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2007-04-21 23:30:34 -0400 |
commit | 8d376cd6543d57ef10799be02ba5f19aa6678032 (patch) | |
tree | 0e140fc7d4a6dc0cd78b12e4481f37098b44cecd /drivers/misc/thinkpad_acpi.h | |
parent | d8fd94d9f08237ffda7e44e6825b057bf20a90e3 (diff) |
ACPI: thinkpad-acpi: prepare for device model conversion
Prepare the thinkpad-acpi driver for the conversion to the device
model, by renaming variables and doing other glue work that shall
make the later patches much cleaner.
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.h | 40 |
1 files changed, 24 insertions, 16 deletions
diff --git a/drivers/misc/thinkpad_acpi.h b/drivers/misc/thinkpad_acpi.h index 4d3ab4015ff..529528c2fb5 100644 --- a/drivers/misc/thinkpad_acpi.h +++ b/drivers/misc/thinkpad_acpi.h @@ -52,8 +52,9 @@ #define IBM_DESC "ThinkPad ACPI Extras" #define IBM_FILE "thinkpad_acpi" #define IBM_URL "http://ibm-acpi.sf.net/" +#define IBM_MAIL "ibm-acpi-devel@lists.sourceforge.net" -#define IBM_DIR "ibm" +#define IBM_PROC_DIR "ibm" #define IBM_ACPI_EVENT_PREFIX "ibm" #define IBM_LOG IBM_FILE ": " @@ -108,20 +109,21 @@ static acpi_handle ec_handle; /* EC */ static acpi_handle ecrd_handle, ecwr_handle; /* 570 EC access */ static acpi_handle cmos_handle, hkey_handle; /* basic thinkpad handles */ -static void ibm_handle_init(char *name, +static void drv_acpi_handle_init(char *name, acpi_handle *handle, acpi_handle parent, char **paths, int num_paths, char **path); -#define IBM_HANDLE_INIT(object) \ - ibm_handle_init(#object, &object##_handle, *object##_parent, \ +#define IBM_ACPIHANDLE_INIT(object) \ + drv_acpi_handle_init(#object, &object##_handle, *object##_parent, \ object##_paths, ARRAY_SIZE(object##_paths), &object##_path) /* procfs support */ static struct proc_dir_entry *proc_dir; /* procfs helpers */ -static int dispatch_read(char *page, char **start, off_t off, int count, - int *eof, void *data); -static int dispatch_write(struct file *file, const char __user * userbuf, +static int dispatch_procfs_read(char *page, char **start, off_t off, + int count, int *eof, void *data); +static int dispatch_procfs_write(struct file *file, + const char __user * userbuf, unsigned long count, void *data); static char *next_cmd(char **cmds); @@ -140,28 +142,34 @@ static void thinkpad_acpi_module_exit(void); * Subdrivers */ -struct ibm_struct { - char *name; +struct ibm_struct; +struct tp_acpi_drv_struct { char *hid; struct acpi_driver *driver; - int (*read) (char *); - int (*write) (char *); - void (*exit) (void); - void (*notify) (struct ibm_struct *, u32); acpi_handle *handle; - int type; + u32 type; struct acpi_device *device; +}; + +struct ibm_struct { + char *name; + + int (*read) (char *); + int (*write) (char *); + void (*exit) (void); struct list_head all_drivers; + struct tp_acpi_drv_struct *acpi; + struct { - u8 driver_registered:1; + u8 acpi_driver_registered:1; + u8 acpi_notify_installed:1; u8 proc_created:1; u8 init_called:1; - u8 notify_installed:1; u8 experimental:1; } flags; }; |