diff options
author | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2009-11-18 14:01:34 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-12-05 15:41:44 -0500 |
commit | 5375659a3df319700d97d911e44926fb43354839 (patch) | |
tree | 3956d036635bb60369b4505a6ee13f5a0f5d9bbf | |
parent | b1d33f4b0ae319ca79b6bafd6e815cbe0dcd7c14 (diff) |
V4L/DVB (13410): firedtv: remove an unnecessary function argument
All read transactions initiated by firedtv are only quadlet-sized, hence
the backend->read call can be simplified a little.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r-- | drivers/media/dvb/firewire/firedtv-1394.c | 4 | ||||
-rw-r--r-- | drivers/media/dvb/firewire/firedtv-avc.c | 8 | ||||
-rw-r--r-- | drivers/media/dvb/firewire/firedtv-fw.c | 5 | ||||
-rw-r--r-- | drivers/media/dvb/firewire/firedtv.h | 2 |
4 files changed, 9 insertions, 10 deletions
diff --git a/drivers/media/dvb/firewire/firedtv-1394.c b/drivers/media/dvb/firewire/firedtv-1394.c index ed98fdb650c5..7c5459c27b75 100644 --- a/drivers/media/dvb/firewire/firedtv-1394.c +++ b/drivers/media/dvb/firewire/firedtv-1394.c | |||
@@ -101,9 +101,9 @@ static int node_lock(struct firedtv *fdtv, u64 addr, __be32 data[]) | |||
101 | return ret; | 101 | return ret; |
102 | } | 102 | } |
103 | 103 | ||
104 | static int node_read(struct firedtv *fdtv, u64 addr, void *data, size_t len) | 104 | static int node_read(struct firedtv *fdtv, u64 addr, void *data) |
105 | { | 105 | { |
106 | return hpsb_node_read(node_of(fdtv), addr, data, len); | 106 | return hpsb_node_read(node_of(fdtv), addr, data, 4); |
107 | } | 107 | } |
108 | 108 | ||
109 | static int node_write(struct firedtv *fdtv, u64 addr, void *data, size_t len) | 109 | static int node_write(struct firedtv *fdtv, u64 addr, void *data, size_t len) |
diff --git a/drivers/media/dvb/firewire/firedtv-avc.c b/drivers/media/dvb/firewire/firedtv-avc.c index 5516c33b1453..50c42a4b972b 100644 --- a/drivers/media/dvb/firewire/firedtv-avc.c +++ b/drivers/media/dvb/firewire/firedtv-avc.c | |||
@@ -1236,14 +1236,14 @@ int avc_ca_get_mmi(struct firedtv *fdtv, char *mmi_object, unsigned int *len) | |||
1236 | 1236 | ||
1237 | #define CMP_OUTPUT_PLUG_CONTROL_REG_0 0xfffff0000904ULL | 1237 | #define CMP_OUTPUT_PLUG_CONTROL_REG_0 0xfffff0000904ULL |
1238 | 1238 | ||
1239 | static int cmp_read(struct firedtv *fdtv, void *buf, u64 addr, size_t len) | 1239 | static int cmp_read(struct firedtv *fdtv, u64 addr, __be32 *data) |
1240 | { | 1240 | { |
1241 | int ret; | 1241 | int ret; |
1242 | 1242 | ||
1243 | if (mutex_lock_interruptible(&fdtv->avc_mutex)) | 1243 | if (mutex_lock_interruptible(&fdtv->avc_mutex)) |
1244 | return -EINTR; | 1244 | return -EINTR; |
1245 | 1245 | ||
1246 | ret = fdtv->backend->read(fdtv, addr, buf, len); | 1246 | ret = fdtv->backend->read(fdtv, addr, data); |
1247 | if (ret < 0) | 1247 | if (ret < 0) |
1248 | dev_err(fdtv->device, "CMP: read I/O error\n"); | 1248 | dev_err(fdtv->device, "CMP: read I/O error\n"); |
1249 | 1249 | ||
@@ -1293,7 +1293,7 @@ int cmp_establish_pp_connection(struct firedtv *fdtv, int plug, int channel) | |||
1293 | int attempts = 0; | 1293 | int attempts = 0; |
1294 | int ret; | 1294 | int ret; |
1295 | 1295 | ||
1296 | ret = cmp_read(fdtv, opcr, opcr_address, 4); | 1296 | ret = cmp_read(fdtv, opcr_address, opcr); |
1297 | if (ret < 0) | 1297 | if (ret < 0) |
1298 | return ret; | 1298 | return ret; |
1299 | 1299 | ||
@@ -1357,7 +1357,7 @@ void cmp_break_pp_connection(struct firedtv *fdtv, int plug, int channel) | |||
1357 | u64 opcr_address = CMP_OUTPUT_PLUG_CONTROL_REG_0 + (plug << 2); | 1357 | u64 opcr_address = CMP_OUTPUT_PLUG_CONTROL_REG_0 + (plug << 2); |
1358 | int attempts = 0; | 1358 | int attempts = 0; |
1359 | 1359 | ||
1360 | if (cmp_read(fdtv, opcr, opcr_address, 4) < 0) | 1360 | if (cmp_read(fdtv, opcr_address, opcr) < 0) |
1361 | return; | 1361 | return; |
1362 | 1362 | ||
1363 | repeat: | 1363 | repeat: |
diff --git a/drivers/media/dvb/firewire/firedtv-fw.c b/drivers/media/dvb/firewire/firedtv-fw.c index d8408cea335f..fe44789ab037 100644 --- a/drivers/media/dvb/firewire/firedtv-fw.c +++ b/drivers/media/dvb/firewire/firedtv-fw.c | |||
@@ -46,10 +46,9 @@ static int node_lock(struct firedtv *fdtv, u64 addr, __be32 data[]) | |||
46 | return node_req(fdtv, addr, data, 8, TCODE_LOCK_COMPARE_SWAP); | 46 | return node_req(fdtv, addr, data, 8, TCODE_LOCK_COMPARE_SWAP); |
47 | } | 47 | } |
48 | 48 | ||
49 | static int node_read(struct firedtv *fdtv, u64 addr, void *data, size_t len) | 49 | static int node_read(struct firedtv *fdtv, u64 addr, void *data) |
50 | { | 50 | { |
51 | return node_req(fdtv, addr, data, len, len == 4 ? | 51 | return node_req(fdtv, addr, data, 4, TCODE_READ_QUADLET_REQUEST); |
52 | TCODE_READ_QUADLET_REQUEST : TCODE_READ_BLOCK_REQUEST); | ||
53 | } | 52 | } |
54 | 53 | ||
55 | static int node_write(struct firedtv *fdtv, u64 addr, void *data, size_t len) | 54 | static int node_write(struct firedtv *fdtv, u64 addr, void *data, size_t len) |
diff --git a/drivers/media/dvb/firewire/firedtv.h b/drivers/media/dvb/firewire/firedtv.h index f7b5c030bedf..35080dbb3c66 100644 --- a/drivers/media/dvb/firewire/firedtv.h +++ b/drivers/media/dvb/firewire/firedtv.h | |||
@@ -74,7 +74,7 @@ struct firedtv; | |||
74 | 74 | ||
75 | struct firedtv_backend { | 75 | struct firedtv_backend { |
76 | int (*lock)(struct firedtv *fdtv, u64 addr, __be32 data[]); | 76 | int (*lock)(struct firedtv *fdtv, u64 addr, __be32 data[]); |
77 | int (*read)(struct firedtv *fdtv, u64 addr, void *data, size_t len); | 77 | int (*read)(struct firedtv *fdtv, u64 addr, void *data); |
78 | int (*write)(struct firedtv *fdtv, u64 addr, void *data, size_t len); | 78 | int (*write)(struct firedtv *fdtv, u64 addr, void *data, size_t len); |
79 | int (*start_iso)(struct firedtv *fdtv); | 79 | int (*start_iso)(struct firedtv *fdtv); |
80 | void (*stop_iso)(struct firedtv *fdtv); | 80 | void (*stop_iso)(struct firedtv *fdtv); |