From patchwork Sun Nov 8 21:29:41 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Richter X-Patchwork-Id: 58624 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 nA8LVtcs006778 for ; Sun, 8 Nov 2009 21:31:55 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755358AbZKHVas (ORCPT ); Sun, 8 Nov 2009 16:30:48 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754537AbZKHVar (ORCPT ); Sun, 8 Nov 2009 16:30:47 -0500 Received: from einhorn.in-berlin.de ([192.109.42.8]:36325 "EHLO einhorn.in-berlin.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752673AbZKHVar (ORCPT ); Sun, 8 Nov 2009 16:30:47 -0500 X-Envelope-From: stefanr@s5r6.in-berlin.de Received: from stein ([83.221.231.7]) (authenticated bits=0) by einhorn.in-berlin.de (8.13.6/8.13.6/Debian-1) with ESMTP id nA8LUOnl006250; Sun, 8 Nov 2009 22:30:38 +0100 Date: Sun, 8 Nov 2009 22:29:41 +0100 (CET) From: Stefan Richter Subject: [PATCH 3/4] firedtv: add missing include, rename a constant To: linux-media@vger.kernel.org cc: linux1394-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Disposition: INLINE X-Scanned-By: MIMEDefang_at_IN-Berlin_e.V. on 192.109.42.8 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Index: linux-2.6.31.4/drivers/media/dvb/firewire/firedtv-1394.c =================================================================== --- linux-2.6.31.4.orig/drivers/media/dvb/firewire/firedtv-1394.c +++ linux-2.6.31.4/drivers/media/dvb/firewire/firedtv-1394.c @@ -26,13 +26,16 @@ #include #include +#include + #include "firedtv.h" static LIST_HEAD(node_list); static DEFINE_SPINLOCK(node_list_lock); -#define FIREWIRE_HEADER_SIZE 4 -#define CIP_HEADER_SIZE 8 +#define CIP_HEADER_SIZE 8 +#define MPEG2_TS_HEADER_SIZE 4 +#define MPEG2_TS_SOURCE_PACKET_SIZE (4 + 188) static void rawiso_activity_cb(struct hpsb_iso *iso) { @@ -62,20 +65,20 @@ static void rawiso_activity_cb(struct hp buf = dma_region_i(&iso->data_buf, unsigned char, iso->infos[packet].offset + CIP_HEADER_SIZE); count = (iso->infos[packet].len - CIP_HEADER_SIZE) / - (188 + FIREWIRE_HEADER_SIZE); + MPEG2_TS_SOURCE_PACKET_SIZE; /* ignore empty packet */ if (iso->infos[packet].len <= CIP_HEADER_SIZE) continue; while (count--) { - if (buf[FIREWIRE_HEADER_SIZE] == 0x47) + if (buf[MPEG2_TS_HEADER_SIZE] == 0x47) dvb_dmx_swfilter_packets(&fdtv->demux, - &buf[FIREWIRE_HEADER_SIZE], 1); + &buf[MPEG2_TS_HEADER_SIZE], 1); else dev_err(fdtv->device, "skipping invalid packet\n"); - buf += 188 + FIREWIRE_HEADER_SIZE; + buf += MPEG2_TS_SOURCE_PACKET_SIZE; } } out: