Skip to content

Commit 4c7e054

Browse files
ezequielgarciajanaszewski
authored andcommitted
mtd: nand: Remove the "nand-disk" LED trigger
This commit removes the "nand-disk" LED trigger from the NAND code. A trigger with the same name is already available selecting LEDS_TRIGGER_MTD. Note that "nand-disk" trigger is being deprecated in favor of the "mtd" trigger. Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
1 parent 4b72117 commit 4c7e054

1 file changed

Lines changed: 1 addition & 28 deletions

File tree

‎drivers/mtd/nand/nand_base.c‎

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
4343
#include <linux/mtd/nand_bch.h>
4444
#include <linux/interrupt.h>
4545
#include <linux/bitops.h>
46-
#include <linux/leds.h>
4746
#include <linux/io.h>
4847
#include <linux/mtd/partitions.h>
4948
#include <linux/of_mtd.h>
@@ -97,12 +96,6 @@ static int nand_get_device(struct mtd_info *mtd, int new_state);
9796
static int nand_do_write_oob(struct mtd_info *mtd, loff_t to,
9897
struct mtd_oob_ops *ops);
9998

100-
/*
101-
* For devices which display every fart in the system on a separate LED. Is
102-
* compiled away when LED support is disabled.
103-
*/
104-
DEFINE_LED_TRIGGER(nand_led_trigger);
105-
10699
static int check_offs_len(struct mtd_info *mtd,
107100
loff_t ofs, uint64_t len)
108101
{
@@ -540,19 +533,16 @@ void nand_wait_ready(struct mtd_info *mtd)
540533
if (in_interrupt() || oops_in_progress)
541534
return panic_nand_wait_ready(mtd, timeo);
542535

543-
led_trigger_event(nand_led_trigger, LED_FULL);
544536
/* Wait until command is processed or timeout occurs */
545537
timeo = jiffies + msecs_to_jiffies(timeo);
546538
do {
547539
if (chip->dev_ready(mtd))
548-
goto out;
540+
return;
549541
cond_resched();
550542
} while (time_before(jiffies, timeo));
551543

552544
if (!chip->dev_ready(mtd))
553545
pr_warn_ratelimited("timeout while waiting for chip to become ready\n");
554-
out:
555-
led_trigger_event(nand_led_trigger, LED_OFF);
556546
}
557547
EXPORT_SYMBOL_GPL(nand_wait_ready);
558548

@@ -885,8 +875,6 @@ static int nand_wait(struct mtd_info *mtd, struct nand_chip *chip)
885875
int status;
886876
unsigned long timeo = 400;
887877

888-
led_trigger_event(nand_led_trigger, LED_FULL);
889-
890878
/*
891879
* Apply this short delay always to ensure that we do wait tWB in any
892880
* case on any machine.
@@ -910,7 +898,6 @@ static int nand_wait(struct mtd_info *mtd, struct nand_chip *chip)
910898
cond_resched();
911899
} while (time_before(jiffies, timeo));
912900
}
913-
led_trigger_event(nand_led_trigger, LED_OFF);
914901

915902
status = (int)chip->read_byte(mtd);
916903
/* This can happen if in case of timeout or buggy dev_ready */
@@ -4474,20 +4461,6 @@ void nand_release(struct mtd_info *mtd)
44744461
}
44754462
EXPORT_SYMBOL_GPL(nand_release);
44764463

4477-
static int __init nand_base_init(void)
4478-
{
4479-
led_trigger_register_simple("nand-disk", &nand_led_trigger);
4480-
return 0;
4481-
}
4482-
4483-
static void __exit nand_base_exit(void)
4484-
{
4485-
led_trigger_unregister_simple(nand_led_trigger);
4486-
}
4487-
4488-
module_init(nand_base_init);
4489-
module_exit(nand_base_exit);
4490-
44914464
MODULE_LICENSE("GPL");
44924465
MODULE_AUTHOR("Steven J. Hill <sjhill@realitydiluted.com>");
44934466
MODULE_AUTHOR("Thomas Gleixner <tglx@linutronix.de>");

0 commit comments

Comments
 (0)