Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1568523 > unrolled thread
| Started by | Benjamin Tissoires <benjamin.tissoires@redhat.com> |
|---|---|
| First post | 2017-01-27 18:20 +0100 |
| Last post | 2017-01-27 18:20 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 1/4] tty/vt/keyboard: use defined macros for masks Benjamin Tissoires <benjamin.tissoires@redhat.com> - 2017-01-27 18:20 +0100
Re: [PATCH 1/4] tty/vt/keyboard: use defined macros for masks Samuel Thibault <samuel.thibault@ens-lyon.org> - 2017-01-27 18:20 +0100
| From | Benjamin Tissoires <benjamin.tissoires@redhat.com> |
|---|---|
| Date | 2017-01-27 18:20 +0100 |
| Subject | [PATCH 1/4] tty/vt/keyboard: use defined macros for masks |
| Message-ID | <t4ilP-6Xe-17@gated-at.bofh.it> |
Better using the defined macros to express the bit masks.
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
---
drivers/tty/vt/keyboard.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/tty/vt/keyboard.c b/drivers/tty/vt/keyboard.c
index 3dd6a49..4a3907e 100644
--- a/drivers/tty/vt/keyboard.c
+++ b/drivers/tty/vt/keyboard.c
@@ -1044,9 +1044,9 @@ static int kbd_update_leds_helper(struct input_handle *handle, void *data)
unsigned int leds = *(unsigned int *)data;
if (test_bit(EV_LED, handle->dev->evbit)) {
- input_inject_event(handle, EV_LED, LED_SCROLLL, !!(leds & 0x01));
- input_inject_event(handle, EV_LED, LED_NUML, !!(leds & 0x02));
- input_inject_event(handle, EV_LED, LED_CAPSL, !!(leds & 0x04));
+ input_inject_event(handle, EV_LED, LED_SCROLLL, !!(leds & BIT(VC_SCROLLOCK)));
+ input_inject_event(handle, EV_LED, LED_NUML, !!(leds & BIT(VC_NUMLOCK)));
+ input_inject_event(handle, EV_LED, LED_CAPSL, !!(leds & BIT(VC_CAPSLOCK)));
input_inject_event(handle, EV_SYN, SYN_REPORT, 0);
}
--
2.9.3
[toc] | [next] | [standalone]
| From | Samuel Thibault <samuel.thibault@ens-lyon.org> |
|---|---|
| Date | 2017-01-27 18:20 +0100 |
| Message-ID | <t4ilQ-6Xe-39@gated-at.bofh.it> |
| In reply to | #1568523 |
Benjamin Tissoires, on Fri 27 Jan 2017 18:13:15 +0100, wrote:
> Better using the defined macros to express the bit masks.
>
> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
> ---
> drivers/tty/vt/keyboard.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/tty/vt/keyboard.c b/drivers/tty/vt/keyboard.c
> index 3dd6a49..4a3907e 100644
> --- a/drivers/tty/vt/keyboard.c
> +++ b/drivers/tty/vt/keyboard.c
> @@ -1044,9 +1044,9 @@ static int kbd_update_leds_helper(struct input_handle *handle, void *data)
> unsigned int leds = *(unsigned int *)data;
>
> if (test_bit(EV_LED, handle->dev->evbit)) {
> - input_inject_event(handle, EV_LED, LED_SCROLLL, !!(leds & 0x01));
> - input_inject_event(handle, EV_LED, LED_NUML, !!(leds & 0x02));
> - input_inject_event(handle, EV_LED, LED_CAPSL, !!(leds & 0x04));
> + input_inject_event(handle, EV_LED, LED_SCROLLL, !!(leds & BIT(VC_SCROLLOCK)));
> + input_inject_event(handle, EV_LED, LED_NUML, !!(leds & BIT(VC_NUMLOCK)));
> + input_inject_event(handle, EV_LED, LED_CAPSL, !!(leds & BIT(VC_CAPSLOCK)));
> input_inject_event(handle, EV_SYN, SYN_REPORT, 0);
> }
>
> --
> 2.9.3
>
--
Samuel
<y> update-menus: relocation error: update-menus: symbol _ZNSt9basic_iosIcSt11char_traitsIcEE4initEPSt15basic_streambufIcS1_E, version GLIBCPP_3.2 not defined in file libstdc++.so.5 with link time reference
<y> quoi que ça peut bien vouloir dire ?
<D> N a eu la meme merde
<y> c ça que ça veut dire ? wow, c'est bien crypté :)
-+- #ens-mim s'entraide -+-
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web