clk: export __clk_get_name for re-use in imx-ipu-v3 and others
PATCH 1/1 clk: export __clk_get_name for re-use in imx-ipu-v3 and others
This fixes the following error when building for arm-imx:
Quoted 3 lines
ERROR: "
__clk_get_name" [drivers/staging/imx-drm/ipu-v3/imx-ipu-v3.ko] undefined! make[1]: *** [__modpost] Error 1
make: *** [modules] Error 2
There are valid usecases to get the name of a clock, be it for debugging purposes or to register a children of a clock like done in this IPU driver. Therefore exporting __clk_get_name() and make it available for others makes sense.
--- drivers/clk/clk.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/clk/clk.c +2 -1
@@ -259,10 +259,11 @@ late_initcall(clk_disable_unused);/*** helper functions ***/ -inline const char *__clk_get_name (struct clk *clk) +const char *__clk_get_name (struct clk *clk) {return !clk ?NULL : clk->name; } +EXPORT_SYMBOL_GPL (__clk_get_name);inline struct clk_hw *__clk_get_hw (struct clk *clk) {
Signature · 1 line
1.7.11.7
PATCH 1/1 clk: export __clk_get_name for re-use in imx-ipu-v3 and others
Quoted 9 lines · Niels de Vos
This fixes the following error when building for arm-imx:
Quoted 3 lines
ERROR: "
__clk_get_name" [drivers/staging/imx-drm/ipu-v3/imx-ipu-v3.ko] undefined! make[1]: *** [__modpost] Error 1
make: *** [modules] Error 2There are valid usecases to get the name of a clock, be it for debugging purposes or to register a children of a clock like done in this IPU driver. Therefore exporting
__clk_get_name()and make it available for others makes sense.
Gnerally I think the name of a clock shouldn't be a secret, so:
Quoted 30 lines
Reported-by Peter Robinson <[email protected]>CC Sascha Hauer <[email protected]>CC Mike Turquette <[email protected]>Signed-off-by Niels de Vos <[email protected]>--- drivers/clk/clk.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/clk/clk.c +2
-1@@ -259,10 +259,11 @@ late_initcall(clk_disable_unused);/*** helper functions ***/ -inline const char *__clk_get_name (struct clk *clk) +const char *__clk_get_name (struct clk *clk) {return !clk ?NULL : clk->name; } +EXPORT_SYMBOL_GPL (__clk_get_name);inline struct clk_hw *__clk_get_hw (struct clk *clk) {Signature · 1 line
1.7.11.7
Signature · 4 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
PATCH 1/1 clk: export __clk_get_name for re-use in imx-ipu-v3 and others
Quoting Sascha Hauer (2012-12-17 00:59:52)
Quoted 6 lines · Niels de Vos
Quoted 5 lines
This fixes the following error when building for arm-imx:
Quoted 3 lines
ERROR: "
__clk_get_name" [drivers/staging/imx-drm/ipu-v3/imx-ipu-v3.ko] undefined! make[1]: *** [__modpost] Error 1
make: *** [modules] Error 2
Quoted 9 lines
Quoted 4 lines
There are valid usecases to get the name of a clock, be it for debugging purposes or to register a children of a clock like done in this IPU driver. Therefore exporting
__clk_get_name()and make it available for others makes sense.Gnerally I think the name of a clock shouldn't be a secret, so:
Acked-by Sascha Hauer <[email protected]>
I've taken this into clk-next, but I'm not too pleased with it for any purpose other than debugging. For this reason I opted to keep the double underscores (as opposed to EXPORTing a new clk_get_name which calls __clk_get_name) to make all users of the API feel uneasy and otherwise of low character.
Currently the clock framework relies on parent names for registering clocks from defined in static data but this limitation isn't really true for clocks defined as part of DT. More to think about for the future.
Regards,
Mike
Quoted 36 lines
Quoted 30 lines
Reported-by Peter Robinson <[email protected]>CC Sascha Hauer <[email protected]>CC Mike Turquette <[email protected]>Signed-off-by Niels de Vos <[email protected]>--- drivers/clk/clk.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/clk/clk.c +2
-1@@ -259,10 +259,11 @@ late_initcall(clk_disable_unused);/*** helper functions ***/ -inline const char *__clk_get_name (struct clk *clk) +const char *__clk_get_name (struct clk *clk) {return !clk ?NULL : clk->name; } +EXPORT_SYMBOL_GPL (__clk_get_name);inline struct clk_hw *__clk_get_hw (struct clk *clk) {Signature · 1 line
1.7.11.7Signature · 4 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |