aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/input/touchscreen/tsc2007.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/input/touchscreen/tsc2007.c b/drivers/input/touchscreen/tsc2007.c
index 75fbd753a4d2..8105bf640151 100644
--- a/drivers/input/touchscreen/tsc2007.c
+++ b/drivers/input/touchscreen/tsc2007.c
@@ -295,7 +295,8 @@ static int __devinit tsc2007_probe(struct i2c_client *client,
295 input_set_abs_params(input_dev, ABS_Y, 0, MAX_12BIT, 0, 0); 295 input_set_abs_params(input_dev, ABS_Y, 0, MAX_12BIT, 0, 0);
296 input_set_abs_params(input_dev, ABS_PRESSURE, 0, MAX_12BIT, 0, 0); 296 input_set_abs_params(input_dev, ABS_PRESSURE, 0, MAX_12BIT, 0, 0);
297 297
298 pdata->init_platform_hw(); 298 if (pdata->init_platform_hw)
299 pdata->init_platform_hw();
299 300
300 err = request_irq(ts->irq, tsc2007_irq, 0, 301 err = request_irq(ts->irq, tsc2007_irq, 0,
301 client->dev.driver->name, ts); 302 client->dev.driver->name, ts);
@@ -316,7 +317,8 @@ static int __devinit tsc2007_probe(struct i2c_client *client,
316 317
317 err_free_irq: 318 err_free_irq:
318 tsc2007_free_irq(ts); 319 tsc2007_free_irq(ts);
319 pdata->exit_platform_hw(); 320 if (pdata->exit_platform_hw)
321 pdata->exit_platform_hw();
320 err_free_mem: 322 err_free_mem:
321 input_free_device(input_dev); 323 input_free_device(input_dev);
322 kfree(ts); 324 kfree(ts);
@@ -330,7 +332,8 @@ static int __devexit tsc2007_remove(struct i2c_client *client)
330 332
331 tsc2007_free_irq(ts); 333 tsc2007_free_irq(ts);
332 334
333 pdata->exit_platform_hw(); 335 if (pdata->exit_platform_hw)
336 pdata->exit_platform_hw();
334 337
335 input_unregister_device(ts->input); 338 input_unregister_device(ts->input);
336 kfree(ts); 339 kfree(ts);