diff options
Diffstat (limited to 'drivers/parisc/led.c')
-rw-r--r-- | drivers/parisc/led.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/parisc/led.c b/drivers/parisc/led.c index 298f2ddb2c17..bf00fa2537bb 100644 --- a/drivers/parisc/led.c +++ b/drivers/parisc/led.c | |||
@@ -23,7 +23,6 @@ | |||
23 | * David Pye <dmp@davidmpye.dyndns.org> | 23 | * David Pye <dmp@davidmpye.dyndns.org> |
24 | */ | 24 | */ |
25 | 25 | ||
26 | #include <linux/config.h> | ||
27 | #include <linux/module.h> | 26 | #include <linux/module.h> |
28 | #include <linux/stddef.h> /* for offsetof() */ | 27 | #include <linux/stddef.h> /* for offsetof() */ |
29 | #include <linux/init.h> | 28 | #include <linux/init.h> |
@@ -411,16 +410,17 @@ static __inline__ int led_get_net_activity(void) | |||
411 | static __inline__ int led_get_diskio_activity(void) | 410 | static __inline__ int led_get_diskio_activity(void) |
412 | { | 411 | { |
413 | static unsigned long last_pgpgin, last_pgpgout; | 412 | static unsigned long last_pgpgin, last_pgpgout; |
414 | struct page_state pgstat; | 413 | unsigned long events[NR_VM_EVENT_ITEMS]; |
415 | int changed; | 414 | int changed; |
416 | 415 | ||
417 | get_full_page_state(&pgstat); /* get no of sectors in & out */ | 416 | all_vm_events(events); |
418 | 417 | ||
419 | /* Just use a very simple calculation here. Do not care about overflow, | 418 | /* Just use a very simple calculation here. Do not care about overflow, |
420 | since we only want to know if there was activity or not. */ | 419 | since we only want to know if there was activity or not. */ |
421 | changed = (pgstat.pgpgin != last_pgpgin) || (pgstat.pgpgout != last_pgpgout); | 420 | changed = (events[PGPGIN] != last_pgpgin) || |
422 | last_pgpgin = pgstat.pgpgin; | 421 | (events[PGPGOUT] != last_pgpgout); |
423 | last_pgpgout = pgstat.pgpgout; | 422 | last_pgpgin = events[PGPGIN]; |
423 | last_pgpgout = events[PGPGOUT]; | ||
424 | 424 | ||
425 | return (changed ? LED_DISK_IO : 0); | 425 | return (changed ? LED_DISK_IO : 0); |
426 | } | 426 | } |