linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "John W. Linville" <linville@tuxdriver.com>
To: linux-wireless@vger.kernel.org
Cc: ath5k-devel@lists.ath5k.org, Bob Copeland <me@bobcopeland.com>,
	"John W. Linville" <linville@tuxdriver.com>
Subject: [PATCH] ath5k: add led_disable module option
Date: Wed, 28 Jul 2010 12:31:51 -0400	[thread overview]
Message-ID: <1280334711-6141-1-git-send-email-linville@tuxdriver.com> (raw)

Not everyone agrees about LED behaviour...give them an escape hatch that
will at least stop the lights from annoying them.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
---
 drivers/net/wireless/ath/ath5k/led.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/drivers/net/wireless/ath/ath5k/led.c b/drivers/net/wireless/ath/ath5k/led.c
index 67aa52e..6c416db 100644
--- a/drivers/net/wireless/ath/ath5k/led.c
+++ b/drivers/net/wireless/ath/ath5k/led.c
@@ -43,6 +43,10 @@
 #include "ath5k.h"
 #include "base.h"
 
+static int modparam_led_disable;
+module_param_named(led_disable, modparam_led_disable, bool, S_IRUGO);
+MODULE_PARM_DESC(led_disable, "Disable software-controlled LEDs.");
+
 #define ATH_SDEVICE(subv,subd) \
 	.vendor = PCI_ANY_ID, .device = PCI_ANY_ID, \
 	.subvendor = (subv), .subdevice = (subd)
@@ -165,6 +169,9 @@ int ath5k_init_leds(struct ath5k_softc *sc)
 	char name[ATH5K_LED_MAX_NAME_LEN + 1];
 	const struct pci_device_id *match;
 
+	if (modparam_led_disable)
+		goto out;
+
 	match = pci_match_id(&ath5k_led_devices[0], pdev);
 	if (match) {
 		__set_bit(ATH_STAT_LEDSOFT, sc->status);
-- 
1.7.1.1


             reply	other threads:[~2010-07-28 16:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-28 16:31 John W. Linville [this message]
2010-07-28 17:10 ` [PATCH] ath5k: add led_disable module option Bob Copeland
2010-07-28 21:01 ` [ath5k-devel] " Luis R. Rodriguez
2010-07-28 21:04   ` Johannes Berg
2010-07-28 21:14     ` Bob Copeland

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=1280334711-6141-1-git-send-email-linville@tuxdriver.com \
    --to=linville@tuxdriver.com \
    --cc=ath5k-devel@lists.ath5k.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=me@bobcopeland.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).