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>
This commit is contained in:
parent
4bcdea86f1
commit
0c83adba6b
|
@ -945,7 +945,7 @@ static void lis3lv02d_8b_configure(struct lis3lv02d *lis3,
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_OF
|
#ifdef CONFIG_OF
|
||||||
static int lis3lv02d_init_dt(struct lis3lv02d *lis3)
|
int lis3lv02d_init_dt(struct lis3lv02d *lis3)
|
||||||
{
|
{
|
||||||
struct lis3lv02d_platform_data *pdata;
|
struct lis3lv02d_platform_data *pdata;
|
||||||
struct device_node *np = lis3->of_node;
|
struct device_node *np = lis3->of_node;
|
||||||
|
@ -1085,7 +1085,7 @@ static int lis3lv02d_init_dt(struct lis3lv02d *lis3)
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
static int lis3lv02d_init_dt(struct lis3lv02d *lis3)
|
int lis3lv02d_init_dt(struct lis3lv02d *lis3)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1102,10 +1102,6 @@ int lis3lv02d_init_device(struct lis3lv02d *lis3)
|
||||||
irq_handler_t thread_fn;
|
irq_handler_t thread_fn;
|
||||||
int irq_flags = 0;
|
int irq_flags = 0;
|
||||||
|
|
||||||
err = lis3lv02d_init_dt(lis3);
|
|
||||||
if (err < 0)
|
|
||||||
return err;
|
|
||||||
|
|
||||||
lis3->whoami = lis3lv02d_read_8(lis3, WHO_AM_I);
|
lis3->whoami = lis3lv02d_read_8(lis3, WHO_AM_I);
|
||||||
|
|
||||||
switch (lis3->whoami) {
|
switch (lis3->whoami) {
|
||||||
|
|
|
@ -326,5 +326,6 @@ void lis3lv02d_joystick_disable(struct lis3lv02d *lis3);
|
||||||
void lis3lv02d_poweroff(struct lis3lv02d *lis3);
|
void lis3lv02d_poweroff(struct lis3lv02d *lis3);
|
||||||
int lis3lv02d_poweron(struct lis3lv02d *lis3);
|
int lis3lv02d_poweron(struct lis3lv02d *lis3);
|
||||||
int lis3lv02d_remove_fs(struct lis3lv02d *lis3);
|
int lis3lv02d_remove_fs(struct lis3lv02d *lis3);
|
||||||
|
int lis3lv02d_init_dt(struct lis3lv02d *lis3);
|
||||||
|
|
||||||
extern struct lis3lv02d lis3_dev;
|
extern struct lis3lv02d lis3_dev;
|
||||||
|
|
Loading…
Reference in New Issue