aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc/lis3lv02d
diff options
context:
space:
mode:
authorAnilKumar Ch <anilkumar@ti.com>2012-09-26 16:58:21 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-09-26 17:18:11 -0400
commit0c83adba6b117264eb1972d2787dd17874214e9b (patch)
treec52772e4d578d45e33dc9be239fa6511de1d8839 /drivers/misc/lis3lv02d
parent4bcdea86f176e96d44531c1e54a1b5c92672424d (diff)
drivers/misc/lis3lv02d: remove lis3lv02d driver DT init
Remove lis3lv02d driver device tree initialization from core driver and move it to individual drivers. With the current implementation some pdata parameters are missing if we use lis3lv02d_init_device() in lis3lv02d_i2c driver. Signed-off-by: AnilKumar Ch <anilkumar@ti.com> Cc: Eric Piel <eric.piel@tremplin-utc.net> Reviewed-by: Arnd Bergmann <arnd@arndb.de> Cc: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: Tony Lindgren <tony@atomide.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/lis3lv02d')
-rw-r--r--drivers/misc/lis3lv02d/lis3lv02d.c8
-rw-r--r--drivers/misc/lis3lv02d/lis3lv02d.h1
2 files changed, 3 insertions, 6 deletions
diff --git a/drivers/misc/lis3lv02d/lis3lv02d.c b/drivers/misc/lis3lv02d/lis3lv02d.c
index 6877f1179875..4a87e5c0a320 100644
--- a/drivers/misc/lis3lv02d/lis3lv02d.c
+++ b/drivers/misc/lis3lv02d/lis3lv02d.c
@@ -945,7 +945,7 @@ static void lis3lv02d_8b_configure(struct lis3lv02d *lis3,
945} 945}
946 946
947#ifdef CONFIG_OF 947#ifdef CONFIG_OF
948static int lis3lv02d_init_dt(struct lis3lv02d *lis3) 948int lis3lv02d_init_dt(struct lis3lv02d *lis3)
949{ 949{
950 struct lis3lv02d_platform_data *pdata; 950 struct lis3lv02d_platform_data *pdata;
951 struct device_node *np = lis3->of_node; 951 struct device_node *np = lis3->of_node;
@@ -1085,7 +1085,7 @@ static int lis3lv02d_init_dt(struct lis3lv02d *lis3)
1085} 1085}
1086 1086
1087#else 1087#else
1088static int lis3lv02d_init_dt(struct lis3lv02d *lis3) 1088int lis3lv02d_init_dt(struct lis3lv02d *lis3)
1089{ 1089{
1090 return 0; 1090 return 0;
1091} 1091}
@@ -1102,10 +1102,6 @@ int lis3lv02d_init_device(struct lis3lv02d *lis3)
1102 irq_handler_t thread_fn; 1102 irq_handler_t thread_fn;
1103 int irq_flags = 0; 1103 int irq_flags = 0;
1104 1104
1105 err = lis3lv02d_init_dt(lis3);
1106 if (err < 0)
1107 return err;
1108
1109 lis3->whoami = lis3lv02d_read_8(lis3, WHO_AM_I); 1105 lis3->whoami = lis3lv02d_read_8(lis3, WHO_AM_I);
1110 1106
1111 switch (lis3->whoami) { 1107 switch (lis3->whoami) {
diff --git a/drivers/misc/lis3lv02d/lis3lv02d.h b/drivers/misc/lis3lv02d/lis3lv02d.h
index 2e0700baa584..c439c827eea8 100644
--- a/drivers/misc/lis3lv02d/lis3lv02d.h
+++ b/drivers/misc/lis3lv02d/lis3lv02d.h
@@ -326,5 +326,6 @@ void lis3lv02d_joystick_disable(struct lis3lv02d *lis3);
326void lis3lv02d_poweroff(struct lis3lv02d *lis3); 326void lis3lv02d_poweroff(struct lis3lv02d *lis3);
327int lis3lv02d_poweron(struct lis3lv02d *lis3); 327int lis3lv02d_poweron(struct lis3lv02d *lis3);
328int lis3lv02d_remove_fs(struct lis3lv02d *lis3); 328int lis3lv02d_remove_fs(struct lis3lv02d *lis3);
329int lis3lv02d_init_dt(struct lis3lv02d *lis3);
329 330
330extern struct lis3lv02d lis3_dev; 331extern struct lis3lv02d lis3_dev;