X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fparisc%2Fled.c;h=298f2ddb2c179693ed062b9b50f8740f7120770a;hb=9464c7cf61b9433057924c36e6e02f303a00e768;hp=bf00fa2537bbb6f8774611eb55481751bede4965;hpb=41689045f6a3cbe0550e1d34e9cc20d2e8c432ba;p=linux-2.6.git diff --git a/drivers/parisc/led.c b/drivers/parisc/led.c index bf00fa253..298f2ddb2 100644 --- a/drivers/parisc/led.c +++ b/drivers/parisc/led.c @@ -23,6 +23,7 @@ * David Pye */ +#include #include #include /* for offsetof() */ #include @@ -410,17 +411,16 @@ static __inline__ int led_get_net_activity(void) static __inline__ int led_get_diskio_activity(void) { static unsigned long last_pgpgin, last_pgpgout; - unsigned long events[NR_VM_EVENT_ITEMS]; + struct page_state pgstat; int changed; - all_vm_events(events); + get_full_page_state(&pgstat); /* get no of sectors in & out */ /* Just use a very simple calculation here. Do not care about overflow, since we only want to know if there was activity or not. */ - changed = (events[PGPGIN] != last_pgpgin) || - (events[PGPGOUT] != last_pgpgout); - last_pgpgin = events[PGPGIN]; - last_pgpgout = events[PGPGOUT]; + changed = (pgstat.pgpgin != last_pgpgin) || (pgstat.pgpgout != last_pgpgout); + last_pgpgin = pgstat.pgpgin; + last_pgpgout = pgstat.pgpgout; return (changed ? LED_DISK_IO : 0); }