diff --git a/drivers/input/sensors/gyro/ewtsa.c b/drivers/input/sensors/gyro/ewtsa.c index 4756ed24c0a7..0a8534eb24a1 100644 --- a/drivers/input/sensors/gyro/ewtsa.c +++ b/drivers/input/sensors/gyro/ewtsa.c @@ -383,7 +383,7 @@ static int sensor_report_value(struct i2c_client *client) z = (short) (((buffer[4]) << 8) | buffer[5]); //printk("%s: x=%d y=%d z=%d \n",__func__, x,y,z); - if(pdata && pdata->orientation) + if (pdata) { axis.x = (pdata->orientation[0])*x + (pdata->orientation[1])*y + (pdata->orientation[2])*z; axis.y = (pdata->orientation[3])*x + (pdata->orientation[4])*y + (pdata->orientation[5])*z; diff --git a/drivers/input/sensors/gyro/l3g20d.c b/drivers/input/sensors/gyro/l3g20d.c index 300acd3f28ca..ffa3b71f1938 100644 --- a/drivers/input/sensors/gyro/l3g20d.c +++ b/drivers/input/sensors/gyro/l3g20d.c @@ -172,7 +172,7 @@ static int sensor_report_value(struct i2c_client *client) z = (short) (((buffer[5]) << 8) | buffer[4]); DBG("%s: x=%d y=%d z=%d \n",__func__, x,y,z); - if(pdata && pdata->orientation) + if (pdata) { axis.x = (pdata->orientation[0])*x + (pdata->orientation[1])*y + (pdata->orientation[2])*z; axis.y = (pdata->orientation[3])*x + (pdata->orientation[4])*y + (pdata->orientation[5])*z; diff --git a/drivers/input/sensors/gyro/l3g4200d.c b/drivers/input/sensors/gyro/l3g4200d.c index 508c907b1905..4f236acd7118 100644 --- a/drivers/input/sensors/gyro/l3g4200d.c +++ b/drivers/input/sensors/gyro/l3g4200d.c @@ -172,7 +172,7 @@ static int sensor_report_value(struct i2c_client *client) z = (short) (((buffer[5]) << 8) | buffer[4]); DBG("%s: x=%d y=%d z=%d \n",__func__, x,y,z); - if(pdata && pdata->orientation) + if (pdata) { axis.x = (pdata->orientation[0])*x + (pdata->orientation[1])*y + (pdata->orientation[2])*z; axis.y = (pdata->orientation[3])*x + (pdata->orientation[4])*y + (pdata->orientation[5])*z;