@@ -324,7 +324,6 @@ struct mxt_data {
char phys[64]; /* device physical location */
struct mxt_object *object_table;
struct mxt_info *info;
- void *raw_info_block;
unsigned int irq;
unsigned int max_x;
unsigned int max_y;
@@ -2053,9 +2052,8 @@ static void mxt_free_object_table(struct mxt_data *data)
v4l2_device_unregister(&data->dbg.v4l2);
#endif
data->object_table = NULL;
+ kfree(data->info);
data->info = NULL;
- kfree(data->raw_info_block);
- data->raw_info_block = NULL;
kfree(data->msg_buf);
data->msg_buf = NULL;
data->T5_address = 0;
@@ -2224,7 +2222,7 @@ static int mxt_read_info_block(struct mxt_data *data)
u8 *crc_ptr;
/* If info block already allocated, free it */
- if (data->raw_info_block)
+ if (data->info)
mxt_free_object_table(data);
/* Read 7-byte ID information block starting at address 0 */
@@ -2275,7 +2273,6 @@ static int mxt_read_info_block(struct mxt_data *data)
goto err_free_mem;
}
- data->raw_info_block = id_buf;
data->info = (struct mxt_info *)id_buf;
dev_info(&client->dev,