From eb25cb9956cc9384b7fa0d75dec908c9fac8c444 Mon Sep 17 00:00:00 2001 From: Stephan Linz Date: Fri, 10 Jun 2016 07:59:56 +0200 Subject: leds: convert IDE trigger to common disk trigger This patch converts the IDE specific LED trigger to a generic disk activity LED trigger. The libata core is now a trigger source just like before the IDE disk driver. It's merely a replacement of the string ide by disk. The patch is taken from http://dev.gentoo.org/~josejx/ata.patch and is widely used by any ibook/powerbook owners with great satisfaction. Likewise, it is very often used successfully on different ARM platforms. Unlike the original patch, the existing 'ide-disk' trigger is still available for backward compatibility. That reduce the amount of patches in affected device trees out of the mainline kernel. For further development, the new name 'disk-activity' should be used. Cc: Joseph Jezak Cc: Jörg Sommer Cc: Richard Purdie Signed-off-by: Stephan Linz Signed-off-by: Jacek Anaszewski --- drivers/ata/libata-core.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'drivers/ata/libata-core.c') diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 6be7770f68e9..2eca572f4df6 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c @@ -69,6 +69,7 @@ #include #include #include +#include #include #include @@ -5072,6 +5073,9 @@ void ata_qc_complete(struct ata_queued_cmd *qc) { struct ata_port *ap = qc->ap; + /* Trigger the LED (if available) */ + ledtrig_disk_activity(); + /* XXX: New EH and old EH use different mechanisms to * synchronize EH with regular execution path. * -- cgit v1.2.3-55-g7522