Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 282397
b: refs/heads/master
c: ec20861
h: refs/heads/master
i:
  282395: 4eec1f5
v: v3
  • Loading branch information
Dmitry Torokhov committed Dec 12, 2011
1 parent ac89c13 commit cef21eb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 468792eb1e9fb2de855a1978c1228c55d9ed2753
refs/heads/master: ec20861260824a1be53d24c05636529d45a4e228
9 changes: 4 additions & 5 deletions trunk/drivers/input/touchscreen/migor_ts.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down Expand Up @@ -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;

Expand All @@ -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);
Expand All @@ -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);
Expand All @@ -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);
Expand Down

0 comments on commit cef21eb

Please sign in to comment.