Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 142397
b: refs/heads/master
c: 7bf56f9
h: refs/heads/master
i:
  142395: 83b04c9
v: v3
  • Loading branch information
Mike Isely authored and Mauro Carvalho Chehab committed Apr 7, 2009
1 parent f7fd70b commit a3216c6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 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: 5b72d715250bf238af86d76ac527dff8d99b601d
refs/heads/master: 7bf56f94a15ac0655bfb259ce693ccab011b1363
14 changes: 8 additions & 6 deletions trunk/drivers/media/video/pvrusb2/pvrusb2-sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,14 +153,16 @@ static ssize_t show_def(struct device *class_dev,
struct pvr2_sysfs_ctl_item *cip;
int val;
int ret;
unsigned int cnt = 0;
cip = container_of(attr, struct pvr2_sysfs_ctl_item, attr_def);
ret = pvr2_ctrl_get_def(cip->cptr, &val);
pvr2_sysfs_trace("pvr2_sysfs(%p) show_def(cid=%d) is %d, stat=%d",
cip->chptr, cip->ctl_id, val, ret);
if (ret < 0) {
return ret;
}
return scnprintf(buf, PAGE_SIZE, "%d\n", val);
if (ret < 0) return ret;
ret = pvr2_ctrl_value_to_sym(cip->cptr, ~0, val,
buf, PAGE_SIZE - 1, &cnt);
pvr2_sysfs_trace("pvr2_sysfs(%p) show_def(cid=%d) is %.*s (%d)",
cip->chptr, cip->ctl_id, cnt, buf, val);
buf[cnt] = '\n';
return cnt + 1;
}

static ssize_t show_val_norm(struct device *class_dev,
Expand Down

0 comments on commit a3216c6

Please sign in to comment.