#include <linux/gpio_keys.h>
#include <linux/input.h>
#include <linux/gpio.h>
+#include <linux/interrupt.h>
#include <asm/mach/arch.h>
#include <asm/mach/map.h>
.threshold = 0x28,
.voltage = 2800000, /* 2.8V */
.orient = MXT_DIAGONAL,
+ .irqflags = IRQF_TRIGGER_FALLING,
};
static struct s3c2410_platform_i2c i2c2_data __initdata = {
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);
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);
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;