Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 150031
b: refs/heads/master
c: 0456b4f
h: refs/heads/master
i:
  150029: e708388
  150027: dff4426
  150023: 2c6dc90
  150015: 0aeba74
v: v3
  • Loading branch information
Simon Arlott authored and David S. Miller committed Apr 27, 2009
1 parent 09650a0 commit 7b9eb1c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 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: 15b8e19131486856373592e45793a79aefb6fbe7
refs/heads/master: 0456b4f8b742006c2b79fcbe6b0736aa1ad39180
10 changes: 8 additions & 2 deletions trunk/drivers/usb/atm/cxacru.c
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,14 @@ static ssize_t cxacru_sysfs_showattr_s8(s8 value, char *buf)

static ssize_t cxacru_sysfs_showattr_dB(s16 value, char *buf)
{
return snprintf(buf, PAGE_SIZE, "%d.%02u\n",
value / 100, abs(value) % 100);
if (likely(value >= 0)) {
return snprintf(buf, PAGE_SIZE, "%u.%02u\n",
value / 100, value % 100);
} else {
value = -value;
return snprintf(buf, PAGE_SIZE, "-%u.%02u\n",
value / 100, value % 100);
}
}

static ssize_t cxacru_sysfs_showattr_bool(u32 value, char *buf)
Expand Down

0 comments on commit 7b9eb1c

Please sign in to comment.