aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/clk/clk.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/clk/clk.c')
-rw-r--r--drivers/clk/clk.c31
1 files changed, 18 insertions, 13 deletions
diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index 96053a96fe2f..d27775a73e67 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -3313,18 +3313,7 @@ struct clk *clk_hw_create_clk(struct device *dev, struct clk_hw *hw,
3313 return clk; 3313 return clk;
3314} 3314}
3315 3315
3316/** 3316static struct clk *__clk_register(struct device *dev, struct clk_hw *hw)
3317 * clk_register - allocate a new clock, register it and return an opaque cookie
3318 * @dev: device that is registering this clock
3319 * @hw: link to hardware-specific clock data
3320 *
3321 * clk_register is the primary interface for populating the clock tree with new
3322 * clock nodes. It returns a pointer to the newly allocated struct clk which
3323 * cannot be dereferenced by driver code but may be used in conjunction with the
3324 * rest of the clock API. In the event of an error clk_register will return an
3325 * error code; drivers must test for an error code after calling clk_register.
3326 */
3327struct clk *clk_register(struct device *dev, struct clk_hw *hw)
3328{ 3317{
3329 int i, ret; 3318 int i, ret;
3330 struct clk_core *core; 3319 struct clk_core *core;
@@ -3426,6 +3415,22 @@ fail_name:
3426fail_out: 3415fail_out:
3427 return ERR_PTR(ret); 3416 return ERR_PTR(ret);
3428} 3417}
3418
3419/**
3420 * clk_register - allocate a new clock, register it and return an opaque cookie
3421 * @dev: device that is registering this clock
3422 * @hw: link to hardware-specific clock data
3423 *
3424 * clk_register is the primary interface for populating the clock tree with new
3425 * clock nodes. It returns a pointer to the newly allocated struct clk which
3426 * cannot be dereferenced by driver code but may be used in conjunction with the
3427 * rest of the clock API. In the event of an error clk_register will return an
3428 * error code; drivers must test for an error code after calling clk_register.
3429 */
3430struct clk *clk_register(struct device *dev, struct clk_hw *hw)
3431{
3432 return __clk_register(dev, hw);
3433}
3429EXPORT_SYMBOL_GPL(clk_register); 3434EXPORT_SYMBOL_GPL(clk_register);
3430 3435
3431/** 3436/**
@@ -3440,7 +3445,7 @@ EXPORT_SYMBOL_GPL(clk_register);
3440 */ 3445 */
3441int clk_hw_register(struct device *dev, struct clk_hw *hw) 3446int clk_hw_register(struct device *dev, struct clk_hw *hw)
3442{ 3447{
3443 return PTR_ERR_OR_ZERO(clk_register(dev, hw)); 3448 return PTR_ERR_OR_ZERO(__clk_register(dev, hw));
3444} 3449}
3445EXPORT_SYMBOL_GPL(clk_hw_register); 3450EXPORT_SYMBOL_GPL(clk_hw_register);
3446 3451