Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752017AbdG1OSW (ORCPT ); Fri, 28 Jul 2017 10:18:22 -0400 Received: from mail-oi0-f65.google.com ([209.85.218.65]:35823 "EHLO mail-oi0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751690AbdG1OSU (ORCPT ); Fri, 28 Jul 2017 10:18:20 -0400 MIME-Version: 1.0 In-Reply-To: <6C9C978F-447D-42A5-9245-894577F2944D@gmail.com> References: <20170728131826.180483-1-arnd@arndb.de> <6C9C978F-447D-42A5-9245-894577F2944D@gmail.com> From: Arnd Bergmann Date: Fri, 28 Jul 2017 16:18:19 +0200 X-Google-Sender-Auth: t4aVrefZ18sbWEc0OFhSmFlzyQg Message-ID: Subject: Re: [PATCH] HID: wacom: add USB_HID dependency To: Jason Gerecke Cc: Jiri Kosina , Jason Gerecke , Benjamin Tissoires , "open list:HID CORE LAYER" , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 914 Lines: 26 On Fri, Jul 28, 2017 at 4:07 PM, Jason Gerecke wrote: > On July 28, 2017 6:18:00 AM PDT, Arnd Bergmann 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