summaryrefslogtreecommitdiff
path: root/mtdev/core.c
diff options
context:
space:
mode:
authorHenrik Rydberg <rydberg@euromail.se>2010-06-16 10:24:09 +0200
committerHenrik Rydberg <rydberg@euromail.se>2010-06-16 10:25:56 +0200
commit523d193b089111849873d9de0ec1bf29f4176fbc (patch)
treefc93888df4756d735e8357505e94bcd8193c9d00 /mtdev/core.c
parent4e9e4d494e094347e7617d39292cbbdd1c81eff1 (diff)
Correct mtdev API names
The mtdev queue api functions had wrong names. This patch changes them to the familiar put and get. Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Diffstat (limited to 'mtdev/core.c')
-rw-r--r--mtdev/core.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/mtdev/core.c b/mtdev/core.c
index c8eae37..f13da13 100644
--- a/mtdev/core.c
+++ b/mtdev/core.c
@@ -181,7 +181,7 @@ static int process_typeA(struct MTDev *dev,
181 int mtcnt = 0, size = 0; 181 int mtcnt = 0, size = 0;
182 prop[size] = 0; 182 prop[size] = 0;
183 while (!evbuf_empty(&dev->inbuf)) { 183 while (!evbuf_empty(&dev->inbuf)) {
184 evbuf_pop(&dev->inbuf, &ev); 184 evbuf_get(&dev->inbuf, &ev);
185 consumed = 0; 185 consumed = 0;
186 switch (ev.type) { 186 switch (ev.type) {
187 case EV_SYN: 187 case EV_SYN:
@@ -216,7 +216,7 @@ static int process_typeA(struct MTDev *dev,
216 break; 216 break;
217 } 217 }
218 if (!consumed) 218 if (!consumed)
219 evbuf_push(&dev->outbuf, &ev); 219 evbuf_put(&dev->outbuf, &ev);
220 } 220 }
221 return mtcnt ? size : -1; 221 return mtcnt ? size : -1;
222} 222}
@@ -232,8 +232,8 @@ static void process_typeB(struct MTDev *dev)
232{ 232{
233 struct input_event ev; 233 struct input_event ev;
234 while (!evbuf_empty(&dev->inbuf)) { 234 while (!evbuf_empty(&dev->inbuf)) {
235 evbuf_pop(&dev->inbuf, &ev); 235 evbuf_get(&dev->inbuf, &ev);
236 evbuf_push(&dev->outbuf, &ev); 236 evbuf_put(&dev->outbuf, &ev);
237 } 237 }
238} 238}
239 239
@@ -283,14 +283,14 @@ static void push_slot_changes(struct MTDev *dev,
283 ev.code = ABS_MT_SLOT; 283 ev.code = ABS_MT_SLOT;
284 ev.value = slot; 284 ev.value = slot;
285 if (priv->slot != ev.value) { 285 if (priv->slot != ev.value) {
286 evbuf_push(&dev->outbuf, &ev); 286 evbuf_put(&dev->outbuf, &ev);
287 priv->slot = ev.value; 287 priv->slot = ev.value;
288 } 288 }
289 foreach_bit(i, prop) { 289 foreach_bit(i, prop) {
290 ev.code = mt2abs(i); 290 ev.code = mt2abs(i);
291 ev.value = data->abs[i]; 291 ev.value = data->abs[i];
292 if (priv->data[slot].abs[i] != ev.value) { 292 if (priv->data[slot].abs[i] != ev.value) {
293 evbuf_push(&dev->outbuf, &ev); 293 evbuf_put(&dev->outbuf, &ev);
294 priv->data[slot].abs[i] = ev.value; 294 priv->data[slot].abs[i] = ev.value;
295 } 295 }
296 } 296 }
@@ -369,14 +369,14 @@ static void convert_A_to_B(struct MTDev *dev,
369} 369}
370 370
371/** 371/**
372 * mtdev_push - insert event into MT device 372 * mtdev_put - insert event into MT device
373 * @dev: MT device 373 * @dev: MT device
374 * @caps: device capabilities 374 * @caps: device capabilities
375 * @syn: reference to the SYN_REPORT event 375 * @syn: reference to the SYN_REPORT event
376 */ 376 */
377void mtdev_push(struct MTDev *dev, 377void mtdev_put(struct MTDev *dev,
378 const struct Capabilities *caps, 378 const struct Capabilities *caps,
379 const struct input_event *ev) 379 const struct input_event *ev)
380{ 380{
381 if (ev->type == EV_SYN && ev->code == SYN_REPORT) { 381 if (ev->type == EV_SYN && ev->code == SYN_REPORT) {
382 bitmask_t head = dev->outbuf.head; 382 bitmask_t head = dev->outbuf.head;
@@ -385,9 +385,9 @@ void mtdev_push(struct MTDev *dev,
385 else 385 else
386 process_typeB(dev); 386 process_typeB(dev);
387 if (dev->outbuf.head != head) 387 if (dev->outbuf.head != head)
388 evbuf_push(&dev->outbuf, ev); 388 evbuf_put(&dev->outbuf, ev);
389 } else { 389 } else {
390 evbuf_push(&dev->inbuf, ev); 390 evbuf_put(&dev->inbuf, ev);
391 } 391 }
392} 392}
393 393