* [PATCH v2] tm6000: fix uninitialized field, change prink to dprintk
@ 2011-05-21 6:05 stefan.ringel
2011-05-21 10:46 ` Mauro Carvalho Chehab
0 siblings, 1 reply; 2+ messages in thread
From: stefan.ringel @ 2011-05-21 6:05 UTC (permalink / raw)
To: linux-media; +Cc: d.belimov, mchehab, Stefan Ringel
From: Stefan Ringel <stefan.ringel@arcor.de>
fix uninitialized field, change prink to dprintk
Signed-off-by: Stefan Ringel <stefan.ringel@arcor.de>
---
drivers/staging/tm6000/tm6000-usb-isoc.h | 2 +-
drivers/staging/tm6000/tm6000-video.c | 5 ++++-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/tm6000/tm6000-usb-isoc.h b/drivers/staging/tm6000/tm6000-usb-isoc.h
index a9e61d9..084c2a8 100644
--- a/drivers/staging/tm6000/tm6000-usb-isoc.h
+++ b/drivers/staging/tm6000/tm6000-usb-isoc.h
@@ -39,7 +39,7 @@ struct usb_isoc_ctl {
int pos, size, pktsize;
/* Last field: ODD or EVEN? */
- int vfield;
+ int vfield, field;
/* Stores incomplete commands */
u32 tmp_buf;
diff --git a/drivers/staging/tm6000/tm6000-video.c b/drivers/staging/tm6000/tm6000-video.c
index 4802396..4264064 100644
--- a/drivers/staging/tm6000/tm6000-video.c
+++ b/drivers/staging/tm6000/tm6000-video.c
@@ -334,6 +334,7 @@ static int copy_streams(u8 *data, unsigned long len,
size = dev->isoc_ctl.size;
pos = dev->isoc_ctl.pos;
pktsize = dev->isoc_ctl.pktsize;
+ field = dev->isoc_ctl.field;
}
cpysize = (endp - ptr > size) ? size : endp - ptr;
if (cpysize) {
@@ -359,7 +360,8 @@ static int copy_streams(u8 *data, unsigned long len,
/* Need some code to copy pts */
u32 pts;
pts = *(u32 *)ptr;
- printk(KERN_INFO "%s: field %d, PTS %x", dev->name, field, pts);
+ dprintk(dev, V4L2_DEBUG_ISOC, "field %d, PTS %x",
+ field, pts);
break;
}
}
@@ -371,6 +373,7 @@ static int copy_streams(u8 *data, unsigned long len,
dev->isoc_ctl.pos = pos + cpysize;
dev->isoc_ctl.size = size - cpysize;
dev->isoc_ctl.cmd = cmd;
+ dev->isoc_ctl.field = field;
dev->isoc_ctl.pktsize = pktsize - (endp - ptr);
ptr += endp - ptr;
} else {
--
1.7.4.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] tm6000: fix uninitialized field, change prink to dprintk
2011-05-21 6:05 [PATCH v2] tm6000: fix uninitialized field, change prink to dprintk stefan.ringel
@ 2011-05-21 10:46 ` Mauro Carvalho Chehab
0 siblings, 0 replies; 2+ messages in thread
From: Mauro Carvalho Chehab @ 2011-05-21 10:46 UTC (permalink / raw)
To: stefan.ringel; +Cc: linux-media, d.belimov
Em 21-05-2011 03:05, stefan.ringel@arcor.de escreveu:
> From: Stefan Ringel <stefan.ringel@arcor.de>
>
> fix uninitialized field, change prink to dprintk
Applied, thanks.
A quick note: please don't repeat the patch subject at the
first line of the body. It requires me to manually drop it
when importing the patch. Instead, put an useful description
about why and how are you doing such change.
Thanks,
Mauro.
>
>
> Signed-off-by: Stefan Ringel <stefan.ringel@arcor.de>
> ---
> drivers/staging/tm6000/tm6000-usb-isoc.h | 2 +-
> drivers/staging/tm6000/tm6000-video.c | 5 ++++-
> 2 files changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/tm6000/tm6000-usb-isoc.h b/drivers/staging/tm6000/tm6000-usb-isoc.h
> index a9e61d9..084c2a8 100644
> --- a/drivers/staging/tm6000/tm6000-usb-isoc.h
> +++ b/drivers/staging/tm6000/tm6000-usb-isoc.h
> @@ -39,7 +39,7 @@ struct usb_isoc_ctl {
> int pos, size, pktsize;
>
> /* Last field: ODD or EVEN? */
> - int vfield;
> + int vfield, field;
>
> /* Stores incomplete commands */
> u32 tmp_buf;
> diff --git a/drivers/staging/tm6000/tm6000-video.c b/drivers/staging/tm6000/tm6000-video.c
> index 4802396..4264064 100644
> --- a/drivers/staging/tm6000/tm6000-video.c
> +++ b/drivers/staging/tm6000/tm6000-video.c
> @@ -334,6 +334,7 @@ static int copy_streams(u8 *data, unsigned long len,
> size = dev->isoc_ctl.size;
> pos = dev->isoc_ctl.pos;
> pktsize = dev->isoc_ctl.pktsize;
> + field = dev->isoc_ctl.field;
> }
> cpysize = (endp - ptr > size) ? size : endp - ptr;
> if (cpysize) {
> @@ -359,7 +360,8 @@ static int copy_streams(u8 *data, unsigned long len,
> /* Need some code to copy pts */
> u32 pts;
> pts = *(u32 *)ptr;
> - printk(KERN_INFO "%s: field %d, PTS %x", dev->name, field, pts);
> + dprintk(dev, V4L2_DEBUG_ISOC, "field %d, PTS %x",
> + field, pts);
> break;
> }
> }
> @@ -371,6 +373,7 @@ static int copy_streams(u8 *data, unsigned long len,
> dev->isoc_ctl.pos = pos + cpysize;
> dev->isoc_ctl.size = size - cpysize;
> dev->isoc_ctl.cmd = cmd;
> + dev->isoc_ctl.field = field;
> dev->isoc_ctl.pktsize = pktsize - (endp - ptr);
> ptr += endp - ptr;
> } else {
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-05-21 10:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-21 6:05 [PATCH v2] tm6000: fix uninitialized field, change prink to dprintk stefan.ringel
2011-05-21 10:46 ` Mauro Carvalho Chehab
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox