linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] power: supply: ucs1002: Fix build error without CONFIG_REGULATOR
@ 2019-05-10  7:18 YueHaibing
  2019-05-10 13:05 ` Guenter Roeck
  0 siblings, 1 reply; 3+ messages in thread
From: YueHaibing @ 2019-05-10  7:18 UTC (permalink / raw)
  To: sre, andrew.smirnov, sebastian.reichel, enric.balletbo, linux
  Cc: linux-kernel, linux-pm, YueHaibing

Fix gcc build error while CONFIG_REGULATOR is not set

drivers/power/supply/ucs1002_power.o: In function `ucs1002_probe':
drivers/power/supply/ucs1002_power.c:593: undefined reference to `devm_regulator_register'
drivers/power/supply/ucs1002_power.o:(.rodata+0x3b8): undefined reference to `regulator_enable_regmap'
drivers/power/supply/ucs1002_power.o:(.rodata+0x3c0): undefined reference to `regulator_disable_regmap'
drivers/power/supply/ucs1002_power.o:(.rodata+0x3c8): undefined reference to `regulator_is_enabled_regmap'

Add Kconfig dependency to CONFIG_REGULATOR.

Reported-by: Hulk Robot <hulkci@huawei.com>
Fixes: 9a2688e42638 ("power: supply: Add driver for Microchip UCS1002")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/power/supply/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/power/supply/Kconfig b/drivers/power/supply/Kconfig
index ef36bd2..26dacda 100644
--- a/drivers/power/supply/Kconfig
+++ b/drivers/power/supply/Kconfig
@@ -682,6 +682,7 @@ config CHARGER_UCS1002
 	tristate "Microchip UCS1002 USB Port Power Controller"
 	depends on I2C
 	depends on OF
+	depends on REGULATOR
 	select REGMAP_I2C
 	help
 	  Say Y to enable support for Microchip UCS1002 Programmable
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] power: supply: ucs1002: Fix build error without CONFIG_REGULATOR
  2019-05-10  7:18 [PATCH] power: supply: ucs1002: Fix build error without CONFIG_REGULATOR YueHaibing
@ 2019-05-10 13:05 ` Guenter Roeck
  2019-05-10 16:22   ` Sebastian Reichel
  0 siblings, 1 reply; 3+ messages in thread
From: Guenter Roeck @ 2019-05-10 13:05 UTC (permalink / raw)
  To: YueHaibing, sre, andrew.smirnov, sebastian.reichel, enric.balletbo
  Cc: linux-kernel, linux-pm

On 5/10/19 12:18 AM, YueHaibing wrote:
> Fix gcc build error while CONFIG_REGULATOR is not set
> 
> drivers/power/supply/ucs1002_power.o: In function `ucs1002_probe':
> drivers/power/supply/ucs1002_power.c:593: undefined reference to `devm_regulator_register'
> drivers/power/supply/ucs1002_power.o:(.rodata+0x3b8): undefined reference to `regulator_enable_regmap'
> drivers/power/supply/ucs1002_power.o:(.rodata+0x3c0): undefined reference to `regulator_disable_regmap'
> drivers/power/supply/ucs1002_power.o:(.rodata+0x3c8): undefined reference to `regulator_is_enabled_regmap'
> 
> Add Kconfig dependency to CONFIG_REGULATOR.
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Fixes: 9a2688e42638 ("power: supply: Add driver for Microchip UCS1002")
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>

Reviewed-by: Guenter Roeck <linux@roeck-us.net>

> ---
>   drivers/power/supply/Kconfig | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/power/supply/Kconfig b/drivers/power/supply/Kconfig
> index ef36bd2..26dacda 100644
> --- a/drivers/power/supply/Kconfig
> +++ b/drivers/power/supply/Kconfig
> @@ -682,6 +682,7 @@ config CHARGER_UCS1002
>   	tristate "Microchip UCS1002 USB Port Power Controller"
>   	depends on I2C
>   	depends on OF
> +	depends on REGULATOR
>   	select REGMAP_I2C
>   	help
>   	  Say Y to enable support for Microchip UCS1002 Programmable
> 


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] power: supply: ucs1002: Fix build error without CONFIG_REGULATOR
  2019-05-10 13:05 ` Guenter Roeck
@ 2019-05-10 16:22   ` Sebastian Reichel
  0 siblings, 0 replies; 3+ messages in thread
From: Sebastian Reichel @ 2019-05-10 16:22 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: YueHaibing, andrew.smirnov, enric.balletbo, linux-kernel, linux-pm

[-- Attachment #1: Type: text/plain, Size: 1007 bytes --]

Hi,

On Fri, May 10, 2019 at 06:05:06AM -0700, Guenter Roeck wrote:
> On 5/10/19 12:18 AM, YueHaibing wrote:
> > Fix gcc build error while CONFIG_REGULATOR is not set
> > 
> > drivers/power/supply/ucs1002_power.o: In function `ucs1002_probe':
> > drivers/power/supply/ucs1002_power.c:593: undefined reference to `devm_regulator_register'
> > drivers/power/supply/ucs1002_power.o:(.rodata+0x3b8): undefined reference to `regulator_enable_regmap'
> > drivers/power/supply/ucs1002_power.o:(.rodata+0x3c0): undefined reference to `regulator_disable_regmap'
> > drivers/power/supply/ucs1002_power.o:(.rodata+0x3c8): undefined reference to `regulator_is_enabled_regmap'
> > 
> > Add Kconfig dependency to CONFIG_REGULATOR.
> > 
> > Reported-by: Hulk Robot <hulkci@huawei.com>
> > Fixes: 9a2688e42638 ("power: supply: Add driver for Microchip UCS1002")
> > Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> 
> Reviewed-by: Guenter Roeck <linux@roeck-us.net>

Thanks, queued.

-- Sebastian

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-05-10 16:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-10  7:18 [PATCH] power: supply: ucs1002: Fix build error without CONFIG_REGULATOR YueHaibing
2019-05-10 13:05 ` Guenter Roeck
2019-05-10 16:22   ` Sebastian Reichel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).