aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/saa7164/saa7164-buffer.c
diff options
context:
space:
mode:
authorSteven Toth <stoth@kernellabs.com>2010-11-12 16:32:36 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-12-29 05:16:39 -0500
commitbc25068495b110fcdf35a22f43d32637e99fd018 (patch)
tree569ce8d98e0d46e583f5e897e8aa36cd3dd88bf7 /drivers/media/video/saa7164/saa7164-buffer.c
parent0e72cc8b8d48ba05e705f432fb99aaa0ea6737c6 (diff)
[media] saa7164: Checkpatch compliance cleanup
Checkpatch compliance cleanup across files in the saa7164 driver. Signed-off-by: Steven Toth <stoth@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/saa7164/saa7164-buffer.c')
-rw-r--r--drivers/media/video/saa7164/saa7164-buffer.c92
1 files changed, 45 insertions, 47 deletions
diff --git a/drivers/media/video/saa7164/saa7164-buffer.c b/drivers/media/video/saa7164/saa7164-buffer.c
index 7230912acc7d..ddd25211c9e8 100644
--- a/drivers/media/video/saa7164/saa7164-buffer.c
+++ b/drivers/media/video/saa7164/saa7164-buffer.c
@@ -24,46 +24,46 @@
24#include "saa7164.h" 24#include "saa7164.h"
25 25
26/* The PCI address space for buffer handling looks like this: 26/* The PCI address space for buffer handling looks like this:
27 27 *
28 +-u32 wide-------------+ 28 * +-u32 wide-------------+
29 | + 29 * | +
30 +-u64 wide------------------------------------+ 30 * +-u64 wide------------------------------------+
31 + + 31 * + +
32 +----------------------+ 32 * +----------------------+
33 | CurrentBufferPtr + Pointer to current PCI buffer >-+ 33 * | CurrentBufferPtr + Pointer to current PCI buffer >-+
34 +----------------------+ | 34 * +----------------------+ |
35 | Unused + | 35 * | Unused + |
36 +----------------------+ | 36 * +----------------------+ |
37 | Pitch + = 188 (bytes) | 37 * | Pitch + = 188 (bytes) |
38 +----------------------+ | 38 * +----------------------+ |
39 | PCI buffer size + = pitch * number of lines (312) | 39 * | PCI buffer size + = pitch * number of lines (312) |
40 +----------------------+ | 40 * +----------------------+ |
41 |0| Buf0 Write Offset + | 41 * |0| Buf0 Write Offset + |
42 +----------------------+ v 42 * +----------------------+ v
43 |1| Buf1 Write Offset + | 43 * |1| Buf1 Write Offset + |
44 +----------------------+ | 44 * +----------------------+ |
45 |2| Buf2 Write Offset + | 45 * |2| Buf2 Write Offset + |
46 +----------------------+ | 46 * +----------------------+ |
47 |3| Buf3 Write Offset + | 47 * |3| Buf3 Write Offset + |
48 +----------------------+ | 48 * +----------------------+ |
49 ... More write offsets | 49 * ... More write offsets |
50 +---------------------------------------------+ | 50 * +---------------------------------------------+ |
51 +0| set of ptrs to PCI pagetables + | 51 * +0| set of ptrs to PCI pagetables + |
52 +---------------------------------------------+ | 52 * +---------------------------------------------+ |
53 +1| set of ptrs to PCI pagetables + <--------+ 53 * +1| set of ptrs to PCI pagetables + <--------+
54 +---------------------------------------------+ 54 * +---------------------------------------------+
55 +2| set of ptrs to PCI pagetables + 55 * +2| set of ptrs to PCI pagetables +
56 +---------------------------------------------+ 56 * +---------------------------------------------+
57 +3| set of ptrs to PCI pagetables + >--+ 57 * +3| set of ptrs to PCI pagetables + >--+
58 +---------------------------------------------+ | 58 * +---------------------------------------------+ |
59 ... More buffer pointers | +----------------+ 59 * ... More buffer pointers | +----------------+
60 +->| pt[0] TS data | 60 * +->| pt[0] TS data |
61 | +----------------+ 61 * | +----------------+
62 | 62 * |
63 | +----------------+ 63 * | +----------------+
64 +->| pt[1] TS data | 64 * +->| pt[1] TS data |
65 | +----------------+ 65 * | +----------------+
66 | etc 66 * | etc
67 */ 67 */
68 68
69void saa7164_buffer_display(struct saa7164_buffer *buf) 69void saa7164_buffer_display(struct saa7164_buffer *buf)
@@ -283,7 +283,8 @@ int saa7164_buffer_cfg_port(struct saa7164_port *port)
283 return 0; 283 return 0;
284} 284}
285 285
286struct saa7164_user_buffer *saa7164_buffer_alloc_user(struct saa7164_dev *dev, u32 len) 286struct saa7164_user_buffer *saa7164_buffer_alloc_user(struct saa7164_dev *dev,
287 u32 len)
287{ 288{
288 struct saa7164_user_buffer *buf; 289 struct saa7164_user_buffer *buf;
289 290
@@ -313,12 +314,9 @@ void saa7164_buffer_dealloc_user(struct saa7164_user_buffer *buf)
313 if (!buf) 314 if (!buf)
314 return; 315 return;
315 316
316 if (buf->data) { 317 kfree(buf->data);
317 kfree(buf->data); 318 buf->data = 0;
318 buf->data = 0;
319 }
320 319
321 if (buf) 320 kfree(buf);
322 kfree(buf);
323} 321}
324 322