diff mbox

V4L2: avoid name conflicts in macros

Message ID Pine.LNX.4.64.1007261738380.9816@axis700.grange (mailing list archive)
State Accepted
Headers show

Commit Message

Guennadi Liakhovetski July 26, 2010, 3:39 p.m. UTC
None
diff mbox

Patch

diff --git a/include/media/v4l2-device.h b/include/media/v4l2-device.h
index 5d5d550..aaa9f00 100644
--- a/include/media/v4l2-device.h
+++ b/include/media/v4l2-device.h
@@ -99,11 +99,11 @@  void v4l2_device_unregister_subdev(struct v4l2_subdev *sd);
    while walking the subdevs list. */
 #define __v4l2_device_call_subdevs(v4l2_dev, cond, o, f, args...) 	\
 	do { 								\
-		struct v4l2_subdev *sd; 				\
+		struct v4l2_subdev *__sd; 				\
 									\
-		list_for_each_entry(sd, &(v4l2_dev)->subdevs, list)   	\
-			if ((cond) && sd->ops->o && sd->ops->o->f) 	\
-				sd->ops->o->f(sd , ##args); 		\
+		list_for_each_entry(__sd, &(v4l2_dev)->subdevs, list)   \
+			if ((cond) && __sd->ops->o && __sd->ops->o->f) 	\
+				__sd->ops->o->f(__sd , ##args); 	\
 	} while (0)
 
 /* Call the specified callback for all subdevs matching the condition.
@@ -112,16 +112,16 @@  void v4l2_device_unregister_subdev(struct v4l2_subdev *sd);
    subdev while walking the subdevs list. */
 #define __v4l2_device_call_subdevs_until_err(v4l2_dev, cond, o, f, args...) \
 ({ 									\
-	struct v4l2_subdev *sd; 					\
-	long err = 0; 							\
+	struct v4l2_subdev *__sd; 					\
+	long __err = 0;							\
 									\
-	list_for_each_entry(sd, &(v4l2_dev)->subdevs, list) { 		\
-		if ((cond) && sd->ops->o && sd->ops->o->f) 		\
-			err = sd->ops->o->f(sd , ##args); 		\
-		if (err && err != -ENOIOCTLCMD)				\
+	list_for_each_entry(__sd, &(v4l2_dev)->subdevs, list) { 	\
+		if ((cond) && __sd->ops->o && __sd->ops->o->f) 		\
+			__err = __sd->ops->o->f(__sd , ##args); 	\
+		if (__err && __err != -ENOIOCTLCMD)			\
 			break; 						\
 	} 								\
-	(err == -ENOIOCTLCMD) ? 0 : err; 				\
+	(__err == -ENOIOCTLCMD) ? 0 : __err; 				\
 })
 
 /* Call the specified callback for all subdevs matching grp_id (if 0, then