diff options
author | Paul Mackerras <paulus@samba.org> | 2009-04-22 05:02:09 +0200 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2009-04-22 05:02:09 +0200 |
commit | 5bd3ef84d73c2ea7b4babbad060909753c4828d4 (patch) | |
tree | fdf2bafb48ae1ed03175f6c77a7548a181e69ee9 /drivers/media/video/pvrusb2/pvrusb2-sysfs.c | |
parent | powerpc/85xx: Remove defconfigs that mpc85xx_{smp_}defconfig cover (diff) | |
parent | powerpc: Fix of_node_put() exit path in of_irq_map_one() (diff) | |
download | linux-5bd3ef84d73c2ea7b4babbad060909753c4828d4.tar.xz linux-5bd3ef84d73c2ea7b4babbad060909753c4828d4.zip |
Merge branch 'merge' of git://git.secretlab.ca/git/linux-2.6 into merge
Diffstat (limited to 'drivers/media/video/pvrusb2/pvrusb2-sysfs.c')
-rw-r--r-- | drivers/media/video/pvrusb2/pvrusb2-sysfs.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/media/video/pvrusb2/pvrusb2-sysfs.c b/drivers/media/video/pvrusb2/pvrusb2-sysfs.c index e20ba1e6e0ea..299c1cbc3832 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-sysfs.c +++ b/drivers/media/video/pvrusb2/pvrusb2-sysfs.c @@ -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, |