aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/common/saa7146_fops.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2011-08-21 18:56:44 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-09-03 19:54:14 -0400
commit44d0b80e5ff741d502a6ccc8685a18bda1ac9da4 (patch)
treeb19473bcfeae86f0ab4ccc66e5bf18fea71fc896 /drivers/media/common/saa7146_fops.c
parent0b8bd83cf393832f1d00096b866d888b75b374c3 (diff)
[media] saa7146: Use current logging styles
Standardize the mechanisms to emit logging messages. A few other modules used an #include from saa7146, convert those at the same time. Add pr_fmt. Convert printks to pr_<level> Convert printks without KERN_<level> to appropriate pr_<level>. Convert logging macros requiring multiple parentheses to normal style. Removed embedded prefixes when pr_fmt was added. Whitespace cleanups when around other conversions. Use printf extension %pM to print mac address. Coalesce format strings. Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Michael Hunold <michael@mihu.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/common/saa7146_fops.c')
-rw-r--r--drivers/media/common/saa7146_fops.c118
1 files changed, 64 insertions, 54 deletions
diff --git a/drivers/media/common/saa7146_fops.c b/drivers/media/common/saa7146_fops.c
index 1bd3dd762c6b..a92546144eaa 100644
--- a/drivers/media/common/saa7146_fops.c
+++ b/drivers/media/common/saa7146_fops.c
@@ -1,3 +1,5 @@
1#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
2
1#include <media/saa7146_vv.h> 3#include <media/saa7146_vv.h>
2 4
3/****************************************************************************/ 5/****************************************************************************/
@@ -9,21 +11,23 @@ int saa7146_res_get(struct saa7146_fh *fh, unsigned int bit)
9 struct saa7146_vv *vv = dev->vv_data; 11 struct saa7146_vv *vv = dev->vv_data;
10 12
11 if (fh->resources & bit) { 13 if (fh->resources & bit) {
12 DEB_D(("already allocated! want: 0x%02x, cur:0x%02x\n",bit,vv->resources)); 14 DEB_D("already allocated! want: 0x%02x, cur:0x%02x\n",
15 bit, vv->resources);
13 /* have it already allocated */ 16 /* have it already allocated */
14 return 1; 17 return 1;
15 } 18 }
16 19
17 /* is it free? */ 20 /* is it free? */
18 if (vv->resources & bit) { 21 if (vv->resources & bit) {
19 DEB_D(("locked! vv->resources:0x%02x, we want:0x%02x\n",vv->resources,bit)); 22 DEB_D("locked! vv->resources:0x%02x, we want:0x%02x\n",
23 vv->resources, bit);
20 /* no, someone else uses it */ 24 /* no, someone else uses it */
21 return 0; 25 return 0;
22 } 26 }
23 /* it's free, grab it */ 27 /* it's free, grab it */
24 fh->resources |= bit; 28 fh->resources |= bit;
25 vv->resources |= bit; 29 vv->resources |= bit;
26 DEB_D(("res: get 0x%02x, cur:0x%02x\n",bit,vv->resources)); 30 DEB_D("res: get 0x%02x, cur:0x%02x\n", bit, vv->resources);
27 return 1; 31 return 1;
28} 32}
29 33
@@ -34,9 +38,9 @@ void saa7146_res_free(struct saa7146_fh *fh, unsigned int bits)
34 38
35 BUG_ON((fh->resources & bits) != bits); 39 BUG_ON((fh->resources & bits) != bits);
36 40
37 fh->resources &= ~bits; 41 fh->resources &= ~bits;
38 vv->resources &= ~bits; 42 vv->resources &= ~bits;
39 DEB_D(("res: put 0x%02x, cur:0x%02x\n",bits,vv->resources)); 43 DEB_D("res: put 0x%02x, cur:0x%02x\n", bits, vv->resources);
40} 44}
41 45
42 46
@@ -47,7 +51,7 @@ void saa7146_dma_free(struct saa7146_dev *dev,struct videobuf_queue *q,
47 struct saa7146_buf *buf) 51 struct saa7146_buf *buf)
48{ 52{
49 struct videobuf_dmabuf *dma=videobuf_to_dma(&buf->vb); 53 struct videobuf_dmabuf *dma=videobuf_to_dma(&buf->vb);
50 DEB_EE(("dev:%p, buf:%p\n",dev,buf)); 54 DEB_EE("dev:%p, buf:%p\n", dev, buf);
51 55
52 BUG_ON(in_interrupt()); 56 BUG_ON(in_interrupt());
53 57
@@ -66,18 +70,19 @@ int saa7146_buffer_queue(struct saa7146_dev *dev,
66 struct saa7146_buf *buf) 70 struct saa7146_buf *buf)
67{ 71{
68 assert_spin_locked(&dev->slock); 72 assert_spin_locked(&dev->slock);
69 DEB_EE(("dev:%p, dmaq:%p, buf:%p\n", dev, q, buf)); 73 DEB_EE("dev:%p, dmaq:%p, buf:%p\n", dev, q, buf);
70 74
71 BUG_ON(!q); 75 BUG_ON(!q);
72 76
73 if (NULL == q->curr) { 77 if (NULL == q->curr) {
74 q->curr = buf; 78 q->curr = buf;
75 DEB_D(("immediately activating buffer %p\n", buf)); 79 DEB_D("immediately activating buffer %p\n", buf);
76 buf->activate(dev,buf,NULL); 80 buf->activate(dev,buf,NULL);
77 } else { 81 } else {
78 list_add_tail(&buf->vb.queue,&q->queue); 82 list_add_tail(&buf->vb.queue,&q->queue);
79 buf->vb.state = VIDEOBUF_QUEUED; 83 buf->vb.state = VIDEOBUF_QUEUED;
80 DEB_D(("adding buffer %p to queue. (active buffer present)\n", buf)); 84 DEB_D("adding buffer %p to queue. (active buffer present)\n",
85 buf);
81 } 86 }
82 return 0; 87 return 0;
83} 88}
@@ -87,14 +92,14 @@ void saa7146_buffer_finish(struct saa7146_dev *dev,
87 int state) 92 int state)
88{ 93{
89 assert_spin_locked(&dev->slock); 94 assert_spin_locked(&dev->slock);
90 DEB_EE(("dev:%p, dmaq:%p, state:%d\n", dev, q, state)); 95 DEB_EE("dev:%p, dmaq:%p, state:%d\n", dev, q, state);
91 DEB_EE(("q->curr:%p\n",q->curr)); 96 DEB_EE("q->curr:%p\n", q->curr);
92 97
93 BUG_ON(!q->curr); 98 BUG_ON(!q->curr);
94 99
95 /* finish current buffer */ 100 /* finish current buffer */
96 if (NULL == q->curr) { 101 if (NULL == q->curr) {
97 DEB_D(("aiii. no current buffer\n")); 102 DEB_D("aiii. no current buffer\n");
98 return; 103 return;
99 } 104 }
100 105
@@ -112,7 +117,7 @@ void saa7146_buffer_next(struct saa7146_dev *dev,
112 117
113 BUG_ON(!q); 118 BUG_ON(!q);
114 119
115 DEB_INT(("dev:%p, dmaq:%p, vbi:%d\n", dev, q, vbi)); 120 DEB_INT("dev:%p, dmaq:%p, vbi:%d\n", dev, q, vbi);
116 121
117 assert_spin_locked(&dev->slock); 122 assert_spin_locked(&dev->slock);
118 if (!list_empty(&q->queue)) { 123 if (!list_empty(&q->queue)) {
@@ -122,10 +127,11 @@ void saa7146_buffer_next(struct saa7146_dev *dev,
122 if (!list_empty(&q->queue)) 127 if (!list_empty(&q->queue))
123 next = list_entry(q->queue.next,struct saa7146_buf, vb.queue); 128 next = list_entry(q->queue.next,struct saa7146_buf, vb.queue);
124 q->curr = buf; 129 q->curr = buf;
125 DEB_INT(("next buffer: buf:%p, prev:%p, next:%p\n", buf, q->queue.prev,q->queue.next)); 130 DEB_INT("next buffer: buf:%p, prev:%p, next:%p\n",
131 buf, q->queue.prev, q->queue.next);
126 buf->activate(dev,buf,next); 132 buf->activate(dev,buf,next);
127 } else { 133 } else {
128 DEB_INT(("no next buffer. stopping.\n")); 134 DEB_INT("no next buffer. stopping.\n");
129 if( 0 != vbi ) { 135 if( 0 != vbi ) {
130 /* turn off video-dma3 */ 136 /* turn off video-dma3 */
131 saa7146_write(dev,MC1, MASK_20); 137 saa7146_write(dev,MC1, MASK_20);
@@ -162,11 +168,11 @@ void saa7146_buffer_timeout(unsigned long data)
162 struct saa7146_dev *dev = q->dev; 168 struct saa7146_dev *dev = q->dev;
163 unsigned long flags; 169 unsigned long flags;
164 170
165 DEB_EE(("dev:%p, dmaq:%p\n", dev, q)); 171 DEB_EE("dev:%p, dmaq:%p\n", dev, q);
166 172
167 spin_lock_irqsave(&dev->slock,flags); 173 spin_lock_irqsave(&dev->slock,flags);
168 if (q->curr) { 174 if (q->curr) {
169 DEB_D(("timeout on %p\n", q->curr)); 175 DEB_D("timeout on %p\n", q->curr);
170 saa7146_buffer_finish(dev,q,VIDEOBUF_ERROR); 176 saa7146_buffer_finish(dev,q,VIDEOBUF_ERROR);
171 } 177 }
172 178
@@ -194,12 +200,12 @@ static int fops_open(struct file *file)
194 200
195 enum v4l2_buf_type type; 201 enum v4l2_buf_type type;
196 202
197 DEB_EE(("file:%p, dev:%s\n", file, video_device_node_name(vdev))); 203 DEB_EE("file:%p, dev:%s\n", file, video_device_node_name(vdev));
198 204
199 if (mutex_lock_interruptible(&saa7146_devices_lock)) 205 if (mutex_lock_interruptible(&saa7146_devices_lock))
200 return -ERESTARTSYS; 206 return -ERESTARTSYS;
201 207
202 DEB_D(("using: %p\n",dev)); 208 DEB_D("using: %p\n", dev);
203 209
204 type = vdev->vfl_type == VFL_TYPE_GRABBER 210 type = vdev->vfl_type == VFL_TYPE_GRABBER
205 ? V4L2_BUF_TYPE_VIDEO_CAPTURE 211 ? V4L2_BUF_TYPE_VIDEO_CAPTURE
@@ -207,7 +213,7 @@ static int fops_open(struct file *file)
207 213
208 /* check if an extension is registered */ 214 /* check if an extension is registered */
209 if( NULL == dev->ext ) { 215 if( NULL == dev->ext ) {
210 DEB_S(("no extension registered for this device.\n")); 216 DEB_S("no extension registered for this device\n");
211 result = -ENODEV; 217 result = -ENODEV;
212 goto out; 218 goto out;
213 } 219 }
@@ -215,7 +221,7 @@ static int fops_open(struct file *file)
215 /* allocate per open data */ 221 /* allocate per open data */
216 fh = kzalloc(sizeof(*fh),GFP_KERNEL); 222 fh = kzalloc(sizeof(*fh),GFP_KERNEL);
217 if (NULL == fh) { 223 if (NULL == fh) {
218 DEB_S(("cannot allocate memory for per open data.\n")); 224 DEB_S("cannot allocate memory for per open data\n");
219 result = -ENOMEM; 225 result = -ENOMEM;
220 goto out; 226 goto out;
221 } 227 }
@@ -225,13 +231,13 @@ static int fops_open(struct file *file)
225 fh->type = type; 231 fh->type = type;
226 232
227 if( fh->type == V4L2_BUF_TYPE_VBI_CAPTURE) { 233 if( fh->type == V4L2_BUF_TYPE_VBI_CAPTURE) {
228 DEB_S(("initializing vbi...\n")); 234 DEB_S("initializing vbi...\n");
229 if (dev->ext_vv_data->capabilities & V4L2_CAP_VBI_CAPTURE) 235 if (dev->ext_vv_data->capabilities & V4L2_CAP_VBI_CAPTURE)
230 result = saa7146_vbi_uops.open(dev,file); 236 result = saa7146_vbi_uops.open(dev,file);
231 if (dev->ext_vv_data->vbi_fops.open) 237 if (dev->ext_vv_data->vbi_fops.open)
232 dev->ext_vv_data->vbi_fops.open(file); 238 dev->ext_vv_data->vbi_fops.open(file);
233 } else { 239 } else {
234 DEB_S(("initializing video...\n")); 240 DEB_S("initializing video...\n");
235 result = saa7146_video_uops.open(dev,file); 241 result = saa7146_video_uops.open(dev,file);
236 } 242 }
237 243
@@ -259,7 +265,7 @@ static int fops_release(struct file *file)
259 struct saa7146_fh *fh = file->private_data; 265 struct saa7146_fh *fh = file->private_data;
260 struct saa7146_dev *dev = fh->dev; 266 struct saa7146_dev *dev = fh->dev;
261 267
262 DEB_EE(("file:%p\n", file)); 268 DEB_EE("file:%p\n", file);
263 269
264 if (mutex_lock_interruptible(&saa7146_devices_lock)) 270 if (mutex_lock_interruptible(&saa7146_devices_lock))
265 return -ERESTARTSYS; 271 return -ERESTARTSYS;
@@ -289,12 +295,14 @@ static int fops_mmap(struct file *file, struct vm_area_struct * vma)
289 295
290 switch (fh->type) { 296 switch (fh->type) {
291 case V4L2_BUF_TYPE_VIDEO_CAPTURE: { 297 case V4L2_BUF_TYPE_VIDEO_CAPTURE: {
292 DEB_EE(("V4L2_BUF_TYPE_VIDEO_CAPTURE: file:%p, vma:%p\n",file, vma)); 298 DEB_EE("V4L2_BUF_TYPE_VIDEO_CAPTURE: file:%p, vma:%p\n",
299 file, vma);
293 q = &fh->video_q; 300 q = &fh->video_q;
294 break; 301 break;
295 } 302 }
296 case V4L2_BUF_TYPE_VBI_CAPTURE: { 303 case V4L2_BUF_TYPE_VBI_CAPTURE: {
297 DEB_EE(("V4L2_BUF_TYPE_VBI_CAPTURE: file:%p, vma:%p\n",file, vma)); 304 DEB_EE("V4L2_BUF_TYPE_VBI_CAPTURE: file:%p, vma:%p\n",
305 file, vma);
298 q = &fh->vbi_q; 306 q = &fh->vbi_q;
299 break; 307 break;
300 } 308 }
@@ -312,14 +320,14 @@ static unsigned int fops_poll(struct file *file, struct poll_table_struct *wait)
312 struct videobuf_buffer *buf = NULL; 320 struct videobuf_buffer *buf = NULL;
313 struct videobuf_queue *q; 321 struct videobuf_queue *q;
314 322
315 DEB_EE(("file:%p, poll:%p\n",file, wait)); 323 DEB_EE("file:%p, poll:%p\n", file, wait);
316 324
317 if (V4L2_BUF_TYPE_VBI_CAPTURE == fh->type) { 325 if (V4L2_BUF_TYPE_VBI_CAPTURE == fh->type) {
318 if( 0 == fh->vbi_q.streaming ) 326 if( 0 == fh->vbi_q.streaming )
319 return videobuf_poll_stream(file, &fh->vbi_q, wait); 327 return videobuf_poll_stream(file, &fh->vbi_q, wait);
320 q = &fh->vbi_q; 328 q = &fh->vbi_q;
321 } else { 329 } else {
322 DEB_D(("using video queue.\n")); 330 DEB_D("using video queue\n");
323 q = &fh->video_q; 331 q = &fh->video_q;
324 } 332 }
325 333
@@ -327,17 +335,17 @@ static unsigned int fops_poll(struct file *file, struct poll_table_struct *wait)
327 buf = list_entry(q->stream.next, struct videobuf_buffer, stream); 335 buf = list_entry(q->stream.next, struct videobuf_buffer, stream);
328 336
329 if (!buf) { 337 if (!buf) {
330 DEB_D(("buf == NULL!\n")); 338 DEB_D("buf == NULL!\n");
331 return POLLERR; 339 return POLLERR;
332 } 340 }
333 341
334 poll_wait(file, &buf->done, wait); 342 poll_wait(file, &buf->done, wait);
335 if (buf->state == VIDEOBUF_DONE || buf->state == VIDEOBUF_ERROR) { 343 if (buf->state == VIDEOBUF_DONE || buf->state == VIDEOBUF_ERROR) {
336 DEB_D(("poll succeeded!\n")); 344 DEB_D("poll succeeded!\n");
337 return POLLIN|POLLRDNORM; 345 return POLLIN|POLLRDNORM;
338 } 346 }
339 347
340 DEB_D(("nothing to poll for, buf->state:%d\n",buf->state)); 348 DEB_D("nothing to poll for, buf->state:%d\n", buf->state);
341 return 0; 349 return 0;
342} 350}
343 351
@@ -346,18 +354,20 @@ static ssize_t fops_read(struct file *file, char __user *data, size_t count, lof
346 struct saa7146_fh *fh = file->private_data; 354 struct saa7146_fh *fh = file->private_data;
347 355
348 switch (fh->type) { 356 switch (fh->type) {
349 case V4L2_BUF_TYPE_VIDEO_CAPTURE: { 357 case V4L2_BUF_TYPE_VIDEO_CAPTURE:
350// DEB_EE(("V4L2_BUF_TYPE_VIDEO_CAPTURE: file:%p, data:%p, count:%lun", file, data, (unsigned long)count)); 358/*
359 DEB_EE("V4L2_BUF_TYPE_VIDEO_CAPTURE: file:%p, data:%p, count:%lun",
360 file, data, (unsigned long)count);
361*/
351 return saa7146_video_uops.read(file,data,count,ppos); 362 return saa7146_video_uops.read(file,data,count,ppos);
352 } 363 case V4L2_BUF_TYPE_VBI_CAPTURE:
353 case V4L2_BUF_TYPE_VBI_CAPTURE: { 364/*
354// DEB_EE(("V4L2_BUF_TYPE_VBI_CAPTURE: file:%p, data:%p, count:%lu\n", file, data, (unsigned long)count)); 365 DEB_EE("V4L2_BUF_TYPE_VBI_CAPTURE: file:%p, data:%p, count:%lu\n",
366 file, data, (unsigned long)count);
367*/
355 if (fh->dev->ext_vv_data->capabilities & V4L2_CAP_VBI_CAPTURE) 368 if (fh->dev->ext_vv_data->capabilities & V4L2_CAP_VBI_CAPTURE)
356 return saa7146_vbi_uops.read(file,data,count,ppos); 369 return saa7146_vbi_uops.read(file,data,count,ppos);
357 else 370 return -EINVAL;
358 return -EINVAL;
359 }
360 break;
361 default: 371 default:
362 BUG(); 372 BUG();
363 return 0; 373 return 0;
@@ -398,22 +408,22 @@ static void vv_callback(struct saa7146_dev *dev, unsigned long status)
398{ 408{
399 u32 isr = status; 409 u32 isr = status;
400 410
401 DEB_INT(("dev:%p, isr:0x%08x\n",dev,(u32)status)); 411 DEB_INT("dev:%p, isr:0x%08x\n", dev, (u32)status);
402 412
403 if (0 != (isr & (MASK_27))) { 413 if (0 != (isr & (MASK_27))) {
404 DEB_INT(("irq: RPS0 (0x%08x).\n",isr)); 414 DEB_INT("irq: RPS0 (0x%08x)\n", isr);
405 saa7146_video_uops.irq_done(dev,isr); 415 saa7146_video_uops.irq_done(dev,isr);
406 } 416 }
407 417
408 if (0 != (isr & (MASK_28))) { 418 if (0 != (isr & (MASK_28))) {
409 u32 mc2 = saa7146_read(dev, MC2); 419 u32 mc2 = saa7146_read(dev, MC2);
410 if( 0 != (mc2 & MASK_15)) { 420 if( 0 != (mc2 & MASK_15)) {
411 DEB_INT(("irq: RPS1 vbi workaround (0x%08x).\n",isr)); 421 DEB_INT("irq: RPS1 vbi workaround (0x%08x)\n", isr);
412 wake_up(&dev->vv_data->vbi_wq); 422 wake_up(&dev->vv_data->vbi_wq);
413 saa7146_write(dev,MC2, MASK_31); 423 saa7146_write(dev,MC2, MASK_31);
414 return; 424 return;
415 } 425 }
416 DEB_INT(("irq: RPS1 (0x%08x).\n",isr)); 426 DEB_INT("irq: RPS1 (0x%08x)\n", isr);
417 saa7146_vbi_uops.irq_done(dev,isr); 427 saa7146_vbi_uops.irq_done(dev,isr);
418 } 428 }
419} 429}
@@ -429,13 +439,13 @@ int saa7146_vv_init(struct saa7146_dev* dev, struct saa7146_ext_vv *ext_vv)
429 439
430 vv = kzalloc(sizeof(struct saa7146_vv), GFP_KERNEL); 440 vv = kzalloc(sizeof(struct saa7146_vv), GFP_KERNEL);
431 if (vv == NULL) { 441 if (vv == NULL) {
432 ERR(("out of memory. aborting.\n")); 442 ERR("out of memory. aborting.\n");
433 return -ENOMEM; 443 return -ENOMEM;
434 } 444 }
435 ext_vv->ops = saa7146_video_ioctl_ops; 445 ext_vv->ops = saa7146_video_ioctl_ops;
436 ext_vv->core_ops = &saa7146_video_ioctl_ops; 446 ext_vv->core_ops = &saa7146_video_ioctl_ops;
437 447
438 DEB_EE(("dev:%p\n",dev)); 448 DEB_EE("dev:%p\n", dev);
439 449
440 /* set default values for video parts of the saa7146 */ 450 /* set default values for video parts of the saa7146 */
441 saa7146_write(dev, BCS_CTRL, 0x80400040); 451 saa7146_write(dev, BCS_CTRL, 0x80400040);
@@ -450,7 +460,7 @@ int saa7146_vv_init(struct saa7146_dev* dev, struct saa7146_ext_vv *ext_vv)
450 460
451 vv->d_clipping.cpu_addr = pci_alloc_consistent(dev->pci, SAA7146_CLIPPING_MEM, &vv->d_clipping.dma_handle); 461 vv->d_clipping.cpu_addr = pci_alloc_consistent(dev->pci, SAA7146_CLIPPING_MEM, &vv->d_clipping.dma_handle);
452 if( NULL == vv->d_clipping.cpu_addr ) { 462 if( NULL == vv->d_clipping.cpu_addr ) {
453 ERR(("out of memory. aborting.\n")); 463 ERR("out of memory. aborting.\n");
454 kfree(vv); 464 kfree(vv);
455 return -1; 465 return -1;
456 } 466 }
@@ -471,7 +481,7 @@ int saa7146_vv_release(struct saa7146_dev* dev)
471{ 481{
472 struct saa7146_vv *vv = dev->vv_data; 482 struct saa7146_vv *vv = dev->vv_data;
473 483
474 DEB_EE(("dev:%p\n",dev)); 484 DEB_EE("dev:%p\n", dev);
475 485
476 v4l2_device_unregister(&dev->v4l2_dev); 486 v4l2_device_unregister(&dev->v4l2_dev);
477 pci_free_consistent(dev->pci, SAA7146_CLIPPING_MEM, vv->d_clipping.cpu_addr, vv->d_clipping.dma_handle); 487 pci_free_consistent(dev->pci, SAA7146_CLIPPING_MEM, vv->d_clipping.cpu_addr, vv->d_clipping.dma_handle);
@@ -490,7 +500,7 @@ int saa7146_register_device(struct video_device **vid, struct saa7146_dev* dev,
490 int err; 500 int err;
491 int i; 501 int i;
492 502
493 DEB_EE(("dev:%p, name:'%s', type:%d\n",dev,name,type)); 503 DEB_EE("dev:%p, name:'%s', type:%d\n", dev, name, type);
494 504
495 // released by vfd->release 505 // released by vfd->release
496 vfd = video_device_alloc(); 506 vfd = video_device_alloc();
@@ -509,13 +519,13 @@ int saa7146_register_device(struct video_device **vid, struct saa7146_dev* dev,
509 519
510 err = video_register_device(vfd, type, -1); 520 err = video_register_device(vfd, type, -1);
511 if (err < 0) { 521 if (err < 0) {
512 ERR(("cannot register v4l2 device. skipping.\n")); 522 ERR("cannot register v4l2 device. skipping.\n");
513 video_device_release(vfd); 523 video_device_release(vfd);
514 return err; 524 return err;
515 } 525 }
516 526
517 INFO(("%s: registered device %s [v4l2]\n", 527 pr_info("%s: registered device %s [v4l2]\n",
518 dev->name, video_device_node_name(vfd))); 528 dev->name, video_device_node_name(vfd));
519 529
520 *vid = vfd; 530 *vid = vfd;
521 return 0; 531 return 0;
@@ -524,7 +534,7 @@ EXPORT_SYMBOL_GPL(saa7146_register_device);
524 534
525int saa7146_unregister_device(struct video_device **vid, struct saa7146_dev* dev) 535int saa7146_unregister_device(struct video_device **vid, struct saa7146_dev* dev)
526{ 536{
527 DEB_EE(("dev:%p\n",dev)); 537 DEB_EE("dev:%p\n", dev);
528 538
529 video_unregister_device(*vid); 539 video_unregister_device(*vid);
530 *vid = NULL; 540 *vid = NULL;