All of lore.kernel.org
 help / color / mirror / Atom feed
From: Karl Dahlke <eklhad@comcast.net>
To: linux-kernel@vger.kernel.org
Subject: [PATCH] export getledstate()
Date: Tue, 19 Feb 2008 13:57:23 -0500	[thread overview]
Message-ID: <20080119135723.eklhad@comcast.net> (raw)

I write adapters for disabled people, and we often have to do
specialized functions based on keystrokes and key chords.
I would like to do certain things when keys are hit and num lock is on,
but there is no easy way to get the led state.
There is a nice function getledstate()
in keyboard.c, it just isn't exported.
Here is the patch that would do that.
Can you apply this patch, or, is there another easy way to get this information,
or, would it be better to fold this information into keyboard_notifier_param,
along with shift state etc.
I use notifiers, so this would be natural, and almost as easy.
I'd be happy to write that patch, if you think that would be a superior design.

--- drivers/char/keyboard.c	2008-02-18 21:05:23.000000000 -0500
+++ drivers/char/keyboard.c.new	2008-02-18 21:06:34.000000000 -0500
@@ -963,6 +963,7 @@ unsigned char getledstate(void)
 {
 	return ledstate;
 }
+EXPORT_SYMBOL_GPL(getledstate);
 
 void setledstate(struct kbd_struct *kbd, unsigned int led)
 {

Thanks.

Karl Dahlke

             reply	other threads:[~2008-02-19 18:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-19 18:57 Karl Dahlke [this message]
2008-02-19 19:45 ` [PATCH] export getledstate() Randy Dunlap

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=20080119135723.eklhad@comcast.net \
    --to=eklhad@comcast.net \
    --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 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.