mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] [media] cpia2: fix typo in variable initialisation
@ 2011-03-26 18:20 Mariusz Kozlowski
  2011-03-26 18:28 ` Hans Verkuil
  0 siblings, 1 reply; 2+ messages in thread
From: Mariusz Kozlowski @ 2011-03-26 18:20 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: Hans Verkuil, linux-media, linux-kernel, Mariusz Kozlowski

Currently 'fh' initialises to whatever happens to be on stack. This
looks like a typo and this patch fixes that.

Signed-off-by: Mariusz Kozlowski <mk@lab.zgora.pl>
---
 drivers/media/video/cpia2/cpia2_v4l.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/media/video/cpia2/cpia2_v4l.c b/drivers/media/video/cpia2/cpia2_v4l.c
index 5111bbc..0073a8c 100644
--- a/drivers/media/video/cpia2/cpia2_v4l.c
+++ b/drivers/media/video/cpia2/cpia2_v4l.c
@@ -1313,7 +1313,7 @@ static int cpia2_g_priority(struct file *file, void *_fh, enum v4l2_priority *p)
 static int cpia2_s_priority(struct file *file, void *_fh, enum v4l2_priority prio)
 {
 	struct camera_data *cam = video_drvdata(file);
-	struct cpia2_fh *fh = fh;
+	struct cpia2_fh *fh = _fh;
 
 	if (cam->streaming && prio != fh->prio &&
 			fh->prio == V4L2_PRIORITY_RECORD)
-- 
1.7.0.4


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] [media] cpia2: fix typo in variable initialisation
  2011-03-26 18:20 [PATCH] [media] cpia2: fix typo in variable initialisation Mariusz Kozlowski
@ 2011-03-26 18:28 ` Hans Verkuil
  0 siblings, 0 replies; 2+ messages in thread
From: Hans Verkuil @ 2011-03-26 18:28 UTC (permalink / raw)
  To: Mariusz Kozlowski; +Cc: Mauro Carvalho Chehab, linux-media, linux-kernel

Hi Mariusz,

On Saturday, March 26, 2011 19:20:24 Mariusz Kozlowski wrote:
> Currently 'fh' initialises to whatever happens to be on stack. This
> looks like a typo and this patch fixes that.
> 
> Signed-off-by: Mariusz Kozlowski <mk@lab.zgora.pl>

If you don't mind then I'll take this patch. Although I'll probably drop it,
not because it is wrong as such but because the priority handling in cpia2
is broken big time. I intend to rewrite it using the new prio framework that
was just merged.

Luckily I finally found someone who can test this driver, so that should be
very helpful.

I hope to work on this next weekend.

Regards,

	Hans

> ---
>  drivers/media/video/cpia2/cpia2_v4l.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/media/video/cpia2/cpia2_v4l.c b/drivers/media/video/cpia2/cpia2_v4l.c
> index 5111bbc..0073a8c 100644
> --- a/drivers/media/video/cpia2/cpia2_v4l.c
> +++ b/drivers/media/video/cpia2/cpia2_v4l.c
> @@ -1313,7 +1313,7 @@ static int cpia2_g_priority(struct file *file, void *_fh, enum v4l2_priority *p)
>  static int cpia2_s_priority(struct file *file, void *_fh, enum v4l2_priority prio)
>  {
>  	struct camera_data *cam = video_drvdata(file);
> -	struct cpia2_fh *fh = fh;
> +	struct cpia2_fh *fh = _fh;
>  
>  	if (cam->streaming && prio != fh->prio &&
>  			fh->prio == V4L2_PRIORITY_RECORD)
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-03-26 18:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-26 18:20 [PATCH] [media] cpia2: fix typo in variable initialisation Mariusz Kozlowski
2011-03-26 18:28 ` Hans Verkuil

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®