diff options
author | Takashi Iwai <tiwai@suse.de> | 2010-10-01 23:14:25 +0200 |
---|---|---|
committer | Guenter Roeck <guenter.roeck@ericsson.com> | 2010-10-25 23:11:20 +0200 |
commit | 2ee321440e3a594dcdd9981e68e5e302447047a2 (patch) | |
tree | c2dde23d160339ff713f9fd12f7922cca0c8c6d3 /drivers/hwmon/lis3lv02d_spi.c | |
parent | hwmon: (hp_accel) Add HP Mini 510x family support (diff) | |
download | linux-2ee321440e3a594dcdd9981e68e5e302447047a2.tar.xz linux-2ee321440e3a594dcdd9981e68e5e302447047a2.zip |
hwmon: (lis3) add axes module parameter for custom axis-mapping
The axis-mapping of lis3dev device on many (rather most) HP machines
doesn't follow the standard. When each new model appears, users need to
adjust again. Testing this requires the rebuild of kernel, thus it's not
trivial for end-users.
This patch adds a module parameter "axes" to allow a custom axis-mapping
without patching and recompiling the kernel driver. User can pass the
parameter such as axes=3,2,1. Also it can be changed via sysfs.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Acked-by: Eric Piel <eric.piel@tremplin-utc.net>
Cc: Jean Delvare <khali@linux-fr.org>
Cc: Guenter Roeck <guenter.roeck@ericsson.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Diffstat (limited to '')
-rw-r--r-- | drivers/hwmon/lis3lv02d_spi.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/hwmon/lis3lv02d_spi.c b/drivers/hwmon/lis3lv02d_spi.c index b9be5e3a22b3..955544b1c71e 100644 --- a/drivers/hwmon/lis3lv02d_spi.c +++ b/drivers/hwmon/lis3lv02d_spi.c @@ -54,7 +54,8 @@ static int lis3_spi_init(struct lis3lv02d *lis3) return lis3->write(lis3, CTRL_REG1, reg); } -static struct axis_conversion lis3lv02d_axis_normal = { 1, 2, 3 }; +static union axis_conversion lis3lv02d_axis_normal = + { .as_array = { 1, 2, 3 } }; static int __devinit lis302dl_spi_probe(struct spi_device *spi) { |