diff options
author | Pierre Ossman <drzeus@drzeus.cx> | 2007-09-24 07:15:48 +0200 |
---|---|---|
committer | Pierre Ossman <drzeus@drzeus.cx> | 2007-09-24 07:15:48 +0200 |
commit | af8350c756cb48a738474738f7bf8c0e572fa057 (patch) | |
tree | e46fcb2b0eaf158759bfe75fc22fe01dd2556f3a /drivers/mmc/core/host.c | |
parent | 15a0580ced081a0f7dc2deea8a4812bdc5e9a109 (diff) | |
download | linux-stable-af8350c756cb48a738474738f7bf8c0e572fa057.tar.gz linux-stable-af8350c756cb48a738474738f7bf8c0e572fa057.tar.bz2 linux-stable-af8350c756cb48a738474738f7bf8c0e572fa057.zip |
mmc: add led trigger
Add a led trigger for each host controller that indicates if there
is a request active on the controller.
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Diffstat (limited to 'drivers/mmc/core/host.c')
-rw-r--r-- | drivers/mmc/core/host.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/mmc/core/host.c b/drivers/mmc/core/host.c index 37b761891d67..64fbc9759a30 100644 --- a/drivers/mmc/core/host.c +++ b/drivers/mmc/core/host.c @@ -15,6 +15,7 @@ #include <linux/err.h> #include <linux/idr.h> #include <linux/pagemap.h> +#include <linux/leds.h> #include <linux/mmc/host.h> @@ -115,6 +116,8 @@ int mmc_add_host(struct mmc_host *host) snprintf(host->class_dev.bus_id, BUS_ID_SIZE, "mmc%d", host->index); + led_trigger_register_simple(host->class_dev.bus_id, &host->led); + err = device_add(&host->class_dev); if (err) return err; @@ -140,6 +143,8 @@ void mmc_remove_host(struct mmc_host *host) device_del(&host->class_dev); + led_trigger_unregister(host->led); + spin_lock(&mmc_host_lock); idr_remove(&mmc_host_idr, host->index); spin_unlock(&mmc_host_lock); |