Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2148691iof; Tue, 7 Jun 2022 21:22:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxd2rKEG62LDDG4/WI7XKbNTe8zoLTBOTbdYyQtQThUhNPqRW2fS5xM4ce9ipmXSPURweFW X-Received: by 2002:a17:90b:1e01:b0:1e3:1f4c:dd71 with SMTP id pg1-20020a17090b1e0100b001e31f4cdd71mr36205678pjb.168.1654662147032; Tue, 07 Jun 2022 21:22:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654662147; cv=none; d=google.com; s=arc-20160816; b=QGJJKWuZAaozBELlIJYEz3WBJ2tGo2KZCae2AKhtvCkCgmlT00eQGuKoiC+97HEgIA QWxmPERr/1bJBZn7zgf1RtaQayK/zzyZlviBOgYk3wcvdBeaML5nIneCsfyg+jYBXidH BTnKnChXjc71P8ZrLSuHcodffp1KtdVoGG9EuQRKxRaxfQlCKzJTIo4XUSu86JQ/kaDK +sg5unC+jby2umPWm68CQOO93QnNkXE7AbUN4ZGzgw+t6Lxk6+RruSYwhbm+z9TGh4Q4 NgbSXLuLsOGJtHfaFuTS2IyNjrfGh9jZIGOzwj/2B/F+exCzPFrtZe7qTVxiP3SAm+uz B/cg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=DtvRQw2+86xeDzJwRicU3x/+zi51OerzqdJt0EUpOYo=; b=q66AYwlvDgjSmxt4jq46GdSKG3T1vxyb1y7uVEdr8XfaTAhsiz4/CwS2eCzk1Jyu2F ewRPakfxwABMFPkk0j4Jm4NN6z5TOBnWyWleRf/JBx4FJ68vbWlo2ptmrvk90CfUV6OO lCUoFBUea6eNdfaQwSAGKACUG5wRFUqbWZQADC3XInCr32F/B+QELfY8XNCRd+XyUfH7 P9OY/yxYWKk/VfhdjiW0+/Nftah0pe1o5CM2oEo7lMLVqBzUfDkau/Qho3zu+/8Mf/KZ INGzn2qtaovs8w0ddlXI1m32tTCeQDkdOzmwxuWcouG0+PewPK+RnwIFYD1JokcpjMYL t6cg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=lhSM0F7m; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id r124-20020a632b82000000b003faad5e0818si26244218pgr.720.2022.06.07.21.22.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 21:22:27 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=lhSM0F7m; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 2F5A2443E13; Tue, 7 Jun 2022 21:11:50 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1385392AbiFGW1H (ORCPT + 99 others); Tue, 7 Jun 2022 18:27:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55304 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1381315AbiFGVRe (ORCPT ); Tue, 7 Jun 2022 17:17:34 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C08FA222369; Tue, 7 Jun 2022 11:58:44 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 8F65AB82399; Tue, 7 Jun 2022 18:58:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D6F84C385A5; Tue, 7 Jun 2022 18:58:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1654628322; bh=Gd+81C6t792u/OyBDJ9pfgOthfvlR8CL7NYdML5/hfE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lhSM0F7mrceLObPjFWwHoP2z537rZkyLUC2ONtau0Ry95LKnubtenfJdRAQhzre/T JddQYehsnu2DOwF5+P5dTa/mzqzOmv0likvoKMFkA3T8cU0b0obiQdrDjA3eS7EGo5 TpLlb3LNuPujxrYFI9KUqIuUTOfFo+VEMismlloY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, kernel test robot , Finn Thain , Randy Dunlap , Christophe Leroy , Michael Ellerman , Sasha Levin Subject: [PATCH 5.18 246/879] macintosh/via-pmu: Fix build failure when CONFIG_INPUT is disabled Date: Tue, 7 Jun 2022 18:56:04 +0200 Message-Id: <20220607165009.993135897@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220607165002.659942637@linuxfoundation.org> References: <20220607165002.659942637@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Finn Thain [ Upstream commit 86ce436e30d86327c9f5260f718104ae7b21f506 ] drivers/macintosh/via-pmu-event.o: In function `via_pmu_event': via-pmu-event.c:(.text+0x44): undefined reference to `input_event' via-pmu-event.c:(.text+0x68): undefined reference to `input_event' via-pmu-event.c:(.text+0x94): undefined reference to `input_event' via-pmu-event.c:(.text+0xb8): undefined reference to `input_event' drivers/macintosh/via-pmu-event.o: In function `via_pmu_event_init': via-pmu-event.c:(.init.text+0x20): undefined reference to `input_allocate_device' via-pmu-event.c:(.init.text+0xc4): undefined reference to `input_register_device' via-pmu-event.c:(.init.text+0xd4): undefined reference to `input_free_device' make[1]: *** [Makefile:1155: vmlinux] Error 1 make: *** [Makefile:350: __build_one_by_one] Error 2 Don't call into the input subsystem unless CONFIG_INPUT is built-in. Reported-by: kernel test robot Signed-off-by: Finn Thain Tested-by: Randy Dunlap Reviewed-by: Christophe Leroy Acked-by: Randy Dunlap Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/5edbe76ce68227f71e09af4614cc4c1bd61c7ec8.1649326292.git.fthain@linux-m68k.org Signed-off-by: Sasha Levin --- drivers/macintosh/Kconfig | 4 ++++ drivers/macintosh/Makefile | 3 ++- drivers/macintosh/via-pmu.c | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/macintosh/Kconfig b/drivers/macintosh/Kconfig index 5cdc361da37c..3942db15a2b8 100644 --- a/drivers/macintosh/Kconfig +++ b/drivers/macintosh/Kconfig @@ -67,6 +67,10 @@ config ADB_PMU this device; you should do so if your machine is one of those mentioned above. +config ADB_PMU_EVENT + def_bool y + depends on ADB_PMU && INPUT=y + config ADB_PMU_LED bool "Support for the Power/iBook front LED" depends on PPC_PMAC && ADB_PMU diff --git a/drivers/macintosh/Makefile b/drivers/macintosh/Makefile index 49819b1b6f20..712edcb3e0b0 100644 --- a/drivers/macintosh/Makefile +++ b/drivers/macintosh/Makefile @@ -12,7 +12,8 @@ obj-$(CONFIG_MAC_EMUMOUSEBTN) += mac_hid.o obj-$(CONFIG_INPUT_ADBHID) += adbhid.o obj-$(CONFIG_ANSLCD) += ans-lcd.o -obj-$(CONFIG_ADB_PMU) += via-pmu.o via-pmu-event.o +obj-$(CONFIG_ADB_PMU) += via-pmu.o +obj-$(CONFIG_ADB_PMU_EVENT) += via-pmu-event.o obj-$(CONFIG_ADB_PMU_LED) += via-pmu-led.o obj-$(CONFIG_PMAC_BACKLIGHT) += via-pmu-backlight.o obj-$(CONFIG_ADB_CUDA) += via-cuda.o diff --git a/drivers/macintosh/via-pmu.c b/drivers/macintosh/via-pmu.c index 4b98bc26a94b..2109129ea1bb 100644 --- a/drivers/macintosh/via-pmu.c +++ b/drivers/macintosh/via-pmu.c @@ -1459,7 +1459,7 @@ pmu_handle_data(unsigned char *data, int len) pmu_pass_intr(data, len); /* len == 6 is probably a bad check. But how do I * know what PMU versions send what events here? */ - if (len == 6) { + if (IS_ENABLED(CONFIG_ADB_PMU_EVENT) && len == 6) { via_pmu_event(PMU_EVT_POWER, !!(data[1]&8)); via_pmu_event(PMU_EVT_LID, data[1]&1); } -- 2.35.1