/* register_dca_provider - register a dca provider @dca - struct created by alloc_dca_provider() @dev - device providing dca services  */
int register_dca_provider(struct dca_provider *dca, struct device *dev)
/* register_dca_provider - register a dca provider @dca - struct created by alloc_dca_provider() @dev - device providing dca services  */
int register_dca_provider(struct dca_provider *dca, struct device *dev)
{
	int err;
	unsigned long flags;
	struct dca_domain *domain;
	err = dca_sysfs_add_provider(dca, dev);
	if (err)
		return err;
	spin_lock_irqsave(&dca_lock, flags);
	domain = dca_get_domain(dev);
	if (!domain) {
		spin_unlock_irqrestore(&dca_lock, flags);
		return -ENODEV;
	}
	list_add(&dca->node, &domain->dca_providers);
	spin_unlock_irqrestore(&dca_lock, flags);
	blocking_notifier_call_chain(&dca_provider_chain,
				     DCA_PROVIDER_ADD, NULL);
	return 0;
}