Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfashe...
[sfrench/cifs-2.6.git] / arch / s390 / appldata / appldata_net_sum.c
index 2a4c7432db4ac2960cde34ee6033671fe171cfc5..2180ac105b05f5ba8f7b0f08328b615530d72304 100644 (file)
@@ -5,12 +5,11 @@
  * Collects accumulated network statistics (Packets received/transmitted,
  * dropped, errors, ...).
  *
- * Copyright (C) 2003 IBM Corporation, IBM Deutschland Entwicklung GmbH.
+ * Copyright (C) 2003,2006 IBM Corporation, IBM Deutschland Entwicklung GmbH.
  *
- * Author: Gerald Schaefer <geraldsc@de.ibm.com>
+ * Author: Gerald Schaefer <gerald.schaefer@de.ibm.com>
  */
 
-#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/init.h>
 #include <linux/slab.h>
@@ -35,7 +34,7 @@
  * book:
  * http://oss.software.ibm.com/developerworks/opensource/linux390/index.shtml
  */
-struct appldata_net_sum_data {
+static struct appldata_net_sum_data {
        u64 timestamp;
        u32 sync_count_1;       /* after VM collected the record data, */
        u32 sync_count_2;       /* sync_count_1 and sync_count_2 should be the
@@ -108,10 +107,7 @@ static void appldata_get_net_sum_data(void *data)
        tx_dropped = 0;
        collisions = 0;
        read_lock(&dev_base_lock);
-       for (dev = dev_base; dev != NULL; dev = dev->next) {
-               if (dev->get_stats == NULL) {
-                       continue;
-               }
+       for_each_netdev(dev) {
                stats = dev->get_stats(dev);
                rx_packets += stats->rx_packets;
                tx_packets += stats->tx_packets;
@@ -152,6 +148,7 @@ static struct appldata_ops ops = {
        .callback  = &appldata_get_net_sum_data,
        .data      = &appldata_net_sum_data,
        .owner     = THIS_MODULE,
+       .mod_lvl   = {0xF0, 0xF0},              /* EBCDIC "00" */
 };