From 11f5cd2bdad32c2fb28bd4be5513ca188e3e42a2 Mon Sep 17 00:00:00 2001 From: Cyrill Gorcunov Date: Thu, 18 Dec 2008 22:59:32 -0800 Subject: [PATCH] --- yaml --- r: 122788 b: refs/heads/master c: ab5024ab23b78c86a0a1425defcdde48710fe449 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/net/ppp_generic.c | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index a66e5438bcd9..4cb8cf3fbc00 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: a109a5b916bc180e14fad0d1e9c37a08c85652c0 +refs/heads/master: ab5024ab23b78c86a0a1425defcdde48710fe449 diff --git a/trunk/drivers/net/ppp_generic.c b/trunk/drivers/net/ppp_generic.c index 3ee7830d458d..c832d600d1e8 100644 --- a/trunk/drivers/net/ppp_generic.c +++ b/trunk/drivers/net/ppp_generic.c @@ -179,7 +179,7 @@ struct channel { */ static DEFINE_MUTEX(all_ppp_mutex); static atomic_t ppp_unit_count = ATOMIC_INIT(0); -static struct idr ppp_units_idr; +static DEFINE_IDR(ppp_units_idr); /* * all_channels_lock protects all_channels and last_channel_index, @@ -852,8 +852,6 @@ static int __init ppp_init(void) "ppp"); } - idr_init(&ppp_units_idr); - out: if (err) printk(KERN_ERR "failed to register PPP device (%d)\n", err); @@ -2435,7 +2433,7 @@ ppp_create_interface(int unit, int *retp) if (unit_find(&ppp_units_idr, unit)) goto out2; /* unit already exists */ else { - /* darn, someone is cheatting us? */ + /* darn, someone is cheating us? */ *retp = -EINVAL; goto out2; }