Received: by 10.192.165.156 with SMTP id m28csp449581imm; Mon, 16 Apr 2018 03:07:27 -0700 (PDT) X-Google-Smtp-Source: AIpwx48pY9lU5+l2UgZLquBFQtaWq2pWd5OAzXfso103GWh97ct+WqPIEbThsv4/39f3AZVWGp6u X-Received: by 10.98.135.206 with SMTP id i197mr1893037pfe.52.1523873247135; Mon, 16 Apr 2018 03:07:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523873247; cv=none; d=google.com; s=arc-20160816; b=iBlOQQQdwQUU4veDeZiRjSgI5cl2iUKiTv/+jbaJloZb4sUKZo5zKoq3xrnvJPEcSm EKdt2ipgZy94HMj68eYk7kUUdyCfzhKvX+aMkgsGVa9bP1k/nhSOLQK5JphNfigsP5M4 2rZmwpW/kDbhbrJn8t5YVkmc7RLFGLcMxZMNAInyaQ5fG+sXf5XJZpHgDfBuhvKM07r9 JuklLI8uz3g4aSl167pqMxqM06fd3Tnf8W2PERGSMrnoolRbl4NjnLgab878KG6aSNaz 4qGT21ea8mauoM/XnPzL0PXhkaSmq60mwqfnmt6LOgaBA6SI84nBCUl16wi6gERrI1li JG3w== 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:to:subject:arc-authentication-results; bh=oKA3bLSXJIQhmXxQzzvJR6AH0dt1RKZzzq6FTbjIeBs=; b=Na7E27JPP/B0JGYhH6SR9Idb+45xxn6HiSz21wyqV17KyXqJLUZ1ii08OhFtchlp2r m2fXM0ZEapiwc6e/samIsOyhpTavKrHiq2o3QqBcBhWw45cXUceU8vhWtiOnTPogTgvq URBL5qv6qYhAWXI6R2b5UIe2+x9ByVVg4h5xOquxGGg0rl8YWGbNti6GgY7Jsqnxf6Ok svRL4HzShPF/j+R1fXjbXl1drpcySVV4qnVFu50+vBVHnb2BnDjjrBVM07CrrjzqREXJ ycacXEuDYzo46EDZ0Tj4lN/5dfAN0BrTysPOMC4sbb9oFCqUlGaxRdRM5eKqNUmnRso6 RZ8w== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f7si10473636pfa.299.2018.04.16.03.07.12; Mon, 16 Apr 2018 03:07:27 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753994AbeDPKCO (ORCPT + 99 others); Mon, 16 Apr 2018 06:02:14 -0400 Received: from mail-wr0-f194.google.com ([209.85.128.194]:45373 "EHLO mail-wr0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752879AbeDPKCM (ORCPT ); Mon, 16 Apr 2018 06:02:12 -0400 Received: by mail-wr0-f194.google.com with SMTP id u11so24236284wri.12 for ; Mon, 16 Apr 2018 03:02:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=oKA3bLSXJIQhmXxQzzvJR6AH0dt1RKZzzq6FTbjIeBs=; b=Qq1+i9yiXWqjLAye00jIypSof5wr5lQD1m+YP6dy68YPKyDN5HQfUpF5d1Lb45KRso 1aGBTnZ+Yb4NQTmN1M/s2hCLkqmBHXIMSPLLYMuBZb5E2YZHckl4UmKU3j4WtGw4xKRR 864yA35H6c1n9kmPD7BY0dYdsZ8zEBURM9sYHASnNx/1H+zWo4eEoGOe/xZaOLkZepXP Smc5TpzV/I8OVz85ALMpOG80/3L/v0aHf5cKDvZ/U5QLHOd3VbAVoLMR/Si/YEk2XyrG zVlaomu1jo+oYpM3COvXQsIvnn4m2hfu0GCPxP4UOgRTCTZVS+bgbJeqf62jWhspzskC msrQ== X-Gm-Message-State: ALQs6tD5q2j8Lm6SXRedU1SOQbhbqUehoMt2vlwvLgDEbnOCuzXNfRCR 7AoVZ/Y+qVMohfo2r8Lw7rHeKyVGNBs= X-Received: by 10.80.196.71 with SMTP id w7mr7515388edf.87.1523872931154; Mon, 16 Apr 2018 03:02:11 -0700 (PDT) Received: from shalem.localdomain (546A5441.cm-12-3b.dynamic.ziggo.nl. [84.106.84.65]) by smtp.gmail.com with ESMTPSA id b36sm6966033edd.81.2018.04.16.03.02.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 16 Apr 2018 03:02:10 -0700 (PDT) Subject: Re: [PATCH] extcon: axp288: fix link error To: Tobias Regnery , cw00.choi@samsung.com, myungjoo.ham@samsung.com, wens@csie.org, linux-kernel@vger.kernel.org References: <20180416084003.13847-1-tobias.regnery@gmail.com> From: Hans de Goede Message-ID: <60239813-fabe-a479-e5fc-7bd68cc94211@redhat.com> Date: Mon, 16 Apr 2018 12:02:09 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20180416084003.13847-1-tobias.regnery@gmail.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 Hi, On 16-04-18 10:40, Tobias Regnery wrote: > With CONFIG_AXP288=y and CONFIG_USB_COMMON=n there is the following link > error: > > drivers/extcon/extcon-axp288.o: In function `axp288_put_role_sw': > extcon-axp288.c:(.text+0xa0): undefined reference to `usb_role_switch_put' > drivers/extcon/extcon-axp288.o: In function `axp288_usb_role_work': > extcon-axp288.c:(.text+0xec): undefined reference to `usb_role_switch_get_role' > extcon-axp288.c:(.text+0x12c): undefined reference to `usb_role_switch_set_role' > drivers/extcon/extcon-axp288.o: In function `axp288_extcon_probe': > extcon-axp288.c:(.text+0x59d): undefined reference to `usb_role_switch_get' > > The above functions are defined in drivers/usb/common/roles.c, but the build > system only enters the common directory depending on CONFIG_USB_COMMON. Fix > this by selecting the USB_COMMON symbol. > > Fixes: d54f063cdbe4 ("extcon: axp288: Set USB role where necessary") > Signed-off-by: Tobias Regnery Patch looks good to me, thanks: Reviewed-by: Hans de Goede Regards, Hans > --- > Hi, > > there is another solution for this problem: replace depends on USB_SUPPORT > with depends on USB, but since CONFIG_USB selects other symbols I went > with the minimal fix and select the USB_COMMON symbol. > --- > drivers/extcon/Kconfig | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/extcon/Kconfig b/drivers/extcon/Kconfig > index de15bf55895b..0897bee54c2b 100644 > --- a/drivers/extcon/Kconfig > +++ b/drivers/extcon/Kconfig > @@ -31,6 +31,7 @@ config EXTCON_ARIZONA > config EXTCON_AXP288 > tristate "X-Power AXP288 EXTCON support" > depends on MFD_AXP20X && USB_SUPPORT && X86 > + select USB_COMMON > select USB_ROLE_SWITCH > help > Say Y here to enable support for USB peripheral detection >