Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 281237
b: refs/heads/master
c: a7f7c36
h: refs/heads/master
i:
  281235: 108ecfa
v: v3
  • Loading branch information
Jonathan Cameron authored and Greg Kroah-Hartman committed Dec 8, 2011
1 parent de01e99 commit 0f3a817
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 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: 014fcb1db5d8fd1dde1e3b777389edcd8d85a2e2
refs/heads/master: a7f7c364e8db9510a41f4074035454779e159dd9
18 changes: 15 additions & 3 deletions trunk/drivers/staging/iio/Documentation/iio_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,17 @@ inline int iioutils_get_type(unsigned *is_signed,
ret = -errno;
goto error_free_filename;
}
fscanf(sysfsfp,
"%c%u/%u>>%u", &signchar, bits_used,
&padint, shift);

ret = fscanf(sysfsfp,
"%ce:%c%u/%u>>%u",
&endianchar,
&signchar,
bits_used,
&padint, shift);
if (ret < 0) {
printf("failed to pass scan type description\n");
return ret;
}
*bytes = padint / 8;
if (*bits_used == 64)
*mask = ~0;
Expand All @@ -157,6 +165,10 @@ inline int iioutils_get_type(unsigned *is_signed,
*is_signed = 1;
else
*is_signed = 0;
fclose(sysfsfp);
free(filename);

filename = 0;
}
error_free_filename:
if (filename)
Expand Down

0 comments on commit 0f3a817

Please sign in to comment.