diff options
author | Guennadi Liakhovetski <g.liakhovetski@gmx.de> | 2010-08-12 16:16:00 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-10-20 23:04:48 -0400 |
commit | 6c2d4dd139de417d18151b98c157aa35387038a3 (patch) | |
tree | 747e5076eced841d914895e19e66c0743cf10484 /drivers/media/video/cx18/cx18-driver.h | |
parent | 7a569f524dd36806b995c844f29e28ff40c444b2 (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/cx18/cx18-driver.h')
-rw-r--r-- | drivers/media/video/cx18/cx18-driver.h | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/drivers/media/video/cx18/cx18-driver.h b/drivers/media/video/cx18/cx18-driver.h index 9bc51a99376b..77be58c1096b 100644 --- a/drivers/media/video/cx18/cx18-driver.h +++ b/drivers/media/video/cx18/cx18-driver.h | |||
@@ -674,18 +674,25 @@ static inline int cx18_raw_vbi(const struct cx18 *cx) | |||
674 | 674 | ||
675 | /* Call the specified callback for all subdevs with a grp_id bit matching the | 675 | /* Call the specified callback for all subdevs with a grp_id bit matching the |
676 | * mask in hw (if 0, then match them all). Ignore any errors. */ | 676 | * mask in hw (if 0, then match them all). Ignore any errors. */ |
677 | #define cx18_call_hw(cx, hw, o, f, args...) \ | 677 | #define cx18_call_hw(cx, hw, o, f, args...) \ |
678 | __v4l2_device_call_subdevs(&(cx)->v4l2_dev, \ | 678 | do { \ |
679 | !(hw) || (sd->grp_id & (hw)), o, f , ##args) | 679 | struct v4l2_subdev *__sd; \ |
680 | __v4l2_device_call_subdevs_p(&(cx)->v4l2_dev, __sd, \ | ||
681 | !(hw) || (__sd->grp_id & (hw)), o, f , ##args); \ | ||
682 | } while (0) | ||
680 | 683 | ||
681 | #define cx18_call_all(cx, o, f, args...) cx18_call_hw(cx, 0, o, f , ##args) | 684 | #define cx18_call_all(cx, o, f, args...) cx18_call_hw(cx, 0, o, f , ##args) |
682 | 685 | ||
683 | /* Call the specified callback for all subdevs with a grp_id bit matching the | 686 | /* Call the specified callback for all subdevs with a grp_id bit matching the |
684 | * mask in hw (if 0, then match them all). If the callback returns an error | 687 | * mask in hw (if 0, then match them all). If the callback returns an error |
685 | * other than 0 or -ENOIOCTLCMD, then return with that error code. */ | 688 | * other than 0 or -ENOIOCTLCMD, then return with that error code. */ |
686 | #define cx18_call_hw_err(cx, hw, o, f, args...) \ | 689 | #define cx18_call_hw_err(cx, hw, o, f, args...) \ |
687 | __v4l2_device_call_subdevs_until_err( \ | 690 | ({ \ |
688 | &(cx)->v4l2_dev, !(hw) || (sd->grp_id & (hw)), o, f , ##args) | 691 | struct v4l2_subdev *__sd; \ |
692 | __v4l2_device_call_subdevs_until_err_p(&(cx)->v4l2_dev, \ | ||
693 | __sd, !(hw) || (__sd->grp_id & (hw)), o, f, \ | ||
694 | ##args); \ | ||
695 | }) | ||
689 | 696 | ||
690 | #define cx18_call_all_err(cx, o, f, args...) \ | 697 | #define cx18_call_all_err(cx, o, f, args...) \ |
691 | cx18_call_hw_err(cx, 0, o, f , ##args) | 698 | cx18_call_hw_err(cx, 0, o, f , ##args) |