diff options
author | Uri Shkolnik <uris@siano-ms.com> | 2009-05-12 07:24:07 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-06-16 18:14:26 -0400 |
commit | c7ce8d37a738b64cafae07db4de021edf1feaa70 (patch) | |
tree | ac242a47be8864758f79c7c6674d8140a3ba9d2c /drivers | |
parent | 6d4e6972bb9545f968359379aa5adff863aa4d7c (diff) |
V4L/DVB (11777): Siano: smsusb - handle byte ordering and big endianity
This patch adds support for byte ordering and big endianity
handling for the USB interface driver
Signed-off-by: Uri Shkolnik <uris@siano-ms.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/dvb/siano/smsusb.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/media/dvb/siano/smsusb.c b/drivers/media/dvb/siano/smsusb.c index ad80366ed418..1bcd0eff4b16 100644 --- a/drivers/media/dvb/siano/smsusb.c +++ b/drivers/media/dvb/siano/smsusb.c | |||
@@ -26,6 +26,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
26 | 26 | ||
27 | #include "smscoreapi.h" | 27 | #include "smscoreapi.h" |
28 | #include "sms-cards.h" | 28 | #include "sms-cards.h" |
29 | #include "smsendian.h" | ||
29 | 30 | ||
30 | static int sms_dbg; | 31 | static int sms_dbg; |
31 | module_param_named(debug, sms_dbg, int, 0644); | 32 | module_param_named(debug, sms_dbg, int, 0644); |
@@ -177,6 +178,7 @@ static int smsusb_sendrequest(void *context, void *buffer, size_t size) | |||
177 | struct smsusb_device_t *dev = (struct smsusb_device_t *) context; | 178 | struct smsusb_device_t *dev = (struct smsusb_device_t *) context; |
178 | int dummy; | 179 | int dummy; |
179 | 180 | ||
181 | smsendian_handle_message_header((struct SmsMsgHdr_ST *)buffer); | ||
180 | return usb_bulk_msg(dev->udev, usb_sndbulkpipe(dev->udev, 2), | 182 | return usb_bulk_msg(dev->udev, usb_sndbulkpipe(dev->udev, 2), |
181 | buffer, size, &dummy, 1000); | 183 | buffer, size, &dummy, 1000); |
182 | } | 184 | } |
@@ -334,8 +336,8 @@ static int smsusb_init_device(struct usb_interface *intf, int board_id) | |||
334 | case SMS_VEGA: | 336 | case SMS_VEGA: |
335 | dev->buffer_size = USB2_BUFFER_SIZE; | 337 | dev->buffer_size = USB2_BUFFER_SIZE; |
336 | dev->response_alignment = | 338 | dev->response_alignment = |
337 | dev->udev->ep_in[1]->desc.wMaxPacketSize - | 339 | le16_to_cpu(dev->udev->ep_in[1]->desc.wMaxPacketSize) - |
338 | sizeof(struct SmsMsgHdr_ST); | 340 | sizeof(struct SmsMsgHdr_ST); |
339 | 341 | ||
340 | params.flags |= SMS_DEVICE_FAMILY2; | 342 | params.flags |= SMS_DEVICE_FAMILY2; |
341 | break; | 343 | break; |