mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Krzysztof Kosiński" <tweenk.pl@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: "Carlos Corbacho" <carlos@strangeworlds.co.uk>,
	linux-acpi@vger.kernel.org, "Len Brown" <lenb@kernel.org>
Subject: Re: [PATCH] tc1100-wmi: fix state reporting
Date: Thu, 25 Dec 2008 14:30:46 +0100	[thread overview]
Message-ID: <298610bb0812250530r4661cbfaof88ba9d3946e744f@mail.gmail.com> (raw)
In-Reply-To: <200812250755.39288.carlos@strangeworlds.co.uk>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=UTF-8, Size: 1463 bytes --]

(Resend)This small patch fixes the state reported when reading the files in/sys/devices/platofrm/tc1100-wmi/*. The first change fixes alwaysreturning 0 from the files in sysfs. The second one fixes jogdialstate reporting to match with the commands used to set it (e.g. nowafter "echo 0 > /sys/devices/platofrm/tc1100-wmi/jogdial", "cat/sys/devices/platofrm/tc1100-wmi/jogdial" will return 0 instead of 1).Fixes bug #12286.
Signed-off-by: Krzysztof Kosiński <tweenk.pl@gmail.com>
--- linux-2.6.27/drivers/misc/tc1100-wmi.c      2008-10-1000:13:53.000000000 +0200+++ linux/drivers/misc/tc1100-wmi.c     2008-12-25 02:58:48.000000000 +0100@@ -95,9 +95,8 @@               return -ENODEV;
       obj = (union acpi_object *) result.pointer;-       if (obj && obj->type == ACPI_TYPE_BUFFER &&-               obj->buffer.length == sizeof(u32)) {-               tmp = *((u32 *) obj->buffer.pointer);+       if (obj && obj->type == ACPI_TYPE_INTEGER) {+               tmp = obj->integer.value;       } else {               tmp = 0;       }@@ -110,7 +109,7 @@               *out = (tmp == 3) ? 1 : 0;               return 0;       case TC1100_INSTANCE_JOGDIAL:-               *out = (tmp == 1) ? 1 : 0;+               *out = (tmp == 1) ? 0 : 1;               return 0;       default:               return -ENODEV;ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

  reply	other threads:[~2008-12-25 13:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-25  2:45 Krzysztof Kosiński
2008-12-25  7:55 ` Carlos Corbacho
2008-12-25 13:30   ` Krzysztof Kosiński [this message]
2008-12-25 17:58     ` Carlos Corbacho

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=298610bb0812250530r4661cbfaof88ba9d3946e744f@mail.gmail.com \
    --to=tweenk.pl@gmail.com \
    --cc=carlos@strangeworlds.co.uk \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®