linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Jason Gerecke <killertofu@gmail.com>
Cc: Jiri Kosina <jikos@kernel.org>,
	Jason Gerecke <jason.gerecke@wacom.com>,
	Benjamin Tissoires <benjamin.tissoires@redhat.com>,
	"open list:HID CORE LAYER" <linux-input@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] HID: wacom: add USB_HID dependency
Date: Fri, 28 Jul 2017 16:18:19 +0200	[thread overview]
Message-ID: <CAK8P3a3S_1LMXrQ_m5N3Cu4XQvcDAyQFGMEwcRCtYBwBaajdYg@mail.gmail.com> (raw)
In-Reply-To: <6C9C978F-447D-42A5-9245-894577F2944D@gmail.com>

On Fri, Jul 28, 2017 at 4:07 PM, Jason Gerecke <killertofu@gmail.com> wrote:
> On July 28, 2017 6:18:00 AM PDT, Arnd Bergmann <arnd@arndb.de> wrote:
>>The driver has gained a compile-time dependency that we should
>>express in Kconfig to avoid this link error:
>>
>
> Would conditional compilation be an acceptable alternative to adding
> a dependency? The USB_HID code is only used to check if the driver
> is working with a USB device. With USB_HID disabled, there's no need
> for the check so there's no need for the dependency.

I think that should work, e.g. you could replace the hid_is_using_ll_driver
and 'extern' defintions with a helper per ll-driver like

#ifdef CONFIG_USB_HID
extern bool hid_is_using_usb_driver(struct hid_device *hdev)
#else
static inline bool hid_is_using_usb_driver(struct hid_device *hdev)
{
       return false;
}
#endif

but is it worth it to avoid the dependency?

       Arnd

  reply	other threads:[~2017-07-28 14:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-28 13:18 [PATCH] HID: wacom: add USB_HID dependency Arnd Bergmann
2017-07-28 14:07 ` Jason Gerecke
2017-07-28 14:18   ` Arnd Bergmann [this message]
2017-07-28 14:24     ` Jason Gerecke
2017-07-28 14:29       ` Arnd Bergmann
2017-07-28 15:15         ` Jason Gerecke
2017-08-01  9:21           ` Jiri Kosina

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=CAK8P3a3S_1LMXrQ_m5N3Cu4XQvcDAyQFGMEwcRCtYBwBaajdYg@mail.gmail.com \
    --to=arnd@arndb.de \
    --cc=benjamin.tissoires@redhat.com \
    --cc=jason.gerecke@wacom.com \
    --cc=jikos@kernel.org \
    --cc=killertofu@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).