diff options
Diffstat (limited to 'drivers/parisc/led.c')
-rw-r--r-- | drivers/parisc/led.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/parisc/led.c b/drivers/parisc/led.c index 133a616ae8d8..bf00fa2537bb 100644 --- a/drivers/parisc/led.c +++ b/drivers/parisc/led.c | |||
@@ -410,16 +410,17 @@ static __inline__ int led_get_net_activity(void) | |||
410 | static __inline__ int led_get_diskio_activity(void) | 410 | static __inline__ int led_get_diskio_activity(void) |
411 | { | 411 | { |
412 | static unsigned long last_pgpgin, last_pgpgout; | 412 | static unsigned long last_pgpgin, last_pgpgout; |
413 | struct page_state pgstat; | 413 | unsigned long events[NR_VM_EVENT_ITEMS]; |
414 | int changed; | 414 | int changed; |
415 | 415 | ||
416 | get_full_page_state(&pgstat); /* get no of sectors in & out */ | 416 | all_vm_events(events); |
417 | 417 | ||
418 | /* 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, |
419 | 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. */ |
420 | changed = (pgstat.pgpgin != last_pgpgin) || (pgstat.pgpgout != last_pgpgout); | 420 | changed = (events[PGPGIN] != last_pgpgin) || |
421 | last_pgpgin = pgstat.pgpgin; | 421 | (events[PGPGOUT] != last_pgpgout); |
422 | last_pgpgout = pgstat.pgpgout; | 422 | last_pgpgin = events[PGPGIN]; |
423 | last_pgpgout = events[PGPGOUT]; | ||
423 | 424 | ||
424 | return (changed ? LED_DISK_IO : 0); | 425 | return (changed ? LED_DISK_IO : 0); |
425 | } | 426 | } |