rk292x sitronix: while perform direction_otation ,determine whether pdata is NULL
authorwuhao <wuhao@wuhao@rock-chips.com>
Wed, 14 Nov 2012 01:55:14 +0000 (09:55 +0800)
committerwuhao <wuhao@wuhao@rock-chips.com>
Wed, 14 Nov 2012 01:55:50 +0000 (09:55 +0800)
drivers/input/touchscreen/sitronix_ts_a720.c

index 5ed48608d74dc791accce1f3eafd657be994882c..d0ba590c6d19f39bff24ecdf525ddc1ad761d988 100755 (executable)
@@ -827,7 +827,7 @@ static void sitronix_ts_work_func(struct work_struct *work)
                                input_report_abs(ts->input_dev,  ABS_MT_TRACKING_ID, i);
                                input_report_abs(ts->input_dev,  ABS_MT_TOUCH_MAJOR, 200);
                                
-                               if(pdata->direction_otation)
+                               if( pdata && (pdata->direction_otation) )
                                {
                                      int temp_x , temp_y ;
                                      temp_x = MTDStructure[i].Pixel_X ;