diff options
Diffstat (limited to 'drivers/isdn/mISDN/dsp_pipeline.c')
-rw-r--r-- | drivers/isdn/mISDN/dsp_pipeline.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/isdn/mISDN/dsp_pipeline.c b/drivers/isdn/mISDN/dsp_pipeline.c index ac61f198eb32..e9941678edfa 100644 --- a/drivers/isdn/mISDN/dsp_pipeline.c +++ b/drivers/isdn/mISDN/dsp_pipeline.c | |||
@@ -55,20 +55,19 @@ static ssize_t | |||
55 | attr_show_args(struct device *dev, struct device_attribute *attr, char *buf) | 55 | attr_show_args(struct device *dev, struct device_attribute *attr, char *buf) |
56 | { | 56 | { |
57 | struct mISDN_dsp_element *elem = dev_get_drvdata(dev); | 57 | struct mISDN_dsp_element *elem = dev_get_drvdata(dev); |
58 | ssize_t len = 0; | 58 | int i; |
59 | int i = 0; | 59 | char *p = buf; |
60 | 60 | ||
61 | *buf = 0; | 61 | *buf = 0; |
62 | for (; i < elem->num_args; ++i) | 62 | for (i = 0; i < elem->num_args; i++) |
63 | len = sprintf(buf, "%sName: %s\n%s%s%sDescription: %s\n" | 63 | p += sprintf(p, "Name: %s\n%s%s%sDescription: %s\n\n", |
64 | "\n", buf, | ||
65 | elem->args[i].name, | 64 | elem->args[i].name, |
66 | elem->args[i].def ? "Default: " : "", | 65 | elem->args[i].def ? "Default: " : "", |
67 | elem->args[i].def ? elem->args[i].def : "", | 66 | elem->args[i].def ? elem->args[i].def : "", |
68 | elem->args[i].def ? "\n" : "", | 67 | elem->args[i].def ? "\n" : "", |
69 | elem->args[i].desc); | 68 | elem->args[i].desc); |
70 | 69 | ||
71 | return len; | 70 | return p - buf; |
72 | } | 71 | } |
73 | 72 | ||
74 | static struct device_attribute element_attributes[] = { | 73 | static struct device_attribute element_attributes[] = { |