/* Returns: %-ENODEV if the SSP port is unavailable %-EBUSY if the resources are already in use %0 on success  */
int ssp_init(struct ssp_dev *dev, u32 port, u32 init_flags)
/* Returns: %-ENODEV if the SSP port is unavailable %-EBUSY if the resources are already in use %0 on success  */
int ssp_init(struct ssp_dev *dev, u32 port, u32 init_flags)
{
	struct ssp_device *ssp;
	int ret;
	ssp = ssp_request(port, "SSP");
	if (ssp == NULL)
		return -ENODEV;
	dev->ssp = ssp;
	dev->port = port;
	if (!(init_flags & SSP_NO_IRQ)) {
		ret = request_irq(ssp->irq, ssp_interrupt,
				0, "SSP", dev);
	    	if (ret)
			goto out_region;
		dev->irq = ssp->irq;
	} else
		dev->irq = NO_IRQ;
	clk_enable(ssp->clk);
	return 0;
out_region:
	ssp_free(ssp);
	return ret;
}