Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 346979
b: refs/heads/master
c: a455e29
h: refs/heads/master
i:
  346977: ef0c971
  346975: 4ab5a43
v: v3
  • Loading branch information
Peter Popovec authored and Dmitry Torokhov committed Dec 17, 2012
1 parent b0e6a2e commit 8773870
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: da5ee074ce8e07b9a91596de3576b59990c0c8c6
refs/heads/master: a455e2985f57e2a71566bb8850094af38b2c932d
7 changes: 4 additions & 3 deletions trunk/drivers/input/joystick/walkera0701.c
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ static void walkera0701_close(struct input_dev *dev)
struct walkera_dev *w = input_get_drvdata(dev);

parport_disable_irq(w->parport);
hrtimer_cancel(&w->timer);
}

static int walkera0701_connect(struct walkera_dev *w, int parport)
Expand Down Expand Up @@ -224,6 +225,9 @@ static int walkera0701_connect(struct walkera_dev *w, int parport)
if (parport_claim(w->pardevice))
goto init_err1;

hrtimer_init(&w->timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
w->timer.function = timer_handler;

w->input_dev = input_allocate_device();
if (!w->input_dev)
goto init_err2;
Expand Down Expand Up @@ -254,8 +258,6 @@ static int walkera0701_connect(struct walkera_dev *w, int parport)
if (err)
goto init_err3;

hrtimer_init(&w->timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
w->timer.function = timer_handler;
return 0;

init_err3:
Expand All @@ -271,7 +273,6 @@ static int walkera0701_connect(struct walkera_dev *w, int parport)

static void walkera0701_disconnect(struct walkera_dev *w)
{
hrtimer_cancel(&w->timer);
input_unregister_device(w->input_dev);
parport_release(w->pardevice);
parport_unregister_device(w->pardevice);
Expand Down

0 comments on commit 8773870

Please sign in to comment.