public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] V4L/DVB: fix v4l2_device_call_all/v4l2_device_call_until_err macro
@ 2009-01-22 14:14 Roel Kluin
  0 siblings, 0 replies; 2+ messages in thread
From: Roel Kluin @ 2009-01-22 14:14 UTC (permalink / raw)
  To: Mauro Carvalho Chehab; +Cc: linux-media, video4linux-list, lkml

When these macros aren't called with 'grp_id' this will result in a
build failure.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
diff --git a/include/media/v4l2-device.h b/include/media/v4l2-device.h
index 9bf4ccc..ad86caa 100644
--- a/include/media/v4l2-device.h
+++ b/include/media/v4l2-device.h
@@ -94,16 +94,16 @@ void v4l2_device_unregister_subdev(struct v4l2_subdev *sd);
 /* Call the specified callback for all subdevs matching grp_id (if 0, then
    match them all). Ignore any errors. Note that you cannot add or delete
    a subdev while walking the subdevs list. */
-#define v4l2_device_call_all(dev, grp_id, o, f, args...) 		\
+#define v4l2_device_call_all(dev, _grp_id, o, f, args...) 		\
 	__v4l2_device_call_subdevs(dev, 				\
-			!(grp_id) || sd->grp_id == (grp_id), o, f , ##args)
+			!(_grp_id) || sd->grp_id == (_grp_id), o, f , ##args)
 
 /* Call the specified callback for all subdevs matching grp_id (if 0, then
    match them all). If the callback returns an error other than 0 or
    -ENOIOCTLCMD, then return with that error code. Note that you cannot
    add or delete a subdev while walking the subdevs list. */
-#define v4l2_device_call_until_err(dev, grp_id, o, f, args...) 		\
+#define v4l2_device_call_until_err(dev, _grp_id, o, f, args...) 		\
 	__v4l2_device_call_subdevs_until_err(dev,			\
-		       !(grp_id) || sd->grp_id == (grp_id), o, f , ##args)
+		       !(_grp_id) || sd->grp_id == (_grp_id), o, f , ##args)
 
 #endif


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

* Re: [PATCH] V4L/DVB: fix v4l2_device_call_all/v4l2_device_call_until_err macro
@ 2009-01-22 14:49 Hans Verkuil
  0 siblings, 0 replies; 2+ messages in thread
From: Hans Verkuil @ 2009-01-22 14:49 UTC (permalink / raw)
  To: Roel Kluin; +Cc: Mauro Carvalho Chehab, linux-media, video4linux-list, lkml


> When these macros aren't called with 'grp_id' this will result in a
> build failure.

Hi Roel,

Thanks, however it is fixed already in the v4l-dvb repo so it should
appear upstream as soon as Mauro prepares the next pull request.

Regards,

       Hans

>
> Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
> ---
> diff --git a/include/media/v4l2-device.h b/include/media/v4l2-device.h
> index 9bf4ccc..ad86caa 100644
> --- a/include/media/v4l2-device.h
> +++ b/include/media/v4l2-device.h
> @@ -94,16 +94,16 @@ void v4l2_device_unregister_subdev(struct v4l2_subdev
> *sd);
>  /* Call the specified callback for all subdevs matching grp_id (if 0,
> then
>     match them all). Ignore any errors. Note that you cannot add or delete
>     a subdev while walking the subdevs list. */
> -#define v4l2_device_call_all(dev, grp_id, o, f, args...) 		\
> +#define v4l2_device_call_all(dev, _grp_id, o, f, args...) 		\
>  	__v4l2_device_call_subdevs(dev, 				\
> -			!(grp_id) || sd->grp_id == (grp_id), o, f , ##args)
> +			!(_grp_id) || sd->grp_id == (_grp_id), o, f , ##args)
>
>  /* Call the specified callback for all subdevs matching grp_id (if 0,
> then
>     match them all). If the callback returns an error other than 0 or
>     -ENOIOCTLCMD, then return with that error code. Note that you cannot
>     add or delete a subdev while walking the subdevs list. */
> -#define v4l2_device_call_until_err(dev, grp_id, o, f, args...) 		\
> +#define v4l2_device_call_until_err(dev, _grp_id, o, f, args...) 		\
>  	__v4l2_device_call_subdevs_until_err(dev,			\
> -		       !(grp_id) || sd->grp_id == (grp_id), o, f , ##args)
> +		       !(_grp_id) || sd->grp_id == (_grp_id), o, f , ##args)
>
>  #endif
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-media" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>


-- 
Hans Verkuil - video4linux developer - sponsored by TANDBERG


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

end of thread, other threads:[~2009-01-22 14:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-22 14:14 [PATCH] V4L/DVB: fix v4l2_device_call_all/v4l2_device_call_until_err macro Roel Kluin
  -- strict thread matches above, loose matches on Subject: below --
2009-01-22 14:49 Hans Verkuil

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