From: Hans de Goede <hdegoede@redhat.com>
To: Tobias Regnery <tobias.regnery@gmail.com>,
cw00.choi@samsung.com, myungjoo.ham@samsung.com, wens@csie.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] extcon: axp288: fix link error
Date: Mon, 16 Apr 2018 12:02:09 +0200 [thread overview]
Message-ID: <60239813-fabe-a479-e5fc-7bd68cc94211@redhat.com> (raw)
In-Reply-To: <20180416084003.13847-1-tobias.regnery@gmail.com>
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 <tobias.regnery@gmail.com>
Patch looks good to me, thanks:
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
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
>
prev parent reply other threads:[~2018-04-16 10:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-16 8:40 Tobias Regnery
2018-04-16 10:02 ` Hans de Goede [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=60239813-fabe-a479-e5fc-7bd68cc94211@redhat.com \
--to=hdegoede@redhat.com \
--cc=cw00.choi@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=myungjoo.ham@samsung.com \
--cc=tobias.regnery@gmail.com \
--cc=wens@csie.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®