From patchwork Sun Apr 5 12:05:05 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Uri Shkolnik X-Patchwork-Id: 16419 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n35C5A0j031492 for ; Sun, 5 Apr 2009 12:05:11 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751071AbZDEMFK (ORCPT ); Sun, 5 Apr 2009 08:05:10 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751322AbZDEMFK (ORCPT ); Sun, 5 Apr 2009 08:05:10 -0400 Received: from web110805.mail.gq1.yahoo.com ([67.195.13.228]:44591 "HELO web110805.mail.gq1.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1751071AbZDEMFJ (ORCPT ); Sun, 5 Apr 2009 08:05:09 -0400 Received: (qmail 99062 invoked by uid 60001); 5 Apr 2009 12:05:06 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1238933106; bh=Dvjk9rhKTXSVR3BiMCF9rSH5ungtx/gyLLNTy1Qduww=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=e6uhwN+O8WbZhhjpbBFsveuJvfsQnw1EpAjHCiec8zR0hd1dXPlfK7Zz00FfUkeKPMm0qateQTny2Acsm1zOBcwIdGDsR+duWKd2Mk0BcdJiuEEsZdUgZpsKThj22QL3i6d5fubtnk+6a7hdrylLduyoVLUOK92/9LxnlaE4+c8= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=mCoBJByLtKEomkzFE8o+uTAp/VO4iYjINu68v9jI3wQjlc5A/Ew+ZeP80e3CHm5Xwo3Tj1y/PV1RkMuhQuTP9KUvJ5jX4ki69FerpMRQD1aaaVk7PFOsgktSSZjHZsZglOgt2l1/XWo1pmHS1aBK0gGA5nRMtG0HxoqGfF7Xceo=; Message-ID: <308390.97983.qm@web110805.mail.gq1.yahoo.com> X-YMail-OSG: 1Sndb.4VM1mn_u1j5z5FThDyRbBZ1vyJtqWJoB1z65G71nL8J5GRTN33kbUQXdclc7LH_oTJS1TIk6N9asghyAn3PgqhDQjeneDN3WhMKeTGV9DcTQoAuwAHEsrhsEu3Unibj5mhIx_Iafio7FK5qFy3lkr2M9JLW2ZPIQFKp8wA29cxytxovuAkIXLrOarlUyWZuA_P0B0wjYi8bc9wVGVr4r5ydLONok94aYpXcJov1kbffa9aCVQZOjrWAbwHj5LaN3WxW7MMf6eDep4hqh3t8_e300ryzN14rtHeoucfmGWvSDGGPi3c6RNzqmqhajsz8fuLUqWLu25610VM5H0GsuOPJi_NnhhfqWAB Received: from [199.203.99.233] by web110805.mail.gq1.yahoo.com via HTTP; Sun, 05 Apr 2009 05:05:05 PDT X-Mailer: YahooMailClassic/5.2.15 YahooMailWebService/0.7.289.1 Date: Sun, 5 Apr 2009 05:05:05 -0700 (PDT) From: Uri Shkolnik Subject: [PATCH] [0904_18] Siano: smsusb - byte ordering and big endian support To: LinuxML MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org # HG changeset patch # User Uri Shkolnik # Date 1238760032 -10800 # Node ID ab731e3cec5cb076b8f87f827c3c97a4dd84e0ca # Parent 73c6299ef5f518beb07b6eb371402fe1be4e26ea [PATCH] [0904_18] Siano: smsusb - byte ordering and big endian support From: Uri Shkolnik This patch add support for Siano's messaging in big endian systems. Few indentations (without implementation impact) have been added. Priority: normal Signed-off-by: Uri Shkolnik --- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff -r 73c6299ef5f5 -r ab731e3cec5c linux/drivers/media/dvb/siano/smsusb.c --- a/linux/drivers/media/dvb/siano/smsusb.c Fri Apr 03 14:50:58 2009 +0300 +++ b/linux/drivers/media/dvb/siano/smsusb.c Fri Apr 03 15:00:32 2009 +0300 @@ -27,7 +27,6 @@ along with this program. If not, see context; + struct smsusb_urb_t *surb = (struct smsusb_urb_t *)urb->context; struct smsusb_device_t *dev = surb->dev; if (urb->status < 0) { @@ -76,6 +75,7 @@ static void smsusb_onresponse(struct urb if (urb->actual_length > 0) { struct SmsMsgHdr_ST *phdr = (struct SmsMsgHdr_ST *)surb->cb->p; + smsendian_handle_message_header(phdr); if (urb->actual_length >= phdr->msgLength) { surb->cb->size = phdr->msgLength; @@ -179,6 +179,7 @@ static int smsusb_sendrequest(void *cont 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); } @@ -336,8 +337,8 @@ static int smsusb_init_device(struct usb 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; @@ -532,13 +533,12 @@ MODULE_DEVICE_TABLE(usb, smsusb_id_table MODULE_DEVICE_TABLE(usb, smsusb_id_table); static struct usb_driver smsusb_driver = { - .name = "smsusb", - .probe = smsusb_probe, - .disconnect = smsusb_disconnect, - .id_table = smsusb_id_table, - - .suspend = smsusb_suspend, - .resume = smsusb_resume, + .name = "smsusb", + .probe = smsusb_probe, + .disconnect = smsusb_disconnect, + .suspend = smsusb_suspend, + .resume = smsusb_resume, + .id_table = smsusb_id_table, }; int smsusb_register(void)