diff options
author | Daniel Mack <daniel@caiaq.de> | 2009-03-31 18:24:32 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-04-01 11:59:22 -0400 |
commit | a38da2ed74f628c1f3e907c772be21a66eccab9c (patch) | |
tree | e89697d25518dcca9861d6f65933fc3327cd5933 /drivers/hwmon/lis3lv02d.h | |
parent | ab337a632783c251a3c3852aec0ead8a0281cbdd (diff) |
lis3: solve dependency between core and ACPI
This solves the dependency between lis3lv02d.[ch] and ACPI specific
methods. It introduces a ->bus_priv pointer to the device struct which is
casted to 'struct acpi_device' in the ACIP layer. Changed hp_accel.c
accordingly.
Signed-off-by: Daniel Mack <daniel@caiaq.de>
Acked-by: Pavel Machek <pavel@ucw.cz>
Acked-by: Eric Piel <eric.piel@tremplin-utc.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/hwmon/lis3lv02d.h')
-rw-r--r-- | drivers/hwmon/lis3lv02d.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/hwmon/lis3lv02d.h b/drivers/hwmon/lis3lv02d.h index 017fb2b754d5..745ec96806d4 100644 --- a/drivers/hwmon/lis3lv02d.h +++ b/drivers/hwmon/lis3lv02d.h | |||
@@ -159,14 +159,14 @@ struct axis_conversion { | |||
159 | s8 z; | 159 | s8 z; |
160 | }; | 160 | }; |
161 | 161 | ||
162 | struct acpi_lis3lv02d { | 162 | struct lis3lv02d { |
163 | struct acpi_device *device; /* The ACPI device */ | 163 | void *bus_priv; /* used by the bus layer only */ |
164 | acpi_status (*init) (acpi_handle handle); | 164 | int (*init) (struct lis3lv02d *lis3); |
165 | acpi_status (*write) (acpi_handle handle, int reg, u8 val); | 165 | int (*write) (struct lis3lv02d *lis3, int reg, u8 val); |
166 | acpi_status (*read) (acpi_handle handle, int reg, u8 *ret); | 166 | int (*read) (struct lis3lv02d *lis3, int reg, u8 *ret); |
167 | 167 | ||
168 | u8 whoami; /* 3Ah: 2-byte registries, 3Bh: 1-byte registries */ | 168 | u8 whoami; /* 3Ah: 2-byte registries, 3Bh: 1-byte registries */ |
169 | s16 (*read_data) (acpi_handle handle, int reg); | 169 | s16 (*read_data) (struct lis3lv02d *lis3, int reg); |
170 | int mdps_max_val; | 170 | int mdps_max_val; |
171 | 171 | ||
172 | struct input_dev *idev; /* input device */ | 172 | struct input_dev *idev; /* input device */ |
@@ -187,11 +187,11 @@ struct acpi_lis3lv02d { | |||
187 | unsigned long misc_opened; /* bit0: whether the device is open */ | 187 | unsigned long misc_opened; /* bit0: whether the device is open */ |
188 | }; | 188 | }; |
189 | 189 | ||
190 | int lis3lv02d_init_device(struct acpi_lis3lv02d *dev); | 190 | int lis3lv02d_init_device(struct lis3lv02d *lis3); |
191 | int lis3lv02d_joystick_enable(void); | 191 | int lis3lv02d_joystick_enable(void); |
192 | void lis3lv02d_joystick_disable(void); | 192 | void lis3lv02d_joystick_disable(void); |
193 | void lis3lv02d_poweroff(acpi_handle handle); | 193 | void lis3lv02d_poweroff(struct lis3lv02d *lis3); |
194 | void lis3lv02d_poweron(acpi_handle handle); | 194 | void lis3lv02d_poweron(struct lis3lv02d *lis3); |
195 | int lis3lv02d_remove_fs(void); | 195 | int lis3lv02d_remove_fs(void); |
196 | 196 | ||
197 | extern struct acpi_lis3lv02d lis3_dev; | 197 | extern struct lis3lv02d lis3_dev; |