From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752593AbbBRVHP (ORCPT ); Wed, 18 Feb 2015 16:07:15 -0500 Received: from mout.kundenserver.de ([212.227.126.187]:57874 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751787AbbBRVHO (ORCPT ); Wed, 18 Feb 2015 16:07:14 -0500 From: Arnd Bergmann To: gregkh@linuxfoundation.org, Yoshihiro Shimoda , linux-usb@vger.kernel.org, Felipe Balbi , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2] usb: renesas: fix extcon dependency Date: Wed, 18 Feb 2015 22:07:07 +0100 Message-ID: <12432955.vUbSfWRFHl@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:yfdkVk+8ok8z8VCkaos1JXcHeyMlVaYng9TB3cX7bhUBnzc0T4E LueNyde9a7+eOG9oA2pLTtEiKDZOgU57S1Y6tORnWuIhITIlppJP17sUQ6OoyEpDkdw1+5E cmUar8/FoPOU7OBgNpJyxPqZk+Ik0UtHm+2amP4W8ypegOPz8dJxSpUtC4P0Tv0KnMDxEG3 mN8xSmyNaPtKtgbf7gQJQ== X-UI-Out-Filterresults: notjunk:1; Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The renesas usbhs driver calls extcon_get_edev_by_phandle(), which is defined in drivers/extcon/extcon-class.c, and that can be a loadable module. If the extcon-class support is disabled, usbhs will work correctly for all devices that do not need extcon. However, if extcon-class is a loadable module, and usbhs is built-in, the kernel fails to link. In order to solve that, we need a Kconfig dependency that allows extcon to be disabled but does not allow usbhs built-in if extcon is a module. Signed-off-by: Arnd Bergmann diff --git a/drivers/usb/renesas_usbhs/Kconfig b/drivers/usb/renesas_usbhs/Kconfig index de83b9d0cd5c..ebc99ee076ce 100644 --- a/drivers/usb/renesas_usbhs/Kconfig +++ b/drivers/usb/renesas_usbhs/Kconfig @@ -6,6 +6,7 @@ config USB_RENESAS_USBHS tristate 'Renesas USBHS controller' depends on USB_GADGET depends on ARCH_SHMOBILE || SUPERH || COMPILE_TEST + depends on EXTCON || !EXTCON # if EXTCON=m, USBHS cannot be built-in default n help Renesas USBHS is a discrete USB host and peripheral controller chip