summaryrefslogtreecommitdiffstats
path: root/drivers/input/touchscreen
diff options
context:
space:
mode:
authorIiro Valkonen <iiro.valkonen@atmel.com>2011-02-15 13:36:52 -0800
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2011-02-21 01:02:34 -0800
commit919ed895f0b4227da26ea1b0a1347db5010f105e (patch)
treeeb81c0ee83be2171b831412460258027884c2a02 /drivers/input/touchscreen
parent71749f5c66e797a39600dae9de58aab3858dc488 (diff)
Input: atmel_mxt_ts - allow board code to specify IRQ flags
Different board have different requirements/setups so let's be more flexible. Signed-off-by: Iiro Valkonen <iiro.valkonen@atmel.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/touchscreen')
-rw-r--r--drivers/input/touchscreen/atmel_mxt_ts.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c
index 52032ef3d3a..d2e5864ca09 100644
--- a/drivers/input/touchscreen/atmel_mxt_ts.c
+++ b/drivers/input/touchscreen/atmel_mxt_ts.c
@@ -1106,11 +1106,12 @@ static void mxt_input_close(struct input_dev *dev)
static int __devinit mxt_probe(struct i2c_client *client,
const struct i2c_device_id *id)
{
+ const struct mxt_platform_data *pdata = client->dev.platform_data;
struct mxt_data *data;
struct input_dev *input_dev;
int error;
- if (!client->dev.platform_data)
+ if (!pdata)
return -EINVAL;
data = kzalloc(sizeof(struct mxt_data), GFP_KERNEL);
@@ -1149,7 +1150,7 @@ static int __devinit mxt_probe(struct i2c_client *client,
data->client = client;
data->input_dev = input_dev;
- data->pdata = client->dev.platform_data;
+ data->pdata = pdata;
data->irq = client->irq;
i2c_set_clientdata(client, data);
@@ -1159,7 +1160,7 @@ static int __devinit mxt_probe(struct i2c_client *client,
goto err_free_object;
error = request_threaded_irq(client->irq, NULL, mxt_interrupt,
- IRQF_TRIGGER_FALLING, client->dev.driver->name, data);
+ pdata->irqflags, client->dev.driver->name, data);
if (error) {
dev_err(&client->dev, "Failed to register interrupt\n");
goto err_free_object;