/* @num_consumers: Number of consumers @consumers: Consumer data; clients are stored here.  */
int regulator_bulk_disable(int num_consumers, struct regulator_bulk_data *consumers)
/* @num_consumers: Number of consumers @consumers: Consumer data; clients are stored here.  */
int regulator_bulk_disable(int num_consumers, struct regulator_bulk_data *consumers)
{
	int i;
	int ret;
	for (i = 0; i < num_consumers; i++) {
		ret = regulator_disable(consumers[i].consumer);
		if (ret != 0)
			goto err;
	}
	return 0;
err:
	printk(KERN_ERR "Failed to disable %s: %d\n", consumers[i].supply,
	       ret);
	for (--i; i >= 0; --i)
		regulator_enable(consumers[i].consumer);
	return ret;
}