Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2084788yba; Fri, 10 May 2019 06:08:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqzLKSTb5P7e8BgByDL+xy4ju80AV8ImGgvUFqjAx68noL5VldHDsN5KoZs5h/qFHVf1Id08 X-Received: by 2002:aa7:980e:: with SMTP id e14mr13783428pfl.142.1557493683443; Fri, 10 May 2019 06:08:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557493683; cv=none; d=google.com; s=arc-20160816; b=BhnB9xruTKzyG68HB5IeKjnAnSXUIFy0CJqmoTi9upu7oJEXYqU/+6C6Qi1CN0iL3g LmEM0v93QqTwf684bYxGYVEvbPRWYEr0zrZctf5DvmtzmKObh5PnVHp/rQiyulqL2PqR QNrxGpygx4b/wCsiOit1kOd70nvTOJJozaJgCiJtCQD4XalxVR4tWF61iW8yQ6Vc36Nd 0O8qCCbTaDXbmVYPw1cLBYQq6fSHO4mLz2gQY29nA716/GKuon+UvdpoeR6c9nadPyd2 ga/jj4dFFD+Msu1di0MM6G+OlpkuNOilaghDUFPtJPHQqAA4tWq7EbuEWcZjNlKgtKP3 vryQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=fpkFptDpQZm55D6haD3JjJF9CnC6Z82ZE89k2GMPDNU=; b=fe70rTx+8AFWm8SlLNl6+LefaWC7kLB34M+zTd0Qzmnyek1VSEH/YOwu78bel/oYgk ntIxhJex5xDOZpbD0BszwGA4UdTaFciDoUyRSJAK2h6ZjHMn2XXdBH9iY6JrN2PaEiee 0VIWRv/y/IvttAXPUn+WDcPqv126+NbWWwnJ+QwPUwmFU61Hp945sMq5NbfJFLb5yS/8 Pgg7odmnaWxsdyL6pZd7P9jD6t5YmWP/wbXXS2CCDo2TnrXbZlv4BIA7K9+yPj5J7S4V 7F0XpeWH5RbEvSzJ2Js7ZkTnWOznZRz0bJImUhAEYGGqJKP3hwjQPtRRevbcW4Dw10Vv TyAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=Cmq1aMrT; 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 y8si7489969pgo.168.2019.05.10.06.07.46; Fri, 10 May 2019 06:08:03 -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; dkim=fail header.i=@gmail.com header.s=20161025 header.b=Cmq1aMrT; 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 S1727520AbfEJNFK (ORCPT + 99 others); Fri, 10 May 2019 09:05:10 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:34240 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727174AbfEJNFJ (ORCPT ); Fri, 10 May 2019 09:05:09 -0400 Received: by mail-pg1-f194.google.com with SMTP id c13so3021908pgt.1; Fri, 10 May 2019 06:05:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=fpkFptDpQZm55D6haD3JjJF9CnC6Z82ZE89k2GMPDNU=; b=Cmq1aMrTSDioFuOgSDGJ+Vw9DKxqHMVvStU7l/OlsJiKZQXOyzsG0AZv8fyz5VyUAj Zz3qK2Mb06CmSPFghLMyLh4x0y2ylW9CMHpAsYVpLMoyUbi10mmhk3QXWZVglFplXkZ6 8J6rJOngm4jrOz8LL20+1yQOv1JQ7GdnJ2zCKLpYR9DB07UIJW8HPn6Tl01qOKJ05ltB VDupjhqf3DHBHAvsIewy3sfk4sryVkIT8TX2kf7VCgG1pK/fcXXxdmSX26bKDYTXZz2f qBtA5+YEyAWbqtkmH7jea8z+yddm8gPdVdu2xqB50wLUHaoqXDjNAxo69YAWYUAmByFr Tvhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=fpkFptDpQZm55D6haD3JjJF9CnC6Z82ZE89k2GMPDNU=; b=ljQiSBuYinIXfbjkjUWX2rQd4gUmZyNWLN5hmMepPqLSIPJUx0nLinHBPtO4E51w6n w8/+kIJJvSe3Ert4oDKxVz7zOxYz1nLmrj680JilNut3Bg1CERNkZEIidcYAJU+uHVMO D1COxvE3pUaX6nK7UBaFRMQ0CniVHLGoqHLoZnFYrnNgOn4eXDH8LyQmzF9kcc7TUDKX bK1qz8a5nuMR4DqQ1BVu5N44GTFbWcfO8fvZi0lLRXVAQ6+tA2L9cIfn+xkSTkvwSdna VBHT+/Syn6fZdZfaj/z2gOzEDJMNtKssJHTXMCsoL0OZhQElEYLlOemWaGfjR5hjw+SQ r1WA== X-Gm-Message-State: APjAAAX8MHnbodJXfo92BtgK7h+a2f+fwgMRXVC0fLqEdSVw4RGb5tjV beBNwOcaQe49gIyxImnRR/SOk0D5 X-Received: by 2002:a62:520b:: with SMTP id g11mr13374539pfb.215.1557493508647; Fri, 10 May 2019 06:05:08 -0700 (PDT) Received: from server.roeck-us.net ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id 63sm11348932pfu.95.2019.05.10.06.05.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 10 May 2019 06:05:07 -0700 (PDT) Subject: Re: [PATCH] power: supply: ucs1002: Fix build error without CONFIG_REGULATOR To: YueHaibing , sre@kernel.org, andrew.smirnov@gmail.com, sebastian.reichel@collabora.com, enric.balletbo@collabora.com Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org References: <20190510071823.2984-1-yuehaibing@huawei.com> From: Guenter Roeck Message-ID: <9b37be09-c323-94c6-8bba-44e854597e95@roeck-us.net> Date: Fri, 10 May 2019 06:05:06 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <20190510071823.2984-1-yuehaibing@huawei.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > Fixes: 9a2688e42638 ("power: supply: Add driver for Microchip UCS1002") > Signed-off-by: YueHaibing Reviewed-by: Guenter Roeck > --- > 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 >