diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2011-12-01 02:44:30 -0500 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2011-12-12 03:02:27 -0500 |
commit | ec20861260824a1be53d24c05636529d45a4e228 (patch) | |
tree | 28ae84aadfda9dd86b22dd3ad2b103f28b842b7e /drivers/input/touchscreen | |
parent | 468792eb1e9fb2de855a1978c1228c55d9ed2753 (diff) |
Input: migor-ts - use proper client data accessor functions
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/touchscreen')
-rw-r--r-- | drivers/input/touchscreen/migor_ts.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/input/touchscreen/migor_ts.c b/drivers/input/touchscreen/migor_ts.c index af746b793378..704169f16c7d 100644 --- a/drivers/input/touchscreen/migor_ts.c +++ b/drivers/input/touchscreen/migor_ts.c | |||
@@ -143,8 +143,6 @@ static int migor_ts_probe(struct i2c_client *client, | |||
143 | goto err0; | 143 | goto err0; |
144 | } | 144 | } |
145 | 145 | ||
146 | dev_set_drvdata(&client->dev, priv); | ||
147 | |||
148 | input = input_allocate_device(); | 146 | input = input_allocate_device(); |
149 | if (!input) { | 147 | if (!input) { |
150 | dev_err(&client->dev, "Failed to allocate input device.\n"); | 148 | dev_err(&client->dev, "Failed to allocate input device.\n"); |
@@ -183,6 +181,7 @@ static int migor_ts_probe(struct i2c_client *client, | |||
183 | goto err2; | 181 | goto err2; |
184 | } | 182 | } |
185 | 183 | ||
184 | i2c_set_clientdata(client, priv); | ||
186 | device_init_wakeup(&client->dev, 1); | 185 | device_init_wakeup(&client->dev, 1); |
187 | return 0; | 186 | return 0; |
188 | 187 | ||
@@ -199,7 +198,7 @@ static int migor_ts_probe(struct i2c_client *client, | |||
199 | 198 | ||
200 | static int migor_ts_remove(struct i2c_client *client) | 199 | static int migor_ts_remove(struct i2c_client *client) |
201 | { | 200 | { |
202 | struct migor_ts_priv *priv = dev_get_drvdata(&client->dev); | 201 | struct migor_ts_priv *priv = i2c_get_clientdata(client); |
203 | 202 | ||
204 | free_irq(priv->irq, priv); | 203 | free_irq(priv->irq, priv); |
205 | input_unregister_device(priv->input); | 204 | input_unregister_device(priv->input); |
@@ -213,7 +212,7 @@ static int migor_ts_remove(struct i2c_client *client) | |||
213 | static int migor_ts_suspend(struct device *dev) | 212 | static int migor_ts_suspend(struct device *dev) |
214 | { | 213 | { |
215 | struct i2c_client *client = to_i2c_client(dev); | 214 | struct i2c_client *client = to_i2c_client(dev); |
216 | struct migor_ts_priv *priv = dev_get_drvdata(&client->dev); | 215 | struct migor_ts_priv *priv = i2c_get_clientdata(client); |
217 | 216 | ||
218 | if (device_may_wakeup(&client->dev)) | 217 | if (device_may_wakeup(&client->dev)) |
219 | enable_irq_wake(priv->irq); | 218 | enable_irq_wake(priv->irq); |
@@ -224,7 +223,7 @@ static int migor_ts_suspend(struct device *dev) | |||
224 | static int migor_ts_resume(struct device *dev) | 223 | static int migor_ts_resume(struct device *dev) |
225 | { | 224 | { |
226 | struct i2c_client *client = to_i2c_client(dev); | 225 | struct i2c_client *client = to_i2c_client(dev); |
227 | struct migor_ts_priv *priv = dev_get_drvdata(&client->dev); | 226 | struct migor_ts_priv *priv = i2c_get_clientdata(client); |
228 | 227 | ||
229 | if (device_may_wakeup(&client->dev)) | 228 | if (device_may_wakeup(&client->dev)) |
230 | disable_irq_wake(priv->irq); | 229 | disable_irq_wake(priv->irq); |