aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/ivtv/ivtv-driver.h
diff options
context:
space:
mode:
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>2010-08-12 16:16:00 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-10-20 23:04:48 -0400
commit6c2d4dd139de417d18151b98c157aa35387038a3 (patch)
tree747e5076eced841d914895e19e66c0743cf10484 /drivers/media/video/ivtv/ivtv-driver.h
parent7a569f524dd36806b995c844f29e28ff40c444b2 (diff)
V4L/DVB: V4L2: avoid name conflicts in macros
"sd" and "err" are too common names to be used in macros for local variables. Prefix them with an underscore to avoid name clashing. [mchehab@redhat.com: whitespace cleanups] Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Reviewed-by: Andy Walls <awalls@md.metrocast.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/ivtv/ivtv-driver.h')
-rw-r--r--drivers/media/video/ivtv/ivtv-driver.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/drivers/media/video/ivtv/ivtv-driver.h b/drivers/media/video/ivtv/ivtv-driver.h
index 75803141481e..04bacdbd10bb 100644
--- a/drivers/media/video/ivtv/ivtv-driver.h
+++ b/drivers/media/video/ivtv/ivtv-driver.h
@@ -811,15 +811,23 @@ static inline int ivtv_raw_vbi(const struct ivtv *itv)
811/* Call the specified callback for all subdevs matching hw (if 0, then 811/* Call the specified callback for all subdevs matching hw (if 0, then
812 match them all). Ignore any errors. */ 812 match them all). Ignore any errors. */
813#define ivtv_call_hw(itv, hw, o, f, args...) \ 813#define ivtv_call_hw(itv, hw, o, f, args...) \
814 __v4l2_device_call_subdevs(&(itv)->v4l2_dev, !(hw) || (sd->grp_id & (hw)), o, f , ##args) 814 do { \
815 struct v4l2_subdev *__sd; \
816 __v4l2_device_call_subdevs_p(&(itv)->v4l2_dev, __sd, \
817 !(hw) || (__sd->grp_id & (hw)), o, f , ##args); \
818 } while (0)
815 819
816#define ivtv_call_all(itv, o, f, args...) ivtv_call_hw(itv, 0, o, f , ##args) 820#define ivtv_call_all(itv, o, f, args...) ivtv_call_hw(itv, 0, o, f , ##args)
817 821
818/* Call the specified callback for all subdevs matching hw (if 0, then 822/* Call the specified callback for all subdevs matching hw (if 0, then
819 match them all). If the callback returns an error other than 0 or 823 match them all). If the callback returns an error other than 0 or
820 -ENOIOCTLCMD, then return with that error code. */ 824 -ENOIOCTLCMD, then return with that error code. */
821#define ivtv_call_hw_err(itv, hw, o, f, args...) \ 825#define ivtv_call_hw_err(itv, hw, o, f, args...) \
822 __v4l2_device_call_subdevs_until_err(&(itv)->v4l2_dev, !(hw) || (sd->grp_id & (hw)), o, f , ##args) 826({ \
827 struct v4l2_subdev *__sd; \
828 __v4l2_device_call_subdevs_until_err_p(&(itv)->v4l2_dev, __sd, \
829 !(hw) || (__sd->grp_id & (hw)), o, f , ##args); \
830})
823 831
824#define ivtv_call_all_err(itv, o, f, args...) ivtv_call_hw_err(itv, 0, o, f , ##args) 832#define ivtv_call_all_err(itv, o, f, args...) ivtv_call_hw_err(itv, 0, o, f , ##args)
825 833