/* This function should be called in the open function of the device driver.  */
int open_candev(struct net_device *dev)
/* This function should be called in the open function of the device driver.  */
int open_candev(struct net_device *dev)
{
	struct can_priv *priv = netdev_priv(dev);
	if (!priv->bittiming.tq && !priv->bittiming.bitrate) {
		dev_err(dev->dev.parent, "bit-timing not yet defined\n");
		return -EINVAL;
	}
	if (!netif_carrier_ok(dev))
		netif_carrier_on(dev);
	setup_timer(&priv->restart_timer, can_restart, (unsigned long)dev);
	return 0;
}