diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-05-12 11:24:07 +0000 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-05-12 11:24:07 +0000 |
commit | 68afa52d9809eae342ae42338b0b004ea71257a2 (patch) | |
tree | 0eaf3124ca87713e63e48564c8ba443c516915b6 | |
parent | 240e6d86113de5254985ae8f151581df10b65a8f (diff) | |
download | mediapointer-dvb-s2-68afa52d9809eae342ae42338b0b004ea71257a2.tar.gz mediapointer-dvb-s2-68afa52d9809eae342ae42338b0b004ea71257a2.tar.bz2 |
Siano: smsusb - handle byte ordering and big endianity
From: Uri Shkolnik <uris@siano-ms.com>
This patch adds support for byte ordering and big endianity
handling for the USB interface driver
Priority: normal
Signed-off-by: Uri Shkolnik <uris@siano-ms.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r-- | linux/drivers/media/dvb/siano/smsusb.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/linux/drivers/media/dvb/siano/smsusb.c b/linux/drivers/media/dvb/siano/smsusb.c index fab73ca39..17332a09a 100644 --- a/linux/drivers/media/dvb/siano/smsusb.c +++ b/linux/drivers/media/dvb/siano/smsusb.c @@ -26,6 +26,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "smscoreapi.h" #include "sms-cards.h" +#include "smsendian.h" static int sms_dbg; module_param_named(debug, sms_dbg, int, 0644); @@ -180,6 +181,7 @@ static int smsusb_sendrequest(void *context, void *buffer, size_t size) struct smsusb_device_t *dev = (struct smsusb_device_t *) context; int dummy; + smsendian_handle_message_header((struct SmsMsgHdr_ST *)buffer); return usb_bulk_msg(dev->udev, usb_sndbulkpipe(dev->udev, 2), buffer, size, &dummy, 1000); } @@ -337,8 +339,8 @@ static int smsusb_init_device(struct usb_interface *intf, int board_id) case SMS_VEGA: dev->buffer_size = USB2_BUFFER_SIZE; dev->response_alignment = - dev->udev->ep_in[1]->desc.wMaxPacketSize - - sizeof(struct SmsMsgHdr_ST); + le16_to_cpu(dev->udev->ep_in[1]->desc.wMaxPacketSize) - + sizeof(struct SmsMsgHdr_ST); params.flags |= SMS_DEVICE_FAMILY2; break; |