summaryrefslogtreecommitdiffstats
path: root/drivers/input
diff options
context:
space:
mode:
authorRichard Röjfors <richard.rojfors.ext@mocean-labs.com>2009-07-25 08:14:17 +0200
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2009-07-26 20:21:00 +0200
commitcad065fd1e95003444e8528f801f52164cb78561 (patch)
tree23d596c58ac6ac94b0890d26fe1fdce304974e48 /drivers/input
parentInput: tsc2007 - properly shut off interrupts/delayed work (diff)
downloadlinux-cad065fd1e95003444e8528f801f52164cb78561.tar.xz
linux-cad065fd1e95003444e8528f801f52164cb78561.zip
Input: tsc2007 - make init/exit platform hw callbacks optional
Make init_platform_hw and exit_platform_hw callbacks optional since they are not needed on all platforms. Signed-off-by: Richard Röjfors <richard.rojfors.ext@mocean-labs.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input')
-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,
input_set_abs_params(input_dev, ABS_Y, 0, MAX_12BIT, 0, 0);
input_set_abs_params(input_dev, ABS_PRESSURE, 0, MAX_12BIT, 0, 0);
- pdata->init_platform_hw();
+ if (pdata->init_platform_hw)
+ pdata->init_platform_hw();
err = request_irq(ts->irq, tsc2007_irq, 0,
client->dev.driver->name, ts);
@@ -316,7 +317,8 @@ static int __devinit tsc2007_probe(struct i2c_client *client,
err_free_irq:
tsc2007_free_irq(ts);
- pdata->exit_platform_hw();
+ if (pdata->exit_platform_hw)
+ pdata->exit_platform_hw();
err_free_mem:
input_free_device(input_dev);
kfree(ts);
@@ -330,7 +332,8 @@ static int __devexit tsc2007_remove(struct i2c_client *client)
tsc2007_free_irq(ts);
- pdata->exit_platform_hw();
+ if (pdata->exit_platform_hw)
+ pdata->exit_platform_hw();
input_unregister_device(ts->input);
kfree(ts);