[RFC] [PATCH] BMP085 update

From: Datta, Shubhrajyoti
Date: Tue Jun 22 2010 - 05:16:50 EST


Updates for the BMP085 pressure sensor
- Optimizing the wait time for the pressure sensor
- Definition of long is arch dependent so making it u32.

Signed-off-by: Shubhrajyoti D <shubhrajyoti@xxxxxx>
---
drivers/misc/bmp085.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/misc/bmp085.c b/drivers/misc/bmp085.c
index 16a2b2c..8af6f1b 100644
--- a/drivers/misc/bmp085.c
+++ b/drivers/misc/bmp085.c
@@ -60,7 +60,7 @@ struct bmp085_data {
u32 raw_temperature;
u32 raw_pressure;
unsigned char oversampling_setting;
- unsigned long last_temp_measurement;
+ u32 last_temp_measurement;
s32 b6; /* calculated temperature correction coefficient */
};

@@ -144,7 +144,7 @@ static s32 bmp085_update_raw_pressure(struct bmp085_data *data)
}

/* wait for the end of conversion */
- msleep(2+(3 << data->oversampling_setting<<1));
+ msleep(2+(3 << data->oversampling_setting ));

/* copy data into a u32 (4 bytes), but skip the first byte. */
status = i2c_smbus_read_i2c_block_data(data->client,
--
1.5.4.7

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/