From patchwork Fri Sep 2 13:29:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Tissoires X-Patchwork-Id: 12964201 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4A68AC38145 for ; Fri, 2 Sep 2022 13:59:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236307AbiIBN7Z (ORCPT ); Fri, 2 Sep 2022 09:59:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34132 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238741AbiIBN6n (ORCPT ); Fri, 2 Sep 2022 09:58:43 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EF45EDA3ED for ; Fri, 2 Sep 2022 06:31:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1662125445; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fCPhsYotoB8FwxxQ6G8njzdsQ+qxsod3YHUxpf4SITc=; b=CuLqFjQh3FhwHJAokgL4GLMIbZ5A6PayktY1kIIILjiPoDK0uPpMKk+WKL3jHlHPNedIq+ D2V66hqzpMnpTt2mwgwsAJNrSF6QqkJwyv1ik6wGUz3Vih7ttSaCZa6rULOvlk546FibeW 9jA0JKBpzsYv/iObvmSwHbHruBeXo7E= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-247-FwYFBwSpMCmRXeQPdqzoTA-1; Fri, 02 Sep 2022 09:30:29 -0400 X-MC-Unique: FwYFBwSpMCmRXeQPdqzoTA-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 15F59823F1E; Fri, 2 Sep 2022 13:30:28 +0000 (UTC) Received: from plouf.redhat.com (unknown [10.39.193.218]) by smtp.corp.redhat.com (Postfix) with ESMTP id D1C19492CA2; Fri, 2 Sep 2022 13:30:23 +0000 (UTC) From: Benjamin Tissoires To: Greg KH , Jiri Kosina , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Song Liu , Yonghong Song , Kumar Kartikeya Dwivedi , John Fastabend , KP Singh , Shuah Khan , Dave Marchevsky , Joe Stringer , Jonathan Corbet Cc: Tero Kristo , linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, netdev@vger.kernel.org, bpf@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-doc@vger.kernel.org, Benjamin Tissoires Subject: [PATCH bpf-next v10 11/23] HID: Kconfig: split HID support and hid-core compilation Date: Fri, 2 Sep 2022 15:29:26 +0200 Message-Id: <20220902132938.2409206-12-benjamin.tissoires@redhat.com> In-Reply-To: <20220902132938.2409206-1-benjamin.tissoires@redhat.com> References: <20220902132938.2409206-1-benjamin.tissoires@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.85 on 10.11.54.9 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org Currently, we step into drivers/hid/ based on the value of CONFIG_HID. However, that value is a tristate, meaning that it can be a module. As per the documentation, if we jump into the subdirectory by following an obj-m, we can not compile anything inside that subdirectory in vmlinux. It is considered as a bug. To make things more friendly to HID-BPF, split HID (the HID core parameter) from HID_SUPPORT (do we want any kind of HID support in the system?), and make this new config a boolean. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Benjamin Tissoires --- no changes in v10 no changes in v9 no changes in v8 new in v7 --- drivers/Makefile | 2 +- drivers/hid/Kconfig | 20 +++++++++++--------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/drivers/Makefile b/drivers/Makefile index 057857258bfd..a24e6be80764 100644 --- a/drivers/Makefile +++ b/drivers/Makefile @@ -137,7 +137,7 @@ obj-$(CONFIG_CRYPTO) += crypto/ obj-$(CONFIG_SUPERH) += sh/ obj-y += clocksource/ obj-$(CONFIG_DCA) += dca/ -obj-$(CONFIG_HID) += hid/ +obj-$(CONFIG_HID_SUPPORT) += hid/ obj-$(CONFIG_PPC_PS3) += ps3/ obj-$(CONFIG_OF) += of/ obj-$(CONFIG_SSB) += ssb/ diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig index 6ce92830b5d1..4f24e42372dc 100644 --- a/drivers/hid/Kconfig +++ b/drivers/hid/Kconfig @@ -2,12 +2,18 @@ # # HID driver configuration # -menu "HID support" - depends on INPUT +menuconfig HID_SUPPORT + bool "HID bus support" + default y + depends on INPUT + help + This option adds core support for human interface device (HID). + You will also need drivers from the following menu to make use of it. + +if HID_SUPPORT config HID - tristate "HID bus support" - depends on INPUT + tristate "HID bus core support" default y help A human interface device (HID) is a type of computer device that @@ -24,8 +30,6 @@ config HID If unsure, say Y. -if HID - config HID_BATTERY_STRENGTH bool "Battery level reporting for HID devices" depends on HID @@ -1324,8 +1328,6 @@ config HID_KUNIT_TEST endmenu -endif # HID - source "drivers/hid/usbhid/Kconfig" source "drivers/hid/i2c-hid/Kconfig" @@ -1336,4 +1338,4 @@ source "drivers/hid/amd-sfh-hid/Kconfig" source "drivers/hid/surface-hid/Kconfig" -endmenu +endif # HID_SUPPORT