diff options
Diffstat (limited to 'drivers/media/video/v4l2-common.c')
-rw-r--r-- | drivers/media/video/v4l2-common.c | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/drivers/media/video/v4l2-common.c b/drivers/media/video/v4l2-common.c index 035c414507a1..4e53b0b3339c 100644 --- a/drivers/media/video/v4l2-common.c +++ b/drivers/media/video/v4l2-common.c | |||
@@ -88,10 +88,9 @@ MODULE_LICENSE("GPL"); | |||
88 | val == V4L2_PRIORITY_INTERACTIVE || \ | 88 | val == V4L2_PRIORITY_INTERACTIVE || \ |
89 | val == V4L2_PRIORITY_RECORD) | 89 | val == V4L2_PRIORITY_RECORD) |
90 | 90 | ||
91 | int v4l2_prio_init(struct v4l2_prio_state *global) | 91 | void v4l2_prio_init(struct v4l2_prio_state *global) |
92 | { | 92 | { |
93 | memset(global,0,sizeof(*global)); | 93 | memset(global, 0, sizeof(*global)); |
94 | return 0; | ||
95 | } | 94 | } |
96 | EXPORT_SYMBOL(v4l2_prio_init); | 95 | EXPORT_SYMBOL(v4l2_prio_init); |
97 | 96 | ||
@@ -111,17 +110,16 @@ int v4l2_prio_change(struct v4l2_prio_state *global, enum v4l2_priority *local, | |||
111 | } | 110 | } |
112 | EXPORT_SYMBOL(v4l2_prio_change); | 111 | EXPORT_SYMBOL(v4l2_prio_change); |
113 | 112 | ||
114 | int v4l2_prio_open(struct v4l2_prio_state *global, enum v4l2_priority *local) | 113 | void v4l2_prio_open(struct v4l2_prio_state *global, enum v4l2_priority *local) |
115 | { | 114 | { |
116 | return v4l2_prio_change(global,local,V4L2_PRIORITY_DEFAULT); | 115 | v4l2_prio_change(global, local, V4L2_PRIORITY_DEFAULT); |
117 | } | 116 | } |
118 | EXPORT_SYMBOL(v4l2_prio_open); | 117 | EXPORT_SYMBOL(v4l2_prio_open); |
119 | 118 | ||
120 | int v4l2_prio_close(struct v4l2_prio_state *global, enum v4l2_priority *local) | 119 | void v4l2_prio_close(struct v4l2_prio_state *global, enum v4l2_priority local) |
121 | { | 120 | { |
122 | if (V4L2_PRIO_VALID(*local)) | 121 | if (V4L2_PRIO_VALID(local)) |
123 | atomic_dec(&global->prios[*local]); | 122 | atomic_dec(&global->prios[local]); |
124 | return 0; | ||
125 | } | 123 | } |
126 | EXPORT_SYMBOL(v4l2_prio_close); | 124 | EXPORT_SYMBOL(v4l2_prio_close); |
127 | 125 | ||
@@ -137,11 +135,9 @@ enum v4l2_priority v4l2_prio_max(struct v4l2_prio_state *global) | |||
137 | } | 135 | } |
138 | EXPORT_SYMBOL(v4l2_prio_max); | 136 | EXPORT_SYMBOL(v4l2_prio_max); |
139 | 137 | ||
140 | int v4l2_prio_check(struct v4l2_prio_state *global, enum v4l2_priority *local) | 138 | int v4l2_prio_check(struct v4l2_prio_state *global, enum v4l2_priority local) |
141 | { | 139 | { |
142 | if (*local < v4l2_prio_max(global)) | 140 | return (local < v4l2_prio_max(global)) ? -EBUSY : 0; |
143 | return -EBUSY; | ||
144 | return 0; | ||
145 | } | 141 | } |
146 | EXPORT_SYMBOL(v4l2_prio_check); | 142 | EXPORT_SYMBOL(v4l2_prio_check); |
147 | 143 | ||