diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2011-11-30 23:44:30 -0800 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2011-12-12 00:02:27 -0800 |
commit | ec20861260824a1be53d24c05636529d45a4e228 (patch) | |
tree | 28ae84aadfda9dd86b22dd3ad2b103f28b842b7e /drivers/input/touchscreen/migor_ts.c | |
parent | 468792eb1e9fb2de855a1978c1228c55d9ed2753 (diff) | |
download | op-kernel-dev-ec20861260824a1be53d24c05636529d45a4e228.zip op-kernel-dev-ec20861260824a1be53d24c05636529d45a4e228.tar.gz |
Input: migor-ts - use proper client data accessor functions
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/touchscreen/migor_ts.c')
-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 af746b7..704169f 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, goto err0; } - dev_set_drvdata(&client->dev, priv); - input = input_allocate_device(); if (!input) { dev_err(&client->dev, "Failed to allocate input device.\n"); @@ -183,6 +181,7 @@ static int migor_ts_probe(struct i2c_client *client, goto err2; } + i2c_set_clientdata(client, priv); device_init_wakeup(&client->dev, 1); return 0; @@ -199,7 +198,7 @@ static int migor_ts_probe(struct i2c_client *client, static int migor_ts_remove(struct i2c_client *client) { - struct migor_ts_priv *priv = dev_get_drvdata(&client->dev); + struct migor_ts_priv *priv = i2c_get_clientdata(client); free_irq(priv->irq, priv); input_unregister_device(priv->input); @@ -213,7 +212,7 @@ static int migor_ts_remove(struct i2c_client *client) static int migor_ts_suspend(struct device *dev) { struct i2c_client *client = to_i2c_client(dev); - struct migor_ts_priv *priv = dev_get_drvdata(&client->dev); + struct migor_ts_priv *priv = i2c_get_clientdata(client); if (device_may_wakeup(&client->dev)) enable_irq_wake(priv->irq); @@ -224,7 +223,7 @@ static int migor_ts_suspend(struct device *dev) static int migor_ts_resume(struct device *dev) { struct i2c_client *client = to_i2c_client(dev); - struct migor_ts_priv *priv = dev_get_drvdata(&client->dev); + struct migor_ts_priv *priv = i2c_get_clientdata(client); if (device_may_wakeup(&client->dev)) disable_irq_wake(priv->irq); |