/* Scan the struct clksel array associated with the clock to find the element associated with the supplied parent clock address. Returns a pointer to the struct clksel on success or NULL on error.  */
static const struct clksel* omap2_get_clksel_by_parent(struct clk *clk, struct clk *src_clk)
/* Scan the struct clksel array associated with the clock to find the element associated with the supplied parent clock address. Returns a pointer to the struct clksel on success or NULL on error.  */
static const struct clksel* omap2_get_clksel_by_parent(struct clk *clk, struct clk *src_clk)
{
	const struct clksel *clks;
	if (!clk->clksel)
		return NULL;
	for (clks = clk->clksel; clks->parent; clks++) {
		if (clks->parent == src_clk)
			break;
	}
	if (!clks->parent) {
		printk(KERN_ERR "clock: Could not find parent clock %s in "
		       "clksel array of clock %s\n", src_clk->name,
		       clk->name);
		return NULL;
	}
	return clks;
}