diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2020-07-11 10:19:02 +0300 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2020-07-11 10:19:02 +0300 |
| commit | 5bcd5d0f01856cc59a60bac82114b1efb12b240e (patch) | |
| tree | f9df4d0e536f3caf53e284f34e1cabf0b10ed8b0 /hid-tmt300rs.c | |
| parent | 5d36ec5af3db0402a5c8e46d3f489c9e328f421c (diff) | |
| download | hid-tmff2-5bcd5d0f01856cc59a60bac82114b1efb12b240e.tar.gz hid-tmff2-5bcd5d0f01856cc59a60bac82114b1efb12b240e.zip | |
updated README and fixed range_show
Diffstat (limited to 'hid-tmt300rs.c')
| -rw-r--r-- | hid-tmt300rs.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/hid-tmt300rs.c b/hid-tmt300rs.c index 5415fa6..8287042 100644 --- a/hid-tmt300rs.c +++ b/hid-tmt300rs.c @@ -662,10 +662,11 @@ static ssize_t t300rs_range_show(struct device *dev, struct device_attribute *at char *buf){ struct hid_device *hdev = to_hid_device(dev); struct t300rs_device_entry *t300rs; + size_t count; t300rs = t300rs_get_device(hdev); - - return t300rs->range; + count = scnprintf(buf, PAGE_SIZE, "%u\n", t300rs->range); + return count; } static DEVICE_ATTR(range, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH, t300rs_range_show, t300rs_range_store); |
