[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK8P3a3S_1LMXrQ_m5N3Cu4XQvcDAyQFGMEwcRCtYBwBaajdYg@mail.gmail.com>
Date: Fri, 28 Jul 2017 16:18:19 +0200
From: Arnd Bergmann <arnd@...db.de>
To: Jason Gerecke <killertofu@...il.com>
Cc: Jiri Kosina <jikos@...nel.org>,
Jason Gerecke <jason.gerecke@...om.com>,
Benjamin Tissoires <benjamin.tissoires@...hat.com>,
"open list:HID CORE LAYER" <linux-input@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] HID: wacom: add USB_HID dependency
On Fri, Jul 28, 2017 at 4:07 PM, Jason Gerecke <killertofu@...il.com> wrote:
> On July 28, 2017 6:18:00 AM PDT, Arnd Bergmann <arnd@...db.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
Powered by blists - more mailing lists