*/
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,
"ppp");
}
- idr_init(&ppp_units_idr);
-
out:
if (err)
printk(KERN_ERR "failed to register PPP device (%d)\n", err);
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;
}