diff options
Diffstat (limited to 'include/media/v4l2-common.h')
| -rw-r--r-- | include/media/v4l2-common.h | 31 |
1 files changed, 12 insertions, 19 deletions
diff --git a/include/media/v4l2-common.h b/include/media/v4l2-common.h index 020d05758bd8..07d3a9a575d1 100644 --- a/include/media/v4l2-common.h +++ b/include/media/v4l2-common.h | |||
| @@ -28,12 +28,6 @@ | |||
| 28 | 28 | ||
| 29 | #include <media/v4l2-dev.h> | 29 | #include <media/v4l2-dev.h> |
| 30 | 30 | ||
| 31 | /* v4l debugging and diagnostics */ | ||
| 32 | |||
| 33 | /* Debug bitmask flags to be used on V4L2 */ | ||
| 34 | #define V4L2_DEBUG_IOCTL 0x01 | ||
| 35 | #define V4L2_DEBUG_IOCTL_ARG 0x02 | ||
| 36 | |||
| 37 | /* Common printk constucts for v4l-i2c drivers. These macros create a unique | 31 | /* Common printk constucts for v4l-i2c drivers. These macros create a unique |
| 38 | prefix consisting of the driver name, the adapter number and the i2c | 32 | prefix consisting of the driver name, the adapter number and the i2c |
| 39 | address. */ | 33 | address. */ |
| @@ -61,21 +55,20 @@ | |||
| 61 | v4l_client_printk(KERN_DEBUG, client, fmt , ## arg); \ | 55 | v4l_client_printk(KERN_DEBUG, client, fmt , ## arg); \ |
| 62 | } while (0) | 56 | } while (0) |
| 63 | 57 | ||
| 58 | /* ------------------------------------------------------------------------- */ | ||
| 64 | 59 | ||
| 65 | /* Use this macro for non-I2C drivers. Pass the driver name as the first arg. */ | 60 | /* Priority helper functions */ |
| 66 | #define v4l_print_ioctl(name, cmd) \ | ||
| 67 | do { \ | ||
| 68 | printk(KERN_DEBUG "%s: ", name); \ | ||
| 69 | v4l_printk_ioctl(cmd); \ | ||
| 70 | } while (0) | ||
| 71 | 61 | ||
| 72 | /* Use this macro in I2C drivers where 'client' is the struct i2c_client | 62 | struct v4l2_prio_state { |
| 73 | pointer */ | 63 | atomic_t prios[4]; |
| 74 | #define v4l_i2c_print_ioctl(client, cmd) \ | 64 | }; |
| 75 | do { \ | 65 | int v4l2_prio_init(struct v4l2_prio_state *global); |
| 76 | v4l_client_printk(KERN_DEBUG, client, ""); \ | 66 | int v4l2_prio_change(struct v4l2_prio_state *global, enum v4l2_priority *local, |
| 77 | v4l_printk_ioctl(cmd); \ | 67 | enum v4l2_priority new); |
| 78 | } while (0) | 68 | int v4l2_prio_open(struct v4l2_prio_state *global, enum v4l2_priority *local); |
| 69 | int v4l2_prio_close(struct v4l2_prio_state *global, enum v4l2_priority *local); | ||
| 70 | enum v4l2_priority v4l2_prio_max(struct v4l2_prio_state *global); | ||
| 71 | int v4l2_prio_check(struct v4l2_prio_state *global, enum v4l2_priority *local); | ||
| 79 | 72 | ||
| 80 | /* ------------------------------------------------------------------------- */ | 73 | /* ------------------------------------------------------------------------- */ |
| 81 | 74 | ||
