struct clk *clk_get_sys(const char *dev_id, const char *con_id) { struct clk_lookup *cl; struct clk *clk = NULL;
mutex_lock(&clocks_mutex);
cl = clk_find(dev_id, con_id); if (!cl) goto out;
clk = __clk_create_clk(cl->clk_hw, dev_id, con_id); if (IS_ERR(clk)) goto out;
if (!__clk_get(clk)) { __clk_free_clk(clk); cl = NULL; goto out; }
out: mutex_unlock(&clocks_mutex); return cl ? clk : ERR_PTR(-ENOENT);
} EXPORT_SYMBOL(clk_get_sys);