From fe1ae7cd74f185f9727b9f29ddd715963457b8c8 Mon Sep 17 00:00:00 2001 From: luowei Date: Mon, 18 Feb 2013 11:52:49 +0800 Subject: [PATCH] add sensor version info --- drivers/input/sensors/gyro/l3g4200d.c | 2 +- drivers/input/sensors/sensor-dev.c | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/input/sensors/gyro/l3g4200d.c b/drivers/input/sensors/gyro/l3g4200d.c index e1075854e5b8..6d08849fa17d 100755 --- a/drivers/input/sensors/gyro/l3g4200d.c +++ b/drivers/input/sensors/gyro/l3g4200d.c @@ -192,7 +192,7 @@ static int sensor_report_value(struct i2c_client *client) } //filter gyro data - if( ((abs(axis.x) > pdata->x_min) & (abs(axis.x) < 240))||(abs(axis.x) > 260) || ((abs(axis.y) > pdata->y_min)& (abs(axis.y) < 240))||(abs(axis.y) > 260)|| ((abs(axis.z) > pdata->z_min) & (abs(axis.z) < 250)) || (abs(axis.z) > 260) ) + if((abs(axis.x) > pdata->x_min)||(abs(axis.y) > pdata->y_min)||(abs(axis.z) > pdata->z_min)) { gyro_report_value(client, &axis); diff --git a/drivers/input/sensors/sensor-dev.c b/drivers/input/sensors/sensor-dev.c index de9498f2075f..db8438acb637 100755 --- a/drivers/input/sensors/sensor-dev.c +++ b/drivers/input/sensors/sensor-dev.c @@ -43,6 +43,9 @@ #define DBG(x...) #endif +#define SENSOR_VERSION_AND_TIME "sensor-dev.c v1.0 2013-2-18" + + struct sensor_private_data *g_sensor[SENSOR_NUM_TYPES]; static struct sensor_operate *sensor_ops[SENSOR_NUM_ID]; static struct class *g_sensor_class[SENSOR_NUM_TYPES]; @@ -1445,6 +1448,8 @@ static int __init sensor_init(void) pr_info("%s: Probe name %s\n", __func__, sensor_driver.driver.name); if (res) pr_err("%s failed\n", __func__); + + printk("%s\n", SENSOR_VERSION_AND_TIME); return res; } -- 2.34.1