Hello Olof,
This series adds a set of trivial fixes for build issues with the
cros_ec_lpc driver that were reported by Fengguang Wu's build bot.
It is composed of the following patches:
Javier Martinez Canillas (3):
platform/chrome: cros_ec_lpc - Include linux/io.h header file
platform/chrome: cros_ec_lpc - Depend on X86 || COMPILE_TEST
platform/chrome: cros_ec_lpc - Drop owner assignment
drivers/platform/chrome/Kconfig | 2 +-
drivers/platform/chrome/cros_ec_lpc.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
Best regards,
Javier
The driver uses the inb() and outb() I/O functions so should
include the header file that has these functions definitions.
This patch fixes the following error when the header is not
explicitly included:
drivers/platform/chrome//cros_ec_lpc.c: In function ‘ec_response_timed_out’:
drivers/platform/chrome//cros_ec_lpc.c:40:3: error: implicit declaration of function ‘inb’ [-Werror=implicit-function-declaration]
drivers/platform/chrome//cros_ec_lpc.c: In function ‘cros_ec_cmd_xfer_lpc’:
drivers/platform/chrome//cros_ec_lpc.c:75:3: error: implicit declaration of function ‘outb’ [-Werror=implicit-function-declaration]
Signed-off-by: Javier Martinez Canillas <[email protected]>
---
drivers/platform/chrome/cros_ec_lpc.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/platform/chrome/cros_ec_lpc.c b/drivers/platform/chrome/cros_ec_lpc.c
index 822fdb36ded9..f00bf4d246a1 100644
--- a/drivers/platform/chrome/cros_ec_lpc.c
+++ b/drivers/platform/chrome/cros_ec_lpc.c
@@ -23,6 +23,7 @@
#include <linux/dmi.h>
#include <linux/delay.h>
+#include <linux/io.h>
#include <linux/mfd/cros_ec.h>
#include <linux/mfd/cros_ec_commands.h>
#include <linux/module.h>
--
2.1.3
The Low Pin Count bus was introduced by Intel and is only used
in x86 computers so it should depend on the X86 Kconfig option.
But also build the driver if the COMPILE_TEST option is enabled
to have build coverage in other architectures.
Signed-off-by: Javier Martinez Canillas <[email protected]>
---
drivers/platform/chrome/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/platform/chrome/Kconfig b/drivers/platform/chrome/Kconfig
index d4befbffae85..2a6531a5fde8 100644
--- a/drivers/platform/chrome/Kconfig
+++ b/drivers/platform/chrome/Kconfig
@@ -49,7 +49,7 @@ config CROS_EC_CHARDEV
config CROS_EC_LPC
tristate "ChromeOS Embedded Controller (LPC)"
- depends on MFD_CROS_EC
+ depends on MFD_CROS_EC && (X86 || COMPILE_TEST)
help
If you say Y here, you get support for talking to the ChromeOS EC
over an LPC bus. This uses a simple byte-level protocol with a
--
2.1.3
Platform drivers don't need to set an owner
since it will be populated by the driver core.
Signed-off-by: Javier Martinez Canillas <[email protected]>
---
drivers/platform/chrome/cros_ec_lpc.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/platform/chrome/cros_ec_lpc.c b/drivers/platform/chrome/cros_ec_lpc.c
index f00bf4d246a1..8f9ac4d7bbd0 100644
--- a/drivers/platform/chrome/cros_ec_lpc.c
+++ b/drivers/platform/chrome/cros_ec_lpc.c
@@ -270,7 +270,6 @@ MODULE_DEVICE_TABLE(dmi, cros_ec_lpc_dmi_table);
static struct platform_driver cros_ec_lpc_driver = {
.driver = {
.name = DRV_NAME,
- .owner = THIS_MODULE,
},
.probe = cros_ec_lpc_probe,
.remove = cros_ec_lpc_remove,
--
2.1.3