Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 249257
b: refs/heads/master
c: 7dd04eb
h: refs/heads/master
i:
  249255: 6d3c3c7
v: v3
  • Loading branch information
Michael Hennerich authored and Greg Kroah-Hartman committed May 3, 2011
1 parent ddf4cc5 commit fc61f2e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8ffc4e72131eb0103abf2be382b56f4fac0123c8
refs/heads/master: 7dd04eb04e0cf6593ff8ee30e9a4a403c1256834
10 changes: 5 additions & 5 deletions trunk/drivers/staging/iio/gyro/adxrs450_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ static int adxrs450_spi_write_reg_16(struct device *dev,
* @dev: device associated with child of actual iio_dev
* @val: somewhere to pass back the value read
**/
static int adxrs450_spi_sensor_data(struct device *dev, u16 *val)
static int adxrs450_spi_sensor_data(struct device *dev, s16 *val)
{
struct spi_message msg;
struct iio_dev *indio_dev = dev_get_drvdata(dev);
Expand Down Expand Up @@ -217,15 +217,15 @@ static ssize_t adxrs450_read_temp(struct device *dev,
&t);
if (ret)
return ret;
return sprintf(buf, "%d\n", t);
return sprintf(buf, "%d\n", t >> 7);
}

static ssize_t adxrs450_read_quad(struct device *dev,
struct device_attribute *attr,
char *buf)
{
int ret;
u16 t;
s16 t;
ret = adxrs450_spi_read_reg_16(dev,
ADXRS450_QUAD1,
&t);
Expand All @@ -247,7 +247,7 @@ static ssize_t adxrs450_write_dnc(struct device *dev,
goto error_ret;
ret = adxrs450_spi_write_reg_16(dev,
ADXRS450_DNC1,
val);
val & 0x3FF);
error_ret:
return ret ? ret : len;
}
Expand All @@ -257,7 +257,7 @@ static ssize_t adxrs450_read_sensor_data(struct device *dev,
char *buf)
{
int ret;
u16 t;
s16 t;

ret = adxrs450_spi_sensor_data(dev, &t);
if (ret)
Expand Down

0 comments on commit fc61f2e

Please sign in to comment.