/* XXX This code is not optimized. It could attempt to merge adjacent resource IDs.  */
int omap_hwmod_count_resources(struct omap_hwmod *oh)
/* XXX This code is not optimized. It could attempt to merge adjacent resource IDs.  */
int omap_hwmod_count_resources(struct omap_hwmod *oh)
{
	int ret, i;
	ret = oh->mpu_irqs_cnt + oh->sdma_chs_cnt;
	for (i = 0; i < oh->slaves_cnt; i++)
		ret += (*oh->slaves + i)->addr_cnt;
	return ret;
}