diff options
Diffstat (limited to 'drivers/media/video/saa7164/saa7164-bus.c')
-rw-r--r-- | drivers/media/video/saa7164/saa7164-bus.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/drivers/media/video/saa7164/saa7164-bus.c b/drivers/media/video/saa7164/saa7164-bus.c index 30d5283da41e..b2b0d97101d0 100644 --- a/drivers/media/video/saa7164/saa7164-bus.c +++ b/drivers/media/video/saa7164/saa7164-bus.c | |||
@@ -43,7 +43,8 @@ int saa7164_bus_setup(struct saa7164_dev *dev) | |||
43 | 43 | ||
44 | b->m_dwSizeGetRing = SAA_DEVICE_BUFFERBLOCKSIZE; | 44 | b->m_dwSizeGetRing = SAA_DEVICE_BUFFERBLOCKSIZE; |
45 | 45 | ||
46 | b->m_dwSetWritePos = ((u32)dev->intfdesc.BARLocation) + (2 * sizeof(u64)); | 46 | b->m_dwSetWritePos = ((u32)dev->intfdesc.BARLocation) + |
47 | (2 * sizeof(u64)); | ||
47 | b->m_dwSetReadPos = b->m_dwSetWritePos + (1 * sizeof(u32)); | 48 | b->m_dwSetReadPos = b->m_dwSetWritePos + (1 * sizeof(u32)); |
48 | 49 | ||
49 | b->m_dwGetWritePos = b->m_dwSetWritePos + (2 * sizeof(u32)); | 50 | b->m_dwGetWritePos = b->m_dwSetWritePos + (2 * sizeof(u32)); |
@@ -105,7 +106,8 @@ void saa7164_bus_verify(struct saa7164_dev *dev) | |||
105 | } | 106 | } |
106 | } | 107 | } |
107 | 108 | ||
108 | void saa7164_bus_dumpmsg(struct saa7164_dev *dev, struct tmComResInfo* m, void *buf) | 109 | void saa7164_bus_dumpmsg(struct saa7164_dev *dev, struct tmComResInfo* m, |
110 | void *buf) | ||
109 | { | 111 | { |
110 | dprintk(DBGLVL_BUS, "Dumping msg structure:\n"); | 112 | dprintk(DBGLVL_BUS, "Dumping msg structure:\n"); |
111 | dprintk(DBGLVL_BUS, " .id = %d\n", m->id); | 113 | dprintk(DBGLVL_BUS, " .id = %d\n", m->id); |
@@ -129,7 +131,8 @@ void saa7164_bus_dumpmsg(struct saa7164_dev *dev, struct tmComResInfo* m, void * | |||
129 | * SAA_OK The function executed successfully. | 131 | * SAA_OK The function executed successfully. |
130 | * < 0 One or more members are not initialized. | 132 | * < 0 One or more members are not initialized. |
131 | */ | 133 | */ |
132 | int saa7164_bus_set(struct saa7164_dev *dev, struct tmComResInfo* msg, void *buf) | 134 | int saa7164_bus_set(struct saa7164_dev *dev, struct tmComResInfo* msg, |
135 | void *buf) | ||
133 | { | 136 | { |
134 | struct tmComResBusInfo *bus = &dev->bus; | 137 | struct tmComResBusInfo *bus = &dev->bus; |
135 | u32 bytes_to_write, free_write_space, timeout, curr_srp, curr_swp; | 138 | u32 bytes_to_write, free_write_space, timeout, curr_srp, curr_swp; |
@@ -294,14 +297,15 @@ out: | |||
294 | /* | 297 | /* |
295 | * Receive a command or a response from the bus. The implementation does not | 298 | * Receive a command or a response from the bus. The implementation does not |
296 | * know if it is a command or a response it simply dequeues the data, | 299 | * know if it is a command or a response it simply dequeues the data, |
297 | * depending on the bus information given in the struct tmComResBusInfo structure. | 300 | * depending on the bus information given in the struct tmComResBusInfo |
301 | * structure. | ||
298 | * | 302 | * |
299 | * Return Value: | 303 | * Return Value: |
300 | * 0 The function executed successfully. | 304 | * 0 The function executed successfully. |
301 | * < 0 One or more members are not initialized. | 305 | * < 0 One or more members are not initialized. |
302 | */ | 306 | */ |
303 | int saa7164_bus_get(struct saa7164_dev *dev, struct tmComResInfo* msg, void *buf, | 307 | int saa7164_bus_get(struct saa7164_dev *dev, struct tmComResInfo* msg, |
304 | int peekonly) | 308 | void *buf, int peekonly) |
305 | { | 309 | { |
306 | struct tmComResBusInfo *bus = &dev->bus; | 310 | struct tmComResBusInfo *bus = &dev->bus; |
307 | u32 bytes_to_read, write_distance, curr_grp, curr_gwp, | 311 | u32 bytes_to_read, write_distance, curr_grp, curr_gwp, |