From patchwork Wed Nov 18 19:01:34 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Richter X-Patchwork-Id: 61149 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 nAIJ5At3015904 for ; Wed, 18 Nov 2009 19:05:10 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932578AbZKRTBp (ORCPT ); Wed, 18 Nov 2009 14:01:45 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932573AbZKRTBp (ORCPT ); Wed, 18 Nov 2009 14:01:45 -0500 Received: from einhorn.in-berlin.de ([192.109.42.8]:35624 "EHLO einhorn.in-berlin.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932513AbZKRTBo (ORCPT ); Wed, 18 Nov 2009 14:01:44 -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 nAIJ1Zkl006442; Wed, 18 Nov 2009 20:01:36 +0100 Date: Wed, 18 Nov 2009 20:01:34 +0100 (CET) From: Stefan Richter Subject: [PATCH 3/6] firedtv: remove an unnecessary function argument 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.32-rc7/drivers/media/dvb/firewire/firedtv-1394.c =================================================================== --- linux-2.6.32-rc7.orig/drivers/media/dvb/firewire/firedtv-1394.c +++ linux-2.6.32-rc7/drivers/media/dvb/firewire/firedtv-1394.c @@ -101,9 +101,9 @@ static int node_lock(struct firedtv *fdt return ret; } -static int node_read(struct firedtv *fdtv, u64 addr, void *data, size_t len) +static int node_read(struct firedtv *fdtv, u64 addr, void *data) { - return hpsb_node_read(node_of(fdtv), addr, data, len); + return hpsb_node_read(node_of(fdtv), addr, data, 4); } static int node_write(struct firedtv *fdtv, u64 addr, void *data, size_t len) Index: linux-2.6.32-rc7/drivers/media/dvb/firewire/firedtv-avc.c =================================================================== --- linux-2.6.32-rc7.orig/drivers/media/dvb/firewire/firedtv-avc.c +++ linux-2.6.32-rc7/drivers/media/dvb/firewire/firedtv-avc.c @@ -1236,14 +1236,14 @@ int avc_ca_get_mmi(struct firedtv *fdtv, #define CMP_OUTPUT_PLUG_CONTROL_REG_0 0xfffff0000904ULL -static int cmp_read(struct firedtv *fdtv, void *buf, u64 addr, size_t len) +static int cmp_read(struct firedtv *fdtv, u64 addr, __be32 *data) { int ret; if (mutex_lock_interruptible(&fdtv->avc_mutex)) return -EINTR; - ret = fdtv->backend->read(fdtv, addr, buf, len); + ret = fdtv->backend->read(fdtv, addr, data); if (ret < 0) dev_err(fdtv->device, "CMP: read I/O error\n"); @@ -1293,7 +1293,7 @@ int cmp_establish_pp_connection(struct f int attempts = 0; int ret; - ret = cmp_read(fdtv, opcr, opcr_address, 4); + ret = cmp_read(fdtv, opcr_address, opcr); if (ret < 0) return ret; @@ -1357,7 +1357,7 @@ void cmp_break_pp_connection(struct fire u64 opcr_address = CMP_OUTPUT_PLUG_CONTROL_REG_0 + (plug << 2); int attempts = 0; - if (cmp_read(fdtv, opcr, opcr_address, 4) < 0) + if (cmp_read(fdtv, opcr_address, opcr) < 0) return; repeat: Index: linux-2.6.32-rc7/drivers/media/dvb/firewire/firedtv-fw.c =================================================================== --- linux-2.6.32-rc7.orig/drivers/media/dvb/firewire/firedtv-fw.c +++ linux-2.6.32-rc7/drivers/media/dvb/firewire/firedtv-fw.c @@ -46,10 +46,9 @@ static int node_lock(struct firedtv *fdt return node_req(fdtv, addr, data, 8, TCODE_LOCK_COMPARE_SWAP); } -static int node_read(struct firedtv *fdtv, u64 addr, void *data, size_t len) +static int node_read(struct firedtv *fdtv, u64 addr, void *data) { - return node_req(fdtv, addr, data, len, len == 4 ? - TCODE_READ_QUADLET_REQUEST : TCODE_READ_BLOCK_REQUEST); + return node_req(fdtv, addr, data, 4, TCODE_READ_QUADLET_REQUEST); } static int node_write(struct firedtv *fdtv, u64 addr, void *data, size_t len) Index: linux-2.6.32-rc7/drivers/media/dvb/firewire/firedtv.h =================================================================== --- linux-2.6.32-rc7.orig/drivers/media/dvb/firewire/firedtv.h +++ linux-2.6.32-rc7/drivers/media/dvb/firewire/firedtv.h @@ -74,7 +74,7 @@ struct firedtv; struct firedtv_backend { int (*lock)(struct firedtv *fdtv, u64 addr, __be32 data[]); - int (*read)(struct firedtv *fdtv, u64 addr, void *data, size_t len); + int (*read)(struct firedtv *fdtv, u64 addr, void *data); int (*write)(struct firedtv *fdtv, u64 addr, void *data, size_t len); int (*start_iso)(struct firedtv *fdtv); void (*stop_iso)(struct firedtv *fdtv);