aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorHenk <Henk.Vergonet@gmail.com>2005-08-17 04:40:26 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2005-09-08 19:40:57 -0400
commitb71e318cdb1dc301d734fdd4983dfc6dc167235a (patch)
tree225958f7e2fd766e9834a07e33ad7b8727081ca5 /drivers/usb
parentd5ae36dd439549305f00a755556f49c9fa7bb237 (diff)
[PATCH] USB: yealink: fix htons usage, documentation updates
Signed-off-by: Henk Vergonet <henk.vergonet@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/input/yealink.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/usb/input/yealink.c b/drivers/usb/input/yealink.c
index e2dd274c6134..58a176ef96a5 100644
--- a/drivers/usb/input/yealink.c
+++ b/drivers/usb/input/yealink.c
@@ -318,7 +318,7 @@ static int yealink_set_ringtone(struct yealink_dev *yld, u8 *buf, size_t size)
318 if (len > sizeof(p->data)) 318 if (len > sizeof(p->data))
319 len = sizeof(p->data); 319 len = sizeof(p->data);
320 p->size = len; 320 p->size = len;
321 p->offset = htons(ix); 321 p->offset = cpu_to_be16(ix);
322 memcpy(p->data, &buf[ix], len); 322 memcpy(p->data, &buf[ix], len);
323 yealink_cmd(yld, p); 323 yealink_cmd(yld, p);
324 ix += len; 324 ix += len;
@@ -383,7 +383,7 @@ send_update:
383 val--; 383 val--;
384 val &= 0x1f; 384 val &= 0x1f;
385 yld->ctl_data->cmd = CMD_SCANCODE; 385 yld->ctl_data->cmd = CMD_SCANCODE;
386 yld->ctl_data->offset = htons(val); 386 yld->ctl_data->offset = cpu_to_be16(val);
387 yld->ctl_data->data[0] = 0; 387 yld->ctl_data->data[0] = 0;
388 yld->ctl_data->sum = -1 - CMD_SCANCODE - val; 388 yld->ctl_data->sum = -1 - CMD_SCANCODE - val;
389 break; 389 break;
@@ -395,7 +395,7 @@ send_update:
395 /* Combine up to <len> consecutive LCD bytes in a singe request 395 /* Combine up to <len> consecutive LCD bytes in a singe request
396 */ 396 */
397 yld->ctl_data->cmd = CMD_LCD; 397 yld->ctl_data->cmd = CMD_LCD;
398 yld->ctl_data->offset = htons(ix); 398 yld->ctl_data->offset = cpu_to_be16(ix);
399 yld->ctl_data->size = len; 399 yld->ctl_data->size = len;
400 yld->ctl_data->sum = -CMD_LCD - ix - val - len; 400 yld->ctl_data->sum = -CMD_LCD - ix - val - len;
401 for(i=1; i<len; i++) { 401 for(i=1; i<len; i++) {