From: 黄涛 Date: Mon, 10 Mar 2014 12:27:32 +0000 (+0800) Subject: input: ts: ct36x: fix init X-Git-Tag: firefly_0821_release~6159 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=80507470b158d1601ffe756a0387bb31f93edb0a;p=firefly-linux-kernel-4.4.55.git input: ts: ct36x: fix init --- diff --git a/drivers/input/touchscreen/ct36x/ct36x_ts.c b/drivers/input/touchscreen/ct36x/ct36x_ts.c index c2c1fb2c3b2e..54671e0e1a74 100644 --- a/drivers/input/touchscreen/ct36x/ct36x_ts.c +++ b/drivers/input/touchscreen/ct36x/ct36x_ts.c @@ -168,12 +168,6 @@ static int ct36x_ts_probe(struct i2c_client *client, const struct i2c_device_id dev_err(&client->dev, "no device tree\n"); return -EINVAL; } - /* - ts = kzalloc(sizeof(struct ct36x_data), GFP_KERNEL); - if(!ts){ - dev_err(&client->dev, "No memory for ct36x"); - return -ENOMEM; - }*/ if (of_property_read_u32(np, "max-x", &val)) { dev_err(&client->dev, "no max-x defined\n"); return -EINVAL; @@ -299,16 +293,13 @@ static int ct36x_ts_probe(struct i2c_client *client, const struct i2c_device_id return 0; err_request_threaded_irq: //unregister_early_suspend(&ts->early_suspend); - input_unregister_device(ts->input); err_input_register_devcie: - input_free_device(ts->input); err_input_allocate_device: if(ts->ops->deinit) ts->ops->deinit(ts); err_ct36x_init_chip: err_ct36x_set_ops: i2c_set_clientdata(client, NULL); - kfree(ts); return ret; } @@ -316,14 +307,10 @@ static int ct36x_ts_remove(struct i2c_client *client) { struct ct36x_data *ts = i2c_get_clientdata(client); - free_irq(ts->irq, ts); if(ts->ops->deinit) ts->ops->deinit(ts); //unregister_early_suspend(&ts->early_suspend); - input_unregister_device(ts->input); - input_free_device(ts->input); i2c_set_clientdata(client, NULL); - kfree(ts); return 0; }