/* Allocate device structure, err, instance, and register driver  */
static int scc_net_alloc(const char *name, struct scc_channel *scc)
/* Allocate device structure, err, instance, and register driver  */
static int scc_net_alloc(const char *name, struct scc_channel *scc)
{
	int err;
	struct net_device *dev;
	dev = alloc_netdev(0, name, scc_net_setup);
	if (!dev) 
		return -ENOMEM;
	dev->ml_priv = scc;
	scc->dev = dev;
	spin_lock_init(&scc->lock);
	init_timer(&scc->tx_t);
	init_timer(&scc->tx_wdog);
	err = register_netdevice(dev);
	if (err) {
		printk(KERN_ERR "%s: can't register network device (%d)\n", 
		       name, err);
		free_netdev(dev);
		scc->dev = NULL;
		return err;
	}
	return 0;
}