Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1338545 > unrolled thread
| Started by | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| First post | 2016-02-19 23:40 +0100 |
| Last post | 2016-02-23 10:00 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] thermal: mediatek: add missing dependencies Arnd Bergmann <arnd@arndb.de> - 2016-02-19 23:40 +0100
Re: [PATCH] thermal: mediatek: add missing dependencies Sascha Hauer <s.hauer@pengutronix.de> - 2016-02-23 10:00 +0100
| From | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| Date | 2016-02-19 23:40 +0100 |
| Subject | [PATCH] thermal: mediatek: add missing dependencies |
| Message-ID | <r41Sq-3SM-33@gated-at.bofh.it> |
The newly added mtk_thermal driver uses the generic reset and nvmem infrastructure, but lacks a dependency that enforces them from actually being present: drivers/thermal/mtk_thermal.c: In function 'mtk_thermal_probe': drivers/thermal/mtk_thermal.c:560:8: error: implicit declaration of function 'device_reset' [-Werror=implicit-function-declaration] drivers/thermal/built-in.o: In function `mtk_thermal_probe': mtk_thermal.c:(.text+0x7fb0): undefined reference to `nvmem_cell_get' mtk_thermal.c:(.text+0x7fd8): undefined reference to `nvmem_cell_read' mtk_thermal.c:(.text+0x7fe4): undefined reference to `nvmem_cell_put' Without CONFIG_THERMAL, the driver cannot build, so this needs to be a hard dependency. For CONFIG_NVMEM, the header file allows building the driver even when the subsystem is disabled, but we get the link error above when nvmem is built as a module and the thermal driver is built-in, so we can allow compile-testing when NVMEM is completely disabled, but otherwise require the dependency. Signed-off-by: Arnd Bergmann <arnd@arndb.de> --- drivers/thermal/Kconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/thermal/Kconfig b/drivers/thermal/Kconfig index 5e7c97a3f1d8..75d164341f0d 100644 --- a/drivers/thermal/Kconfig +++ b/drivers/thermal/Kconfig @@ -368,6 +368,8 @@ config INTEL_PCH_THERMAL config MTK_THERMAL tristate "Temperature sensor driver for mediatek SoCs" depends on ARCH_MEDIATEK || COMPILE_TEST + depends on NVMEM || (!NVMEM && COMPILE_TEST) + depends on RESET_CONTROLLER default y help Enable this option if you want to have support for thermal management -- 2.7.0
[toc] | [next] | [standalone]
| From | Sascha Hauer <s.hauer@pengutronix.de> |
|---|---|
| Date | 2016-02-23 10:00 +0100 |
| Message-ID | <r5gZ5-2Qo-19@gated-at.bofh.it> |
| In reply to | #1338545 |
Hi Arnd, On Fri, Feb 19, 2016 at 11:36:06PM +0100, Arnd Bergmann wrote: > The newly added mtk_thermal driver uses the generic reset > and nvmem infrastructure, but lacks a dependency that enforces > them from actually being present: > > drivers/thermal/mtk_thermal.c: In function 'mtk_thermal_probe': > drivers/thermal/mtk_thermal.c:560:8: error: implicit declaration of function 'device_reset' [-Werror=implicit-function-declaration] > drivers/thermal/built-in.o: In function `mtk_thermal_probe': > mtk_thermal.c:(.text+0x7fb0): undefined reference to `nvmem_cell_get' > mtk_thermal.c:(.text+0x7fd8): undefined reference to `nvmem_cell_read' > mtk_thermal.c:(.text+0x7fe4): undefined reference to `nvmem_cell_put' > > Without CONFIG_THERMAL, the driver cannot build, so this needs > to be a hard dependency. s/CONFIG_THERMAL/CONFIG_RESET_CONTROLLER/ ? > > For CONFIG_NVMEM, the header file allows building the driver even > when the subsystem is disabled, but we get the link error above > when nvmem is built as a module and the thermal driver is built-in, > so we can allow compile-testing when NVMEM is completely disabled, > but otherwise require the dependency. > > Signed-off-by: Arnd Bergmann <arnd@arndb.de> > --- > drivers/thermal/Kconfig | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/thermal/Kconfig b/drivers/thermal/Kconfig > index 5e7c97a3f1d8..75d164341f0d 100644 > --- a/drivers/thermal/Kconfig > +++ b/drivers/thermal/Kconfig > @@ -368,6 +368,8 @@ config INTEL_PCH_THERMAL > config MTK_THERMAL > tristate "Temperature sensor driver for mediatek SoCs" > depends on ARCH_MEDIATEK || COMPILE_TEST > + depends on NVMEM || (!NVMEM && COMPILE_TEST) This doesn't work as expected. When NVMEM is off I can still not select MTK_THERMAL, even when COMPILE_TEST is enabled. Even if it would work, do we really want this? It raises eyebrows and without reading the commit messages it's probably not clear what's going on here. I don't see that much value in it. Sascha -- 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 |
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web