public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: Mattia Dongili <malattia@linux.it>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Norbert Preining <preining@logic.at>,
	Matthew Garrett <mjg@redhat.com>,
	linux-kernel@vger.kernel.org,
	ACPI Devel Mailing List <linux-acpi@vger.kernel.org>,
	Mauro Carvalho Chehab <mchehab@redhat.com>,
	linux-input@vger.kernel.org
Subject: Re: regression since 2.6.36: backlight in sony-laptop not working
Date: Thu, 18 Nov 2010 22:34:20 +0900	[thread overview]
Message-ID: <20101118133420.GA3177@kamineko.org> (raw)
In-Reply-To: <20101118110445.GB4107@kamineko.org>

On Thu, Nov 18, 2010 at 08:04:45PM +0900, Mattia Dongili wrote:
> On Tue, Nov 16, 2010 at 10:52:52PM -0800, Dmitry Torokhov wrote:
> > On Wed, Nov 17, 2010 at 03:33:38PM +0900, Norbert Preining wrote:
> > > > - recompiled a input-kbd binary with a relaxed version check
> > > > 	-	if (EV_VERSION != version) {
> > > > 	+	if (EV_VERSION > version) {
> > > >   in input.c, line 104 of input-utils.
> > > 
> > > Furthermore, although both of you referred to the fact that udev keymap
> > > is working, I checked that Debian/sid uses udev kbd rules, but it 
> > > stopped working ...
> > > 
> > 
> > Seems to be working here (I also verified that the keycodces are
> > actually emitted with evtest):
> > 
> > [root@dtor-d630 ~]# /lib/udev/keymap /dev/input/event3 0x87 wlan
> > setting scancode 0x87 to key code 238
> > [root@dtor-d630 ~]# /lib/udev/keymap /dev/input/event3 0x87 battery
> > setting scancode 0x87 to key code 236
> > [root@dtor-d630 ~]# uname -r
> > 2.6.37-rc1+
> > [root@dtor-d630 ~]# 
> 
> ok I got the error. I'll see why the EVIOCSKEYCODE syscall is returning
> -EINVAL.

there is a typo in the large scancode support patch. This patch makes 
/lib/udev/keymap work again here on 2.6.37-rc2.

commit a33950b5baa848ff7851b9efd4c5e2eaafd370f2
Author: Mattia Dongili <malattia@linux.it>
Date:   Thu Nov 18 22:20:36 2010 +0900

    Input: fix typo in keycode validation supporting large scancodes
    
    Check the input_keymap_entry keycode size (u32) instead of the device's
    (void*).
    Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=22722
    
    Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
    Cc: Dmitry Torokhov <dtor@mail.ru>
    Signed-off-by: Mattia Dongili <malattia@linux.it>

diff --git a/drivers/input/input.c b/drivers/input/input.c
index 7f26ca6..5edc41a 100644
--- a/drivers/input/input.c
+++ b/drivers/input/input.c
@@ -753,7 +753,7 @@ static int input_default_setkeycode(struct input_dev *dev,
 	if (index >= dev->keycodemax)
 		return -EINVAL;
 
-	if (dev->keycodesize < sizeof(dev->keycode) &&
+	if (dev->keycodesize < sizeof(ke->keycode) &&
 			(ke->keycode >> (dev->keycodesize * 8)))
 		return -EINVAL;
 
-- 
mattia
:wq!

  reply	other threads:[~2010-11-18 13:34 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20101104142915.GC7650@gamma.logic.tuwien.ac.at>
2010-11-10  3:58 ` regression since 2.6.36: backlight in sony-laptop not working Mattia Dongili
2010-11-11 23:50   ` Norbert Preining
2010-11-12  3:44     ` Matthew Garrett
2010-11-12  3:50       ` Norbert Preining
2010-11-12  3:57         ` Matthew Garrett
2010-11-12  4:14           ` Norbert Preining
2010-11-12  4:22           ` Mattia Dongili
2010-11-12  4:39             ` Norbert Preining
2010-11-12 12:17               ` Mattia Dongili
2010-11-16  5:16                 ` Norbert Preining
2010-11-16 14:18                   ` Mattia Dongili
2010-11-16 17:41                     ` Dmitry Torokhov
2010-11-17  6:30             ` Norbert Preining
2010-11-17  6:33               ` Norbert Preining
2010-11-17  6:52                 ` Dmitry Torokhov
2010-11-18 11:04                   ` Mattia Dongili
2010-11-18 13:34                     ` Mattia Dongili [this message]
2010-11-18 18:06                       ` Dmitry Torokhov
2010-11-17  7:12               ` Dmitry Torokhov
2010-11-12  7:38         ` Zhang Rui
2010-11-12 10:10           ` Norbert Preining

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20101118133420.GA3177@kamineko.org \
    --to=malattia@linux.it \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mchehab@redhat.com \
    --cc=mjg@redhat.com \
    --cc=preining@logic.at \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox