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>
This commit is contained in:
Richard Röjfors 2009-07-24 23:14:17 -07:00 коммит произвёл Dmitry Torokhov
Родитель 141586bc57
Коммит cad065fd1e
1 изменённых файлов: 6 добавлений и 3 удалений

Просмотреть файл

@ -295,6 +295,7 @@ 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);
if (pdata->init_platform_hw)
pdata->init_platform_hw();
err = request_irq(ts->irq, tsc2007_irq, 0,
@ -316,6 +317,7 @@ static int __devinit tsc2007_probe(struct i2c_client *client,
err_free_irq:
tsc2007_free_irq(ts);
if (pdata->exit_platform_hw)
pdata->exit_platform_hw();
err_free_mem:
input_free_device(input_dev);
@ -330,6 +332,7 @@ static int __devexit tsc2007_remove(struct i2c_client *client)
tsc2007_free_irq(ts);
if (pdata->exit_platform_hw)
pdata->exit_platform_hw();
input_unregister_device(ts->input);