All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Richter <thor@math.tu-berlin.de>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: tianyu.lan@intel.com, paul.s.diefenbaugh@intel.com,
	jun.nakajima@intel.com, gjohnson@austin.ibm.com, lenb@kernel.org,
	rui.zhang@intel.com, linux-acpi@vger.kernel.org
Subject: [PATCH] Fujitsu extra buttons not working on S6010, Thinkpad Extra buttons not working on R31
Date: Tue, 07 Oct 2014 16:17:36 +0200	[thread overview]
Message-ID: <5433F600.6010002@math.tu-berlin.de> (raw)
In-Reply-To: <29964_1412634435_54331741_29964_16384_1_8031540.z3p2ny3Gns@vostro.rjw.lan>

Hi Rafael,

> And can you please actually post a patch?  The above is just a piece of C code
> entirely out of context.
Actually, it was rather supposed to start a discussion because I have 
almost no experience with the ACPI subsystem.

Anyhow, here is the same in a (hopefully) well-formed patch file, tested 
on a Fujitsu S6010 and an IBM R31 running
the 3.17 kernel.

Thanks,
     Thomas


Signed-off-by: Thomas Richter <thor@math.tu-berlin.de>
--- linux-3.17/arch/x86/kernel/acpi/boot.c.old  2014-10-07 
15:43:44.000000000 +0200
+++ linux-3.17/arch/x86/kernel/acpi/boot.c      2014-10-07 
16:04:33.000000000 +0200
@@ -609,9 +609,23 @@
         if (irq >= 0) {
                 *irqp = irq;
                 return 0;
-       }
+       } else {
+               unsigned int i;
+
+               for (i = 0; i < NR_IRQS_LEGACY; i++) {
+                       if (isa_irq_to_gsi[i] == gsi) {
+                               *irqp = i;
+                               return 0;
+                       }
+               }
+
+               if (gsi >= NR_IRQS_LEGACY)
+                       *irqp = gsi;
+               else
+                       *irqp = gsi_top + gsi;

-       return -1;
+               return 0;
+       }
  }
  EXPORT_SYMBOL_GPL(acpi_gsi_to_irq);


  parent reply	other threads:[~2014-10-07 14:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <29964_1412366647_542F0137_29964_4513_9_542EFC10.7020508@math.tu-berlin.de>
2014-10-06 14:38 ` [Patch] Fujitsu extra buttons not working on S6010 Thomas Richter
2014-10-06 22:47   ` Rafael J. Wysocki
     [not found]   ` <29964_1412634435_54331741_29964_16384_1_8031540.z3p2ny3Gns@vostro.rjw.lan>
2014-10-07 14:17     ` Thomas Richter [this message]
2014-10-12 17:26     ` Thomas Richter

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=5433F600.6010002@math.tu-berlin.de \
    --to=thor@math.tu-berlin.de \
    --cc=gjohnson@austin.ibm.com \
    --cc=jun.nakajima@intel.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=paul.s.diefenbaugh@intel.com \
    --cc=rjw@rjwysocki.net \
    --cc=rui.zhang@intel.com \
    --cc=tianyu.lan@intel.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.