2013-03-13 11:55:07

by Sachin Kamat

[permalink] [raw]
Subject: [PATCH 1/1] pinctrl: generic: Fix compilation error

The function definition of pinconf_generic_dump_config is defined
under CONFIG_DEBUG_FS macro. Define the declaration too under this macro.

Without this patch we get the following build error:
drivers/built-in.o: In function `pcs_pinconf_config_dbg_show':
drivers/pinctrl/pinctrl-single.c:726: undefined reference to
`pinconf_generic_dump_config'

Signed-off-by: Sachin Kamat <[email protected]>
---
drivers/pinctrl/pinconf.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/pinctrl/pinconf.h b/drivers/pinctrl/pinconf.h
index 1f7113e..92c7267 100644
--- a/drivers/pinctrl/pinconf.h
+++ b/drivers/pinctrl/pinconf.h
@@ -90,7 +90,7 @@ static inline void pinconf_init_device_debugfs(struct dentry *devroot,
* pin config.
*/

-#ifdef CONFIG_GENERIC_PINCONF
+#if defined(CONFIG_GENERIC_PINCONF) && defined(CONFIG_DEBUG_FS)

void pinconf_generic_dump_pin(struct pinctrl_dev *pctldev,
struct seq_file *s, unsigned pin);
--
1.7.4.1


2013-03-13 18:15:20

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH 1/1] pinctrl: generic: Fix compilation error

On Wed, Mar 13, 2013 at 12:43 PM, Sachin Kamat <[email protected]> wrote:

> The function definition of pinconf_generic_dump_config is defined
> under CONFIG_DEBUG_FS macro. Define the declaration too under this macro.
>
> Without this patch we get the following build error:
> drivers/built-in.o: In function `pcs_pinconf_config_dbg_show':
> drivers/pinctrl/pinctrl-single.c:726: undefined reference to
> `pinconf_generic_dump_config'
>
> Signed-off-by: Sachin Kamat <[email protected]>

Thanks, applied to my fixes branch.

Yours,
Linus Walleij