Linux kernel mirror (for testing)
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel
os
linux
1/*
2 * LED IDE-Disk Activity Trigger
3 *
4 * Copyright 2006 Openedhand Ltd.
5 *
6 * Author: Richard Purdie <rpurdie@openedhand.com>
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 *
12 */
13
14#include <linux/kernel.h>
15#include <linux/init.h>
16#include <linux/leds.h>
17
18#define BLINK_DELAY 30
19
20DEFINE_LED_TRIGGER(ledtrig_ide);
21
22void ledtrig_ide_activity(void)
23{
24 unsigned long ide_blink_delay = BLINK_DELAY;
25
26 led_trigger_blink_oneshot(ledtrig_ide,
27 &ide_blink_delay, &ide_blink_delay, 0);
28}
29EXPORT_SYMBOL(ledtrig_ide_activity);
30
31static int __init ledtrig_ide_init(void)
32{
33 led_trigger_register_simple("ide-disk", &ledtrig_ide);
34 return 0;
35}
36device_initcall(ledtrig_ide_init);