]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - drivers/input/touchscreen/tsc2007.c
Input: tsc2007 - do not leave dangling clientdata pointer
[net-next-2.6.git] / drivers / input / touchscreen / tsc2007.c
index 7ef0d1420d3c917f48d4dd41013d4d4a6f7665f5..769b479fcaa625fb4406096dd84746b89cc877e4 100644 (file)
@@ -347,6 +347,8 @@ static int __devexit tsc2007_remove(struct i2c_client *client)
        struct tsc2007  *ts = i2c_get_clientdata(client);
        struct tsc2007_platform_data *pdata = client->dev.platform_data;
 
+       i2c_set_clientdata(client, NULL);
+
        tsc2007_free_irq(ts);
 
        if (pdata->exit_platform_hw)
@@ -358,7 +360,7 @@ static int __devexit tsc2007_remove(struct i2c_client *client)
        return 0;
 }
 
-static struct i2c_device_id tsc2007_idtable[] = {
+static const struct i2c_device_id tsc2007_idtable[] = {
        { "tsc2007", 0 },
        { }
 };