input: touchscreen: vtl_ts: fix compilation warning
author黄涛 <huangtao@rock-chips.com>
Mon, 16 Jun 2014 13:11:58 +0000 (21:11 +0800)
committer黄涛 <huangtao@rock-chips.com>
Mon, 16 Jun 2014 13:11:58 +0000 (21:11 +0800)
drivers/input/touchscreen/vtl_ts/chip.c
drivers/input/touchscreen/vtl_ts/vtl_ts.c

index c21f0678597fa240b288e29834121fab62cf2ed2..a1087d18b8f724d5a0054db20bc4a03967c15333 100755 (executable)
@@ -253,7 +253,7 @@ int chip_function(enum cmd_index cmd_index,unsigned char *rx_buf,unsigned char l
 }
 
 /***************flash********************/
-
+#if 0
 static int chip_flash_init(struct i2c_client *client)
 {
        unsigned char buf[2];
@@ -267,6 +267,7 @@ static int chip_flash_init(struct i2c_client *client)
        
        return ret;
 }
+#endif
 
 static int chip_read_bus_status(struct i2c_client *client,unsigned char *rx_buf)
 {
@@ -446,7 +447,9 @@ int chip_get_fwchksum(struct i2c_client *client,int *fwchksum)
 static int chip_write_flash(struct i2c_client *client)
 {
        unsigned char buf[14];
+#if 0
        unsigned char bus_status[1];
+#endif
        int sec,cod,sec_8byte_num;
        int flash_addr;
        int ret = 0;
index 6b9305e4223b4e3cfd5a7762d2750ca2e254c958..84e7c55a7ec972dfd618f52f67e8d24386f9e92a 100755 (executable)
@@ -84,17 +84,15 @@ static struct i2c_board_info i2c_info[] = {
 \r
 static int vtl_ts_config(struct ts_info *ts)\r
 {\r
-       struct device *dev;\r
+       struct device *dev = &ts->driver->client->dev;\r
        //struct ts_config_info *ts_config_info;        \r
        int err;\r
-       \r
-       DEBUG();\r
-       dev = &ts->driver->client->dev;\r
-       \r
        struct device_node *np = dev->of_node;\r
        enum of_gpio_flags rst_flags;\r
        unsigned long irq_flags;\r
        int val;\r
+\r
+       DEBUG();\r
        /* ts config */\r
        ts->config_info.touch_point_number = TOUCH_POINT_NUM;\r
        if(dev->platform_data !=NULL)\r
@@ -146,6 +144,7 @@ struct ts_info      * vtl_ts_get_object(void)
        \r
        return pg_ts;\r
 }\r
+#if 0\r
 static void vtl_ts_free_gpio(void)\r
 {\r
        struct ts_info *ts;\r
@@ -154,6 +153,7 @@ static void vtl_ts_free_gpio(void)
        \r
        gpio_free(ts->config_info.rst_gpio_number);     \r
 }\r
+#endif\r
 \r
 void vtl_ts_hw_reset(void)\r
 {\r
@@ -230,7 +230,6 @@ static int vtl_ts_read_xy_data(struct ts_info *ts)
 \r
 static void vtl_ts_report_xy_coord(struct ts_info *ts)\r
 {\r
-       int i;\r
        int id;\r
        int sync;\r
        int x, y;\r
@@ -365,7 +364,7 @@ int vtl_ts_resume(struct i2c_client *client)
        return 0;\r
 }\r
 \r
-static void vtl_ts_early_suspend(struct early_suspend *handler)\r
+static int vtl_ts_early_suspend(struct tp_device *tp)\r
 {\r
        struct ts_info *ts;     \r
        ts =pg_ts;\r
@@ -373,15 +372,19 @@ static void vtl_ts_early_suspend(struct early_suspend *handler)
        DEBUG();\r
 \r
        vtl_ts_suspend(ts->driver->client, PMSG_SUSPEND);\r
+\r
+       return 0;\r
 }\r
 \r
-static void vtl_ts_early_resume(struct early_suspend *handler)\r
+static int vtl_ts_early_resume(struct tp_device *tp)\r
 {\r
        struct ts_info *ts;     \r
        ts =pg_ts;\r
        DEBUG();\r
 \r
        vtl_ts_resume(ts->driver->client);\r
+\r
+       return 0;\r
 }\r
 \r
 int  vtl_ts_remove(struct i2c_client *client)\r
@@ -588,7 +591,7 @@ ERR_IRQ_REQ:
                ts->driver->proc_entry = NULL;\r
        }\r
 \r
-ERR_PROC_ENTRY:\r
+/* ERR_PROC_ENTRY: */\r
        if(ts->driver->input_dev){\r
                input_unregister_device(ts->driver->input_dev);\r
                input_free_device(ts->driver->input_dev);\r
@@ -609,7 +612,6 @@ ERR_TS_CONFIG:
 int vtl_ts_probe(struct i2c_client *client, const struct i2c_device_id *id)\r
 {\r
        int err = -1;\r
-       unsigned char chip_id = 0xff;\r
        struct ts_info *ts;\r
        struct device *dev;\r
 \r