From 23c3c4535d8bf201d861a1a4d3fa21d1b54f2c63 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Lothar=20Wa=C3=9Fmann?= Date: Fri, 24 May 2013 14:21:59 +0200 Subject: [PATCH] 0023-tsc2007-double-hw-init =================================================================== --- drivers/input/touchscreen/tsc2007.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/input/touchscreen/tsc2007.c b/drivers/input/touchscreen/tsc2007.c index da7432726c99..b945a2488eb8 100644 --- a/drivers/input/touchscreen/tsc2007.c +++ b/drivers/input/touchscreen/tsc2007.c @@ -300,7 +300,11 @@ static int __devinit tsc2007_probe(struct i2c_client *client, ts->get_pendown_state = pdata->get_pendown_state; ts->clear_penirq = pdata->clear_penirq; - pdata->init_platform_hw(); + if (pdata->init_platform_hw) { + err = pdata->init_platform_hw(); + if (err) + goto err_no_dev; + } if (tsc2007_xfer(ts, PWRDOWN) < 0) { err = -ENODEV; @@ -322,9 +326,6 @@ static int __devinit tsc2007_probe(struct i2c_client *client, input_set_abs_params(input_dev, ABS_PRESSURE, 0, MAX_12BIT, pdata->fuzzz, 0); - if (pdata->init_platform_hw) - pdata->init_platform_hw(); - err = request_irq(ts->irq, tsc2007_irq, 0, client->dev.driver->name, ts); if (err < 0) { -- 2.39.2