Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1778889yba; Fri, 10 May 2019 00:32:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqxdmEjQ9uV/EPeEdeRX+ef47esgU1sJOwIENMDx4NaV74tYVmwHq42HAHqsUra7SXaCvDxV X-Received: by 2002:a17:902:e00a:: with SMTP id ca10mr11407721plb.18.1557473552532; Fri, 10 May 2019 00:32:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557473552; cv=none; d=google.com; s=arc-20160816; b=SGSrUiwZ9Ft2rARQypEX56t76hLoQI5HcuoXmBitUvuc3ZKncLL8JybdKaAkK5z0x+ y3IFc+Sz8DesbWwj+NDtRYMRAwi0S8z/ZjDKQAgPXoq77SfZa83Sd0yOOUXUYxGz/xPJ 6g+Dl0coJ7MrP8XEhoCxeltEOU8EezQyGskRb55DAXAoWsMYKTegUuvE7qEPuTYFeLir mGymQ3DrUq3j375NnulVTTKMO+pg1h2wiPxBuNWnihjxoemOYFoG731BJKxVFpOthioP 3aKTjP7PqoOcgdzBCke7BC4EFcjpYI0Xwsfix6D0aA2b9UhJeRTEeWFXV9rZVc16MZU6 sXYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=/KOE5VmPl6qeumDK0hn+wFFmtQgM6Cxjhdbcoy/UCbE=; b=ywCApxcQemry2b6upKYtnyap+jdzGVTaFIcAlGBl/RdsnMHUdBh8s554Q4oo69+kcE e1kcTmJTf6an8hFrLhHG2Jfqqk3sLYgaAVA2BW20Um9WPETCJBgrzkoH9uXFvZOxjZng XIkQT7AqMqZZxPsgdJ57HHUTD+v8XwPdXqzHuVcwTTpbjCjprBp09AlpeVh6iyHyBpF0 6TcK7c8EeRiSLwZD70DUW4JqZmAHJAHfdU1EvLP7xrertVV0aHf36Mqv95UjXtDcLcSv TjqYmwshagyDotNOAr89MFmTvO7wEP5MuYobX9TvovqdyF5whvrO4BMQvZNuQSrgdBYB Hb1g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w1si6092011plp.4.2019.05.10.00.32.16; Fri, 10 May 2019 00:32:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727163AbfEJHSx (ORCPT + 99 others); Fri, 10 May 2019 03:18:53 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:7738 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726855AbfEJHSw (ORCPT ); Fri, 10 May 2019 03:18:52 -0400 Received: from DGGEMS413-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 6A9479CB491DD3E1EA86; Fri, 10 May 2019 15:18:48 +0800 (CST) Received: from localhost (10.177.31.96) by DGGEMS413-HUB.china.huawei.com (10.3.19.213) with Microsoft SMTP Server id 14.3.439.0; Fri, 10 May 2019 15:18:40 +0800 From: YueHaibing To: , , , , CC: , , YueHaibing Subject: [PATCH] power: supply: ucs1002: Fix build error without CONFIG_REGULATOR Date: Fri, 10 May 2019 15:18:23 +0800 Message-ID: <20190510071823.2984-1-yuehaibing@huawei.com> X-Mailer: git-send-email 2.10.2.windows.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.177.31.96] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Fixes: 9a2688e42638 ("power: supply: Add driver for Microchip UCS1002") Signed-off-by: YueHaibing --- 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