diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2015-03-13 06:00:07 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-04-02 17:24:04 -0400 |
commit | 27eb5e24e0d6f4e3be236e861475ed3aacd3c6d2 (patch) | |
tree | c916b6d5ca82543eee584a1f005324910bb859b8 | |
parent | 78e9b7de78bb53e8bc7f4c4a60ebacb250c0c190 (diff) |
[media] cx231xx: fix compiler warnings
If CONFIG_VIDEO_CX231XX_RC is undefined, then these compiler warnings
are generated:
In file included from drivers/media/usb/cx231xx/cx231xx-cards.c:23:0:
drivers/media/usb/cx231xx/cx231xx-cards.c: In function ‘cx231xx_release_resources’:
drivers/media/usb/cx231xx/cx231xx.h:982:30: warning: statement with no effect [-Wunused-value]
#define cx231xx_ir_exit(dev) (0)
^
drivers/media/usb/cx231xx/cx231xx-cards.c:1158:2: note: in expansion of macro ‘cx231xx_ir_exit’
cx231xx_ir_exit(dev);
^
drivers/media/usb/cx231xx/cx231xx-cards.c: In function ‘cx231xx_init_dev’:
drivers/media/usb/cx231xx/cx231xx.h:981:30: warning: statement with no effect [-Wunused-value]
#define cx231xx_ir_init(dev) (0)
^
drivers/media/usb/cx231xx/cx231xx-cards.c:1351:2: note: in expansion of macro ‘cx231xx_ir_init’
cx231xx_ir_init(dev);
^
drivers/media/usb/cx231xx/cx231xx-cards.c: In function ‘cx231xx_usb_probe’:
drivers/media/usb/cx231xx/cx231xx.h:982:30: warning: statement with no effect [-Wunused-value]
#define cx231xx_ir_exit(dev) (0)
^
drivers/media/usb/cx231xx/cx231xx-cards.c:1705:2: note: in expansion of macro ‘cx231xx_ir_exit’
cx231xx_ir_exit(dev);
^
drivers/media/usb/cx231xx/cx231xx-cards.c: In function ‘cx231xx_usb_disconnect’:
drivers/media/usb/cx231xx/cx231xx.h:982:30: warning: statement with no effect [-Wunused-value]
#define cx231xx_ir_exit(dev) (0)
^
drivers/media/usb/cx231xx/cx231xx-cards.c:1754:3: note: in expansion of macro ‘cx231xx_ir_exit’
cx231xx_ir_exit(dev);
^
Fix by using static inlines instead of defines.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-rw-r--r-- | drivers/media/usb/cx231xx/cx231xx.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/media/usb/cx231xx/cx231xx.h b/drivers/media/usb/cx231xx/cx231xx.h index 573b3c036a65..9871c79f88ff 100644 --- a/drivers/media/usb/cx231xx/cx231xx.h +++ b/drivers/media/usb/cx231xx/cx231xx.h | |||
@@ -978,8 +978,11 @@ extern void cx231xx_417_unregister(struct cx231xx *dev); | |||
978 | int cx231xx_ir_init(struct cx231xx *dev); | 978 | int cx231xx_ir_init(struct cx231xx *dev); |
979 | void cx231xx_ir_exit(struct cx231xx *dev); | 979 | void cx231xx_ir_exit(struct cx231xx *dev); |
980 | #else | 980 | #else |
981 | #define cx231xx_ir_init(dev) (0) | 981 | static inline int cx231xx_ir_init(struct cx231xx *dev) |
982 | #define cx231xx_ir_exit(dev) (0) | 982 | { |
983 | return 0; | ||
984 | } | ||
985 | static inline void cx231xx_ir_exit(struct cx231xx *dev) {} | ||
983 | #endif | 986 | #endif |
984 | 987 | ||
985 | static inline unsigned int norm_maxw(struct cx231xx *dev) | 988 | static inline unsigned int norm_maxw(struct cx231xx *dev) |