aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/et61x251/et61x251.h
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2011-08-21 18:56:50 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-09-03 20:11:59 -0400
commit857011e4d9bf47b39abcc89541a58c56e4df34be (patch)
treee9a70a5e2f5ecdac5fcff63913ad035678095ea4 /drivers/media/video/et61x251/et61x251.h
parent8af443e581ab57a6a38f595eb40be3514ea55195 (diff)
[media] et61x251: Use current logging styles
Add pr_fmt and convert printks to pr_<level> Remove explicit prefixes from logging messages. One of the prefixes was defective, a copy/paste error. Use ##__VA_ARGS__ for variadic macros. Whitespace neatening. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/et61x251/et61x251.h')
-rw-r--r--drivers/media/video/et61x251/et61x251.h66
1 files changed, 35 insertions, 31 deletions
diff --git a/drivers/media/video/et61x251/et61x251.h b/drivers/media/video/et61x251/et61x251.h
index 14bb907d650e..337ded4a6388 100644
--- a/drivers/media/video/et61x251/et61x251.h
+++ b/drivers/media/video/et61x251/et61x251.h
@@ -165,45 +165,49 @@ et61x251_attach_sensor(struct et61x251_device* cam,
165#undef DBG 165#undef DBG
166#undef KDBG 166#undef KDBG
167#ifdef ET61X251_DEBUG 167#ifdef ET61X251_DEBUG
168# define DBG(level, fmt, args...) \ 168#define DBG(level, fmt, ...) \
169do { \ 169do { \
170 if (debug >= (level)) { \ 170 if (debug >= (level)) { \
171 if ((level) == 1) \ 171 if ((level) == 1) \
172 dev_err(&cam->usbdev->dev, fmt "\n", ## args); \ 172 dev_err(&cam->usbdev->dev, fmt "\n", \
173 else if ((level) == 2) \ 173 ##__VA_ARGS__); \
174 dev_info(&cam->usbdev->dev, fmt "\n", ## args); \ 174 else if ((level) == 2) \
175 else if ((level) >= 3) \ 175 dev_info(&cam->usbdev->dev, fmt "\n", \
176 dev_info(&cam->usbdev->dev, "[%s:%s:%d] " fmt "\n", \ 176 ##__VA_ARGS__); \
177 __FILE__, __func__, __LINE__ , ## args); \ 177 else if ((level) >= 3) \
178 } \ 178 dev_info(&cam->usbdev->dev, "[%s:%s:%d] " fmt "\n", \
179 __FILE__, __func__, __LINE__, \
180 ##__VA_ARGS__); \
181 } \
179} while (0) 182} while (0)
180# define KDBG(level, fmt, args...) \ 183#define KDBG(level, fmt, ...) \
181do { \ 184do { \
182 if (debug >= (level)) { \ 185 if (debug >= (level)) { \
183 if ((level) == 1 || (level) == 2) \ 186 if ((level) == 1 || (level) == 2) \
184 pr_info("et61x251: " fmt "\n", ## args); \ 187 pr_info(fmt "\n", ##__VA_ARGS__); \
185 else if ((level) == 3) \ 188 else if ((level) == 3) \
186 pr_debug("sn9c102: [%s:%s:%d] " fmt "\n", __FILE__, \ 189 pr_debug("[%s:%s:%d] " fmt "\n", \
187 __func__, __LINE__ , ## args); \ 190 __FILE__, __func__, __LINE__, \
188 } \ 191 ##__VA_ARGS__); \
192 } \
189} while (0) 193} while (0)
190# define V4LDBG(level, name, cmd) \ 194#define V4LDBG(level, name, cmd) \
191do { \ 195do { \
192 if (debug >= (level)) \ 196 if (debug >= (level)) \
193 v4l_print_ioctl(name, cmd); \ 197 v4l_print_ioctl(name, cmd); \
194} while (0) 198} while (0)
195#else 199#else
196# define DBG(level, fmt, args...) do {;} while(0) 200#define DBG(level, fmt, ...) do {;} while(0)
197# define KDBG(level, fmt, args...) do {;} while(0) 201#define KDBG(level, fmt, ...) do {;} while(0)
198# define V4LDBG(level, name, cmd) do {;} while(0) 202#define V4LDBG(level, name, cmd) do {;} while(0)
199#endif 203#endif
200 204
201#undef PDBG 205#undef PDBG
202#define PDBG(fmt, args...) \ 206#define PDBG(fmt, ...) \
203dev_info(&cam->usbdev->dev, "[%s:%s:%d] " fmt "\n", __FILE__, __func__, \ 207 dev_info(&cam->usbdev->dev, "[%s:%s:%d] " fmt "\n", \
204 __LINE__ , ## args) 208 __FILE__, __func__, __LINE__, ##__VA_ARGS__)
205 209
206#undef PDBGG 210#undef PDBGG
207#define PDBGG(fmt, args...) do {;} while(0) /* placeholder */ 211#define PDBGG(fmt, args...) do {;} while (0) /* placeholder */
208 212
209#endif /* _ET61X251_H_ */ 213#endif /* _ET61X251_H_ */