summaryrefslogtreecommitdiffstats
path: root/net/core/profile.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1999-10-09 00:00:47 +0000
committerRalf Baechle <ralf@linux-mips.org>1999-10-09 00:00:47 +0000
commitd6434e1042f3b0a6dfe1b1f615af369486f9b1fa (patch)
treee2be02f33984c48ec019c654051d27964e42c441 /net/core/profile.c
parent609d1e803baf519487233b765eb487f9ec227a18 (diff)
Merge with 2.3.19.
Diffstat (limited to 'net/core/profile.c')
-rw-r--r--net/core/profile.c22
1 files changed, 9 insertions, 13 deletions
diff --git a/net/core/profile.c b/net/core/profile.c
index fc7464b7a..e43a3d6e1 100644
--- a/net/core/profile.c
+++ b/net/core/profile.c
@@ -126,10 +126,8 @@ done:
len-=(offset-begin);
if(len>length)
len=length;
- if (len < 0) {
+ if (len < 0)
len = 0;
- printk(KERN_CRIT "Yep, guys... our template for proc_*_read is crappy :-)\n");
- }
if (offset == 0) {
cli();
net_prof_total.active = 0;
@@ -144,7 +142,7 @@ done:
struct iphdr whitehole_iph;
int whitehole_count;
-static int whitehole_xmit(struct sk_buff *skb, struct device *dev)
+static int whitehole_xmit(struct sk_buff *skb, struct net_device *dev)
{
struct net_device_stats *stats;
dev_kfree_skb(skb);
@@ -156,15 +154,15 @@ static int whitehole_xmit(struct sk_buff *skb, struct device *dev)
}
static void whitehole_inject(unsigned long);
-int whitehole_init(struct device *dev);
+int whitehole_init(struct net_device *dev);
static struct timer_list whitehole_timer =
{ NULL, NULL, 0, 0L, whitehole_inject };
-static struct device whitehole_dev = {
+static struct net_device whitehole_dev = {
"whitehole", 0x0, 0x0, 0x0, 0x0, 0, 0, 0, 0, 0, NULL, whitehole_init, };
-static int whitehole_open(struct device *dev)
+static int whitehole_open(struct net_device *dev)
{
whitehole_count = 100000;
whitehole_timer.expires = jiffies + 5*HZ;
@@ -172,7 +170,7 @@ static int whitehole_open(struct device *dev)
return 0;
}
-static int whitehole_close(struct device *dev)
+static int whitehole_close(struct net_device *dev)
{
del_timer(&whitehole_timer);
return 0;
@@ -206,13 +204,13 @@ static void whitehole_inject(unsigned long dummy)
}
}
-static struct net_device_stats *whitehole_get_stats(struct device *dev)
+static struct net_device_stats *whitehole_get_stats(struct net_device *dev)
{
struct net_device_stats *stats = (struct net_device_stats *) dev->priv;
return stats;
}
-__initfunc(int whitehole_init(struct device *dev))
+int __init whitehole_init(struct net_device *dev)
{
dev->priv = kmalloc(sizeof(struct net_device_stats), GFP_KERNEL);
if (dev->priv == NULL)
@@ -262,7 +260,7 @@ int net_profile_unregister(struct net_profile_slot *slot)
}
-__initfunc(int net_profile_init(void))
+int __init net_profile_init(void)
{
int i;
@@ -282,7 +280,6 @@ __initfunc(int net_profile_init(void))
return -1;
}
#endif
- start_bh_atomic();
#ifdef __alpha__
alpha_tick(0);
#endif
@@ -298,7 +295,6 @@ __initfunc(int net_profile_init(void))
}
net_prof_total.hits = 0;
net_profile_stamp(&net_prof_total.entered);
- end_bh_atomic();
return 0;
}