/* Return 0 for success, or a negative value indicating the problem in errno form.  */
int z8530_init(struct z8530_dev *dev)
/* Return 0 for success, or a negative value indicating the problem in errno form.  */
int z8530_init(struct z8530_dev *dev)
{
	unsigned long flags;
	int ret;
	spin_lock_init(&dev->lock);
	dev->chanA.lock = &dev->lock;
	dev->chanB.lock = &dev->lock;
	spin_lock_irqsave(&dev->lock, flags);
	ret = do_z8530_init(dev);
	spin_unlock_irqrestore(&dev->lock, flags);
	return ret;
}