2013-03-21 19:08:37

by David Rientjes

[permalink] [raw]
Subject: [patch] drivers, mfd: fix link error

CONFIG_MFD_CROS_EC requires CONFIG_MFD_CORE for a couple of functions that
are declared but not defined:

ERROR: "mfd_remove_devices" [drivers/mfd/cros_ec.ko] undefined!
ERROR: "mfd_add_devices" [drivers/mfd/cros_ec.ko] undefined!

Fix it by selecting CONFIG_MFD_CORE anytime CONFIG_MFD_CROS_EC is enabled.

Signed-off-by: David Rientjes <[email protected]>
---
drivers/mfd/Kconfig | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
--- a/drivers/mfd/Kconfig
+++ b/drivers/mfd/Kconfig
@@ -23,6 +23,7 @@ config MFD_88PM860X

config MFD_CROS_EC
tristate "Support ChromeOS Embedded Controller"
+ select MFD_CORE
help
If you say Y here you get support for the ChromeOS Embedded
Controller (EC) providing keyboard, battery and power services.


2013-03-21 20:51:59

by Simon Glass

[permalink] [raw]
Subject: Re: [patch] drivers, mfd: fix link error

On Thu, Mar 21, 2013 at 12:08 PM, David Rientjes <[email protected]> wrote:
> CONFIG_MFD_CROS_EC requires CONFIG_MFD_CORE for a couple of functions that
> are declared but not defined:
>
> ERROR: "mfd_remove_devices" [drivers/mfd/cros_ec.ko] undefined!
> ERROR: "mfd_add_devices" [drivers/mfd/cros_ec.ko] undefined!
>
> Fix it by selecting CONFIG_MFD_CORE anytime CONFIG_MFD_CROS_EC is enabled.
>
> Signed-off-by: David Rientjes <[email protected]>

Take 2

Acked-by: Simon Glass <[email protected]>

> ---
> drivers/mfd/Kconfig | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
> --- a/drivers/mfd/Kconfig
> +++ b/drivers/mfd/Kconfig
> @@ -23,6 +23,7 @@ config MFD_88PM860X
>
> config MFD_CROS_EC
> tristate "Support ChromeOS Embedded Controller"
> + select MFD_CORE
> help
> If you say Y here you get support for the ChromeOS Embedded
> Controller (EC) providing keyboard, battery and power services.

2013-03-21 23:56:26

by Samuel Ortiz

[permalink] [raw]
Subject: Re: [patch] drivers, mfd: fix link error

Hi David,

On Thu, Mar 21, 2013 at 12:08:33PM -0700, David Rientjes wrote:
> CONFIG_MFD_CROS_EC requires CONFIG_MFD_CORE for a couple of functions that
> are declared but not defined:
>
> ERROR: "mfd_remove_devices" [drivers/mfd/cros_ec.ko] undefined!
> ERROR: "mfd_add_devices" [drivers/mfd/cros_ec.ko] undefined!
>
> Fix it by selecting CONFIG_MFD_CORE anytime CONFIG_MFD_CROS_EC is enabled.
>
> Signed-off-by: David Rientjes <[email protected]>
> ---
> drivers/mfd/Kconfig | 1 +
> 1 file changed, 1 insertion(+)
Patch applied, many thanks.

Cheers,
Samuel.

--
Intel Open Source Technology Centre
http://oss.intel.com/