aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/isdn/hisax/hfc_usb.c
diff options
context:
space:
mode:
authorKarsten Keil <kkeil@suse.de>2006-03-06 18:42:41 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-06 21:40:43 -0500
commitb05121b29e8af45ccb424bf71dadc1d04bd23f03 (patch)
tree34355406f3aaf7b08fb6775f6c53c118764da69f /drivers/isdn/hisax/hfc_usb.c
parent7cb9478f0d5b2424af974646dcbe10ce7c19b550 (diff)
[PATCH] i4l: fix compatiblity issue with big endian systems
This patch fix some compatiblity issues with big endian systems Signed-off-by: Martin Bachem <info@colognechip.com> Signed-off-by: Karsten Keil <kkeil@suse.de> Cc: Al Viro <viro@ftp.linux.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/isdn/hisax/hfc_usb.c')
-rw-r--r--drivers/isdn/hisax/hfc_usb.c32
1 files changed, 13 insertions, 19 deletions
diff --git a/drivers/isdn/hisax/hfc_usb.c b/drivers/isdn/hisax/hfc_usb.c
index ca5b4a3b683e..262c44127419 100644
--- a/drivers/isdn/hisax/hfc_usb.c
+++ b/drivers/isdn/hisax/hfc_usb.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * hfc_usb.c 2 * hfc_usb.c
3 * 3 *
4 * $Id: hfc_usb.c,v 4.36 2005/04/08 09:55:13 martinb1 Exp $ 4 * $Id: hfc_usb.c,v 2.3.2.13 2006/02/17 17:17:22 mbachem Exp $
5 * 5 *
6 * modular HiSax ISDN driver for Colognechip HFC-S USB chip 6 * modular HiSax ISDN driver for Colognechip HFC-S USB chip
7 * 7 *
@@ -45,7 +45,7 @@
45#include "hfc_usb.h" 45#include "hfc_usb.h"
46 46
47static const char *hfcusb_revision = 47static const char *hfcusb_revision =
48 "$Revision: 4.36 $ $Date: 2005/04/08 09:55:13 $ "; 48 "$Revision: 2.3.2.13 $ $Date: 2006/02/17 17:17:22 $ ";
49 49
50/* Hisax debug support 50/* Hisax debug support
51* use "modprobe debug=x" where x is bitfield of USB_DBG & ISDN_DBG 51* use "modprobe debug=x" where x is bitfield of USB_DBG & ISDN_DBG
@@ -219,7 +219,7 @@ symbolic(struct hfcusb_symbolic_list list[], const int num)
219 for (i = 0; list[i].name != NULL; i++) 219 for (i = 0; list[i].name != NULL; i++)
220 if (list[i].num == num) 220 if (list[i].num == num)
221 return (list[i].name); 221 return (list[i].name);
222 return "<unkown ERROR>"; 222 return "<unknown ERROR>";
223} 223}
224 224
225 225
@@ -235,9 +235,9 @@ ctrl_start_transfer(hfcusb_data * hfc)
235 hfc->ctrl_urb->transfer_buffer = NULL; 235 hfc->ctrl_urb->transfer_buffer = NULL;
236 hfc->ctrl_urb->transfer_buffer_length = 0; 236 hfc->ctrl_urb->transfer_buffer_length = 0;
237 hfc->ctrl_write.wIndex = 237 hfc->ctrl_write.wIndex =
238 hfc->ctrl_buff[hfc->ctrl_out_idx].hfc_reg; 238 cpu_to_le16(hfc->ctrl_buff[hfc->ctrl_out_idx].hfc_reg);
239 hfc->ctrl_write.wValue = 239 hfc->ctrl_write.wValue =
240 hfc->ctrl_buff[hfc->ctrl_out_idx].reg_val; 240 cpu_to_le16(hfc->ctrl_buff[hfc->ctrl_out_idx].reg_val);
241 241
242 usb_submit_urb(hfc->ctrl_urb, GFP_ATOMIC); /* start transfer */ 242 usb_submit_urb(hfc->ctrl_urb, GFP_ATOMIC); /* start transfer */
243 } 243 }
@@ -1282,7 +1282,7 @@ usb_init(hfcusb_data * hfc)
1282 /* init the background machinery for control requests */ 1282 /* init the background machinery for control requests */
1283 hfc->ctrl_read.bRequestType = 0xc0; 1283 hfc->ctrl_read.bRequestType = 0xc0;
1284 hfc->ctrl_read.bRequest = 1; 1284 hfc->ctrl_read.bRequest = 1;
1285 hfc->ctrl_read.wLength = 1; 1285 hfc->ctrl_read.wLength = cpu_to_le16(1);
1286 hfc->ctrl_write.bRequestType = 0x40; 1286 hfc->ctrl_write.bRequestType = 0x40;
1287 hfc->ctrl_write.bRequest = 0; 1287 hfc->ctrl_write.bRequest = 0;
1288 hfc->ctrl_write.wLength = 0; 1288 hfc->ctrl_write.wLength = 0;
@@ -1373,9 +1373,8 @@ hfc_usb_probe(struct usb_interface *intf, const struct usb_device_id *id)
1373 1373
1374 vend_idx = 0xffff; 1374 vend_idx = 0xffff;
1375 for (i = 0; hfcusb_idtab[i].idVendor; i++) { 1375 for (i = 0; hfcusb_idtab[i].idVendor; i++) {
1376 if (dev->descriptor.idVendor == hfcusb_idtab[i].idVendor 1376 if ((le16_to_cpu(dev->descriptor.idVendor) == hfcusb_idtab[i].idVendor)
1377 && dev->descriptor.idProduct == 1377 && (le16_to_cpu(dev->descriptor.idProduct) == hfcusb_idtab[i].idProduct)) {
1378 hfcusb_idtab[i].idProduct) {
1379 vend_idx = i; 1378 vend_idx = i;
1380 continue; 1379 continue;
1381 } 1380 }
@@ -1516,8 +1515,7 @@ hfc_usb_probe(struct usb_interface *intf, const struct usb_device_id *id)
1516 usb_transfer_mode 1515 usb_transfer_mode
1517 = USB_INT; 1516 = USB_INT;
1518 packet_size = 1517 packet_size =
1519 ep->desc. 1518 le16_to_cpu(ep->desc.wMaxPacketSize);
1520 wMaxPacketSize;
1521 break; 1519 break;
1522 case USB_ENDPOINT_XFER_BULK: 1520 case USB_ENDPOINT_XFER_BULK:
1523 if (ep_addr & 0x80) 1521 if (ep_addr & 0x80)
@@ -1545,8 +1543,7 @@ hfc_usb_probe(struct usb_interface *intf, const struct usb_device_id *id)
1545 usb_transfer_mode 1543 usb_transfer_mode
1546 = USB_BULK; 1544 = USB_BULK;
1547 packet_size = 1545 packet_size =
1548 ep->desc. 1546 le16_to_cpu(ep->desc.wMaxPacketSize);
1549 wMaxPacketSize;
1550 break; 1547 break;
1551 case USB_ENDPOINT_XFER_ISOC: 1548 case USB_ENDPOINT_XFER_ISOC:
1552 if (ep_addr & 0x80) 1549 if (ep_addr & 0x80)
@@ -1574,8 +1571,7 @@ hfc_usb_probe(struct usb_interface *intf, const struct usb_device_id *id)
1574 usb_transfer_mode 1571 usb_transfer_mode
1575 = USB_ISOC; 1572 = USB_ISOC;
1576 iso_packet_size = 1573 iso_packet_size =
1577 ep->desc. 1574 le16_to_cpu(ep->desc.wMaxPacketSize);
1578 wMaxPacketSize;
1579 break; 1575 break;
1580 default: 1576 default:
1581 context-> 1577 context->
@@ -1588,10 +1584,8 @@ hfc_usb_probe(struct usb_interface *intf, const struct usb_device_id *id)
1588 fifonum = cidx; 1584 fifonum = cidx;
1589 context->fifos[cidx].hfc = 1585 context->fifos[cidx].hfc =
1590 context; 1586 context;
1591 context->fifos[cidx]. 1587 context->fifos[cidx].usb_packet_maxlen =
1592 usb_packet_maxlen = 1588 le16_to_cpu(ep->desc.wMaxPacketSize);
1593 ep->desc.
1594 wMaxPacketSize;
1595 context->fifos[cidx]. 1589 context->fifos[cidx].
1596 intervall = 1590 intervall =
1597 ep->desc.bInterval; 1591 ep->desc.bInterval;