Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 177089
b: refs/heads/master
c: 18f7ad5
h: refs/heads/master
i:
  177087: dc48cf8
v: v3
  • Loading branch information
Dmitry Torokhov committed Dec 16, 2009
1 parent 429c84b commit dce7d84
Show file tree
Hide file tree
Showing 2 changed files with 8 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: 909275bc1b42b4f4505ccbe193b111e9d1c5816f
refs/heads/master: 18f7ad59b0ef341fb9390cb79b2a39707c48257d
10 changes: 7 additions & 3 deletions trunk/drivers/char/keyboard.c
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,8 @@ int setkeycode(unsigned int scancode, unsigned int keycode)
}

/*
* Making beeps and bells.
* Making beeps and bells. Note that we prefer beeps to bells, but when
* shutting the sound off we do both.
*/

static int kd_sound_helper(struct input_handle *handle, void *data)
Expand All @@ -242,9 +243,12 @@ static int kd_sound_helper(struct input_handle *handle, void *data)
struct input_dev *dev = handle->dev;

if (test_bit(EV_SND, dev->evbit)) {
if (test_bit(SND_TONE, dev->sndbit))
if (test_bit(SND_TONE, dev->sndbit)) {
input_inject_event(handle, EV_SND, SND_TONE, *hz);
if (test_bit(SND_BELL, handle->dev->sndbit))
if (*hz)
return 0;
}
if (test_bit(SND_BELL, dev->sndbit))
input_inject_event(handle, EV_SND, SND_BELL, *hz ? 1 : 0);
}

Expand Down

0 comments on commit dce7d84

Please sign in to comment.