Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp2190818pxp; Mon, 21 Mar 2022 13:28:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzuJ0EJaGrpvket7WZ+RDcLI7Kz4D8hYDRIfqtNvJuYWcY+WGZ4xzbwB2tGAXxLMCOBwysP X-Received: by 2002:a05:6402:298c:b0:418:f55e:fdda with SMTP id eq12-20020a056402298c00b00418f55efddamr24272319edb.230.1647894492712; Mon, 21 Mar 2022 13:28:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647894492; cv=none; d=google.com; s=arc-20160816; b=El4EFxOfs9iVL+2rUAVKxc5AAVj5CHk/ZCxwdqNVDDOY4EFWHLdLijhRStwQj0wacM 92YB1HJ6GpfYUSdAs2roaM9VL3Q/vg55renWY1bAR46M0+PpMDzhh1D53FjZ9tXXggWK 1hgI7f9qoPqbOo3IeDcoBDsZvHpkdSiE77NzoM5D28Q1rHVlAz2z0XSmvaVzkZKODM8K HcCjmuuQ6vAOnmpqrEYxaZrzATkauoO8Tar8yFOQA+bJbze73FJMrGvoiCWrKfid4KBa onbwlZbSe/aJtx+0Itbncnh/Gi3r0VaSrkHdQdOkhb8T+n19ediUuVb7VlvIBOGVbHIP cCcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:date:subject:from:message-id:cc:to :dkim-signature; bh=QrAvONOTZWCmMh13WeZL23sVu55xrRfpqIerLSK6XQk=; b=IepPpJOepntUGsxpdUiu3/VUGeiWX6VX78Bj3wCVcCyRdn5l98HOIOzn39jwBdxaVr t8HoAWdl2wqYXjMkRJroabPF93oEOQwGw+lBYgCRvgsB/r6Gdhndi5SLhgqPUA8+4QUf EwKxS312pazAXoszIWhfl0KAQbvRRdwQRXJjDeJYMXkvKHpI+A03grzC0dhcDJTBrKSN GcO8sRdwaUNNHkIni97AqfrmIG1Dw4FhgohhODV+m9mdQwoD/O0+DmsBkC3O1NxqtlVK HiSSWC7kb6msxPAjxGERP23Wulwq8sfHWCpiUBM+dDLvieU29DZ6siF2RUxMPsm0yrQN Y5eg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=ihv6lRRb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i17-20020a170906699100b006df846c75cesi7782039ejr.853.2022.03.21.13.27.47; Mon, 21 Mar 2022 13:28:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=ihv6lRRb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242035AbiCSEYe (ORCPT + 99 others); Sat, 19 Mar 2022 00:24:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52098 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239863AbiCSEYd (ORCPT ); Sat, 19 Mar 2022 00:24:33 -0400 Received: from wout1-smtp.messagingengine.com (wout1-smtp.messagingengine.com [64.147.123.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 951A07EA24 for ; Fri, 18 Mar 2022 21:23:12 -0700 (PDT) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id B33D33200D53; Sat, 19 Mar 2022 00:23:08 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Sat, 19 Mar 2022 00:23:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:date:date:from:from:in-reply-to :message-id:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=QrAvON OTZWCmMh13WeZL23sVu55xrRfpqIerLSK6XQk=; b=ihv6lRRbOf2WtAhJ2xqH6u ZGRcuWNskZAbYkkp+0kwEBrVVFbdtF6ePJsjstBrnQiiJzN0Kq/LwoXa2xw/7Q1Y qkEwlVzjY3SoYCWn/6FwhxXc4N4YtiJu2APFcML+6v/MdPmjpO86lulvqE8szxXs fcxejzpGRbJ7MRyrt1tNJMkmv+JFVO9EWeTXh743tdutSKy/2d/26ZiL3hmb9B4K LoRw3y7YUuo9tyOfnr+Xru1dGYu7RYA3jZzIw1prrZT6XWGBM8i9A3wg9owoahcM Fi1gJVc6A5uijKmGS4RZQD8Jz4vHSdKMMwjEKocMowpRJRgOBa1jHl6wIP4m1emQ == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrudefjedgieelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepvffkhffuffestddtredttddttdenucfhrhhomhephfhinhhnucfvhhgrihhn uceofhhthhgrihhnsehlihhnuhigqdhmieekkhdrohhrgheqnecuggftrfgrthhtvghrnh eptdelteekleekkedvueejheekgfdvtdehhefhteeitefhteefgefhudehveevleelnecu vehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepfhhthhgrih hnsehlihhnuhigqdhmieekkhdrohhrgh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 19 Mar 2022 00:23:06 -0400 (EDT) To: Benjamin Herrenschmidt Cc: "Michael Ellerman" , "Geert Uytterhoeven" , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Message-Id: From: Finn Thain Subject: [PATCH] macintosh/via-pmu: Fix build failure when CONFIG_INPUT is disabled Date: Sat, 19 Mar 2022 15:18:29 +1100 X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham 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 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 Cc: Michael Ellerman Cc: Geert Uytterhoeven Signed-off-by: Finn Thain --- drivers/macintosh/Makefile | 5 ++++- drivers/macintosh/via-pmu.c | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/macintosh/Makefile b/drivers/macintosh/Makefile index 49819b1b6f20..eaf28b1c272f 100644 --- a/drivers/macintosh/Makefile +++ b/drivers/macintosh/Makefile @@ -12,7 +12,10 @@ 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 +ifeq ($(CONFIG_INPUT), y) +obj-$(CONFIG_ADB_PMU) += via-pmu-event.o +endif 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..55afa6dfa263 100644 --- a/drivers/macintosh/via-pmu.c +++ b/drivers/macintosh/via-pmu.c @@ -1457,12 +1457,14 @@ pmu_handle_data(unsigned char *data, int len) if (pmu_battery_count) query_battery_state(); pmu_pass_intr(data, len); +#ifdef CONFIG_INPUT /* len == 6 is probably a bad check. But how do I * know what PMU versions send what events here? */ if (len == 6) { via_pmu_event(PMU_EVT_POWER, !!(data[1]&8)); via_pmu_event(PMU_EVT_LID, data[1]&1); } +#endif break; default: -- 2.32.0