@@ -16,8 +16,8 @@ obj-$(CONFIG_TOUCHSCREEN_ATMEL_TSADCC) += atmel_tsadcc.o
obj-$(CONFIG_TOUCHSCREEN_BITSY) += h3600_ts_input.o
obj-$(CONFIG_TOUCHSCREEN_BU21013) += bu21013_ts.o
obj-$(CONFIG_TOUCHSCREEN_CY8CTMG110) += cy8ctmg110_ts.o
-obj-$(CONFIG_TOUCHSCREEN_CYTTSP_CORE) += cyttsp_core.o
-obj-$(CONFIG_TOUCHSCREEN_CYTTSP_I2C) += cyttsp_i2c.o
+obj-$(CONFIG_TOUCHSCREEN_CYTTSP_CORE) += cyttsp_core.o
+obj-$(CONFIG_TOUCHSCREEN_CYTTSP_I2C) += cyttsp_i2c.o
obj-$(CONFIG_TOUCHSCREEN_DA9034) += da9034-ts.o
obj-$(CONFIG_TOUCHSCREEN_DYNAPRO) += dynapro.o
obj-$(CONFIG_TOUCHSCREEN_HAMPSHIRE) += hampshire.o
old mode 100644
new mode 100755
@@ -87,17 +87,15 @@ static int __devinit cyttsp_i2c_probe(struct i2c_client *client,
const struct i2c_device_id *id)
{
struct cyttsp_i2c *ts;
- int retval;
if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C))
return -EIO;
/* allocate and clear memory */
ts = kzalloc(sizeof(*ts), GFP_KERNEL);
- if (ts == NULL) {
+ if (!ts) {
dev_dbg(&client->dev, "%s: Error, kzalloc.\n", __func__);
- retval = -ENOMEM;
- goto error_alloc_data_failed;
+ return -ENOMEM;
}
/* register driver_data */
@@ -109,18 +107,16 @@ static int __devinit cyttsp_i2c_probe(struct i2c_client *client,
ts->ops.dev = &client->dev;
ts->ops.dev->bus = &i2c_bus_type;
- retval = cyttsp_core_init(&ts->ops, &client->dev, &ts->ttsp_client);
- if (retval)
- goto ttsp_core_err;
+ ts->ttsp_client = cyttsp_core_init(&ts->ops, &client->dev);
+ if (IS_ERR(ts->ttsp_client)) {
+ int retval = PTR_ERR(ts->ttsp_client);
+ kfree(ts);
+ return retval;
+ }
dev_dbg(ts->ops.dev, "%s: Registration complete\n", __func__);
return 0;
-
-ttsp_core_err:
- kfree(ts);
-error_alloc_data_failed:
- return retval;
}