diff options
| author | Takashi Iwai <tiwai@suse.de> | 2012-09-15 02:24:42 -0400 |
|---|---|---|
| committer | Takashi Iwai <tiwai@suse.de> | 2012-09-15 02:24:42 -0400 |
| commit | 5d037f9064a8f3b9abbe383cdfb35e159d813711 (patch) | |
| tree | 2a2445271ee818c360c42408a324d2945a6dd9f7 /drivers/input/touchscreen/eeti_ts.c | |
| parent | 64f1e00d8edb54f5d25fb0114a46050fb8340df4 (diff) | |
| parent | 985b11fa8064d55d0d5a84e68667434598911bb2 (diff) | |
Merge tag 'asoc-3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Updates for 3.6
A bigger set of updates than I'm entirely comfortable with - things
backed up a bit due to travel. As ever the majority of these are small,
focused updates for specific drivers though there are a couple of core
changes. There's been good exposure in -next.
The AT91 patch fixes a build break.
Diffstat (limited to 'drivers/input/touchscreen/eeti_ts.c')
| -rw-r--r-- | drivers/input/touchscreen/eeti_ts.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/drivers/input/touchscreen/eeti_ts.c b/drivers/input/touchscreen/eeti_ts.c index 503c7096ed36..908407efc672 100644 --- a/drivers/input/touchscreen/eeti_ts.c +++ b/drivers/input/touchscreen/eeti_ts.c | |||
| @@ -48,7 +48,7 @@ struct eeti_ts_priv { | |||
| 48 | struct input_dev *input; | 48 | struct input_dev *input; |
| 49 | struct work_struct work; | 49 | struct work_struct work; |
| 50 | struct mutex mutex; | 50 | struct mutex mutex; |
| 51 | int irq, irq_active_high; | 51 | int irq_gpio, irq, irq_active_high; |
| 52 | }; | 52 | }; |
| 53 | 53 | ||
| 54 | #define EETI_TS_BITDEPTH (11) | 54 | #define EETI_TS_BITDEPTH (11) |
| @@ -62,7 +62,7 @@ struct eeti_ts_priv { | |||
| 62 | 62 | ||
| 63 | static inline int eeti_ts_irq_active(struct eeti_ts_priv *priv) | 63 | static inline int eeti_ts_irq_active(struct eeti_ts_priv *priv) |
| 64 | { | 64 | { |
| 65 | return gpio_get_value(irq_to_gpio(priv->irq)) == priv->irq_active_high; | 65 | return gpio_get_value(priv->irq_gpio) == priv->irq_active_high; |
| 66 | } | 66 | } |
| 67 | 67 | ||
| 68 | static void eeti_ts_read(struct work_struct *work) | 68 | static void eeti_ts_read(struct work_struct *work) |
| @@ -157,7 +157,7 @@ static void eeti_ts_close(struct input_dev *dev) | |||
| 157 | static int __devinit eeti_ts_probe(struct i2c_client *client, | 157 | static int __devinit eeti_ts_probe(struct i2c_client *client, |
| 158 | const struct i2c_device_id *idp) | 158 | const struct i2c_device_id *idp) |
| 159 | { | 159 | { |
| 160 | struct eeti_ts_platform_data *pdata; | 160 | struct eeti_ts_platform_data *pdata = client->dev.platform_data; |
| 161 | struct eeti_ts_priv *priv; | 161 | struct eeti_ts_priv *priv; |
| 162 | struct input_dev *input; | 162 | struct input_dev *input; |
| 163 | unsigned int irq_flags; | 163 | unsigned int irq_flags; |
| @@ -199,9 +199,12 @@ static int __devinit eeti_ts_probe(struct i2c_client *client, | |||
| 199 | 199 | ||
| 200 | priv->client = client; | 200 | priv->client = client; |
| 201 | priv->input = input; | 201 | priv->input = input; |
| 202 | priv->irq = client->irq; | 202 | priv->irq_gpio = pdata->irq_gpio; |
| 203 | priv->irq = gpio_to_irq(pdata->irq_gpio); | ||
| 203 | 204 | ||
| 204 | pdata = client->dev.platform_data; | 205 | err = gpio_request_one(pdata->irq_gpio, GPIOF_IN, client->name); |
| 206 | if (err < 0) | ||
| 207 | goto err1; | ||
| 205 | 208 | ||
| 206 | if (pdata) | 209 | if (pdata) |
| 207 | priv->irq_active_high = pdata->irq_active_high; | 210 | priv->irq_active_high = pdata->irq_active_high; |
| @@ -215,13 +218,13 @@ static int __devinit eeti_ts_probe(struct i2c_client *client, | |||
| 215 | 218 | ||
| 216 | err = input_register_device(input); | 219 | err = input_register_device(input); |
| 217 | if (err) | 220 | if (err) |
| 218 | goto err1; | 221 | goto err2; |
| 219 | 222 | ||
| 220 | err = request_irq(priv->irq, eeti_ts_isr, irq_flags, | 223 | err = request_irq(priv->irq, eeti_ts_isr, irq_flags, |
| 221 | client->name, priv); | 224 | client->name, priv); |
| 222 | if (err) { | 225 | if (err) { |
| 223 | dev_err(&client->dev, "Unable to request touchscreen IRQ.\n"); | 226 | dev_err(&client->dev, "Unable to request touchscreen IRQ.\n"); |
| 224 | goto err2; | 227 | goto err3; |
| 225 | } | 228 | } |
| 226 | 229 | ||
| 227 | /* | 230 | /* |
| @@ -233,9 +236,11 @@ static int __devinit eeti_ts_probe(struct i2c_client *client, | |||
| 233 | device_init_wakeup(&client->dev, 0); | 236 | device_init_wakeup(&client->dev, 0); |
| 234 | return 0; | 237 | return 0; |
| 235 | 238 | ||
| 236 | err2: | 239 | err3: |
| 237 | input_unregister_device(input); | 240 | input_unregister_device(input); |
| 238 | input = NULL; /* so we dont try to free it below */ | 241 | input = NULL; /* so we dont try to free it below */ |
| 242 | err2: | ||
| 243 | gpio_free(pdata->irq_gpio); | ||
| 239 | err1: | 244 | err1: |
| 240 | input_free_device(input); | 245 | input_free_device(input); |
| 241 | kfree(priv); | 246 | kfree(priv); |
