X-Git-Url: http://git.monstr.eu/?a=blobdiff_plain;f=drivers%2Fparisc%2Fled.c;h=bf00fa2537bbb6f8774611eb55481751bede4965;hb=22a3e233ca08a2ddc949ba1ae8f6e16ec7ef1a13;hp=298f2ddb2c179693ed062b9b50f8740f7120770a;hpb=55d8ca4f8094246da6e71889a4e04bfafaa78b10;p=linux-2.6-microblaze.git 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 @@ * David Pye */ -#include #include #include /* for offsetof() */ #include @@ -411,16 +410,17 @@ static __inline__ int led_get_net_activity(void) static __inline__ int led_get_diskio_activity(void) { static unsigned long last_pgpgin, last_pgpgout; - struct page_state pgstat; + unsigned long events[NR_VM_EVENT_ITEMS]; int changed; - get_full_page_state(&pgstat); /* get no of sectors in & out */ + all_vm_events(events); /* 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 = (pgstat.pgpgin != last_pgpgin) || (pgstat.pgpgout != last_pgpgout); - last_pgpgin = pgstat.pgpgin; - last_pgpgout = pgstat.pgpgout; + changed = (events[PGPGIN] != last_pgpgin) || + (events[PGPGOUT] != last_pgpgout); + last_pgpgin = events[PGPGIN]; + last_pgpgout = events[PGPGOUT]; return (changed ? LED_DISK_IO : 0); }