Skip to contentSkip to conversation

rc: fix hix5hd2 build issue in 0-DAY kernel build

PATCH New Zhangfei Gao 2 participants 5 messages Sep 24, 2014 – Sep 29, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rc: fix hix5hd2 build issue in 0-DAY kernel build

Add dependence of ARCH_HIX5HD2 to solve build error in arch like ia64
error: implicit declaration of function 'readl_relaxed' & 'writel_relaxed'

Change CONFIG_PM to CONFIG_PM_SLEEP to solve
warning: 'hix5hd2_ir_suspend' & 'hix5hd2_ir_resume' defined but not used

---
 drivers/media/rc/Kconfig      |    2 +-
 drivers/media/rc/ir-hix5hd2.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/media/rc/Kconfig +1 -1
index 01e5f7a..ff5a625 100644
@@ -166,7 +166,7 @@ config IR_ENE
 
 config IR_HIX5HD2
 	tristate "Hisilicon hix5hd2 IR remote control"
-	depends on RC_CORE
+	depends on RC_CORE && ARCH_HIX5HD2
 	help
 	 Say Y here if you want to use hisilicon hix5hd2 remote control.
 	 To compile this driver as a module, choose M here: the module will be
drivers/media/rc/ir-hix5hd2.c +1 -1
index 64f8257..c1d8527 100644
@@ -289,7 +289,7 @@ static int hix5hd2_ir_remove(struct platform_device *pdev)
 	return 0;
 }
 
-#ifdef CONFIG_PM
+#ifdef CONFIG_PM_SLEEP
 static int hix5hd2_ir_suspend(struct device *dev)
 {
 	struct hix5hd2_ir_priv *priv = dev_get_drvdata(dev);
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 1/1 rc: fix hix5hd2 compile-test issue

Add dependence to solve build error in arch like ia64
error: implicit declaration of function 'readl_relaxed' & 'writel_relaxed'

Change CONFIG_PM to CONFIG_PM_SLEEP to solve
warning: 'hix5hd2_ir_suspend' & 'hix5hd2_ir_resume' defined but not used

---
 drivers/media/rc/Kconfig      |    2 +-
 drivers/media/rc/ir-hix5hd2.c |    7 +------
 2 files changed, 2 insertions(+), 7 deletions(-)
drivers/media/rc/Kconfig +1 -1
index 8ce08107a69d..28fb2cb34e8d 100644
@@ -166,7 +166,7 @@ config IR_ENE
 
 config IR_HIX5HD2
 	tristate "Hisilicon hix5hd2 IR remote control"
-	depends on RC_CORE
+	depends on RC_CORE && ARM
 	help
 	 Say Y here if you want to use hisilicon hix5hd2 remote control.
 	 To compile this driver as a module, choose M here: the module will be
drivers/media/rc/ir-hix5hd2.c +1 -6
index 94967d0e0478..c1d8527ace92 100644
@@ -16,11 +16,6 @@
 #include <linux/regmap.h>
 #include <media/rc-core.h>
 
-/* Allow the driver to compile on all architectures */
-#ifndef writel_relaxed
-# define writel_relaxed writel
-#endif
-
 #define IR_ENABLE		0x00
 #define IR_CONFIG		0x04
 #define CNT_LEADS		0x08
@@ -294,7 +289,7 @@ static int hix5hd2_ir_remove(struct platform_device *pdev)
 	return 0;
 }
 
-#ifdef CONFIG_PM
+#ifdef CONFIG_PM_SLEEP
 static int hix5hd2_ir_suspend(struct device *dev)
 {
 	struct hix5hd2_ir_priv *priv = dev_get_drvdata(dev);
Signature · 1 line
1.7.9.5
#2 lore raw

PATCH 1/1 rc: fix hix5hd2 compile-test issue

Quoted 5 lines · Zhangfei Gao

Add dependence to solve build error in arch like ia64
error: implicit declaration of function 'readl_relaxed' & 'writel_relaxed'

Change CONFIG_PM to CONFIG_PM_SLEEP to solve
warning: 'hix5hd2_ir_suspend' & 'hix5hd2_ir_resume' defined but not used

There is work currently in progress (in linux-next) to provide asm-generic accessors for the above.

Signature · 2 lines
FTTC broadband for 0.8mile line: currently at 9.5Mbps down 400kbps up
according to speedtest.net.
author
#3 lore raw

PATCH 1/1 rc: fix hix5hd2 compile-test issue

Quoted 9 lines · Russell King - ARM Linux
Quoted 5 lines · Zhangfei Gao

Add dependence to solve build error in arch like ia64
error: implicit declaration of function 'readl_relaxed' & 'writel_relaxed'

Change CONFIG_PM to CONFIG_PM_SLEEP to solve
warning: 'hix5hd2_ir_suspend' & 'hix5hd2_ir_resume' defined but not used

There is work currently in progress (in linux-next) to provide asm-generic accessors for the above.

Thanks Russell for the info.

Have found the patch set about "asm-generic: io: implement relaxed accessor macros as conditional wrappers".

That's great.

Thanks

#4 lore raw

PATCH 1/1 rc: fix hix5hd2 compile-test issue

In reply to Zhangfei Gao

Commit 4c255791ffd6410f ("asm-generic: io: implement relaxed accessor macros as conditional wrappers") adds wrappers to asm-generic of {read,write}{b,w,l,q}_relaxed.

Change CONFIG_PM to CONFIG_PM_SLEEP to solve
warning: 'hix5hd2_ir_suspend' & 'hix5hd2_ir_resume' defined but not used

---
 drivers/media/rc/ir-hix5hd2.c |    7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
drivers/media/rc/ir-hix5hd2.c +1 -6
index c555ca2aed0e..58ec5986274e 100644
@@ -16,11 +16,6 @@
 #include <linux/regmap.h>
 #include <media/rc-core.h>
 
-/* Allow the driver to compile on all architectures */
-#ifndef writel_relaxed
-# define writel_relaxed writel
-#endif
-
 #define IR_ENABLE		0x00
 #define IR_CONFIG		0x04
 #define CNT_LEADS		0x08
@@ -294,7 +289,7 @@ static int hix5hd2_ir_remove(struct platform_device *pdev)
 	return 0;
 }
 
-#ifdef CONFIG_PM
+#ifdef CONFIG_PM_SLEEP
 static int hix5hd2_ir_suspend(struct device *dev)
 {
 	struct hix5hd2_ir_priv *priv = dev_get_drvdata(dev);
Signature · 1 line
1.7.9.5