Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp445013iog; Mon, 13 Jun 2022 06:07:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxiWVoahZJUo3D768tgyuG+6LiIOH6Ze7u77jfNgpEzHuOfS/8Oi007ebEKTORiafdAGXVT X-Received: by 2002:a17:90b:3908:b0:1e3:1a48:16b7 with SMTP id ob8-20020a17090b390800b001e31a4816b7mr15820613pjb.174.1655125594992; Mon, 13 Jun 2022 06:06:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655125594; cv=none; d=google.com; s=arc-20160816; b=HL2nSNJalr4kKz+6sSvgtwGUZNjNfu6jacEzk/gGCLG279LautCa/fk2YU2dggtY44 8TBosfywQ6gwq+sg2Vl7W9SofT3naNnFDVLTMmd3adyLN9FODSMHlKSoMHdRLVXHbS/m TchZU742xxoN1bclhyJ1O6RjjwMnLnu9vGd64dWe/02NCAbqxIW71paVo+gubFkfARoz GxwGUIi8FzFW4oFhizOkE4XwHfq9W62M60mbrB7kazwoyY8lmHLdms469B2noPa8PX2H yw4b6fUm5t+sgp6oc/L/neM4vIDodV1nX1+xc8aMIYcv3cW/k2b9pXYL3ez7UimEExkR LHbQ== 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=PgiujUwjhwSRstoWCqmYAeZEjpVG+a53EK0twOWltrw=; b=Fp5vqlzHTHJlXuMIPe+MvzN0N18mIHAVSdi9cBO3DDE70AduGJRSV6F2I9S7TIzldB lnxOqfPfu0npD1PppbNiQUcybfsjfO6263P01DaeJK+oECAeaQV3SM8R3kg6nTu4Zhzc bWVglAw7w20ReoDhC17ka13zViW/68+qhBRkAlWC3WUrD2B4JOX1/dKKDLrhMDVqbxIw 4xNgCtKGdkSfWT8is7u+u9BCrO/lHRBCM1IkHyUPWN4QxTJoF0qhS9cDPVkegMhWuNpS 6nQeUtTyuIikiGhZDtFrJrdzgdi91WmrVBpfs0ZR+59ZRQqgEF7nUKoa7CViuANGGMSe hIZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=p9AWVFEa; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w69-20020a638248000000b0040554829f04si4700391pgd.466.2022.06.13.06.06.15; Mon, 13 Jun 2022 06:06:34 -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=@linuxfoundation.org header.s=korg header.b=p9AWVFEa; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351773AbiFMLIQ (ORCPT + 99 others); Mon, 13 Jun 2022 07:08:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36510 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350934AbiFMLCG (ORCPT ); Mon, 13 Jun 2022 07:02:06 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 30C753139E; Mon, 13 Jun 2022 03:33:15 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 4F01B60FF9; Mon, 13 Jun 2022 10:33:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5ECC7C385A2; Mon, 13 Jun 2022 10:33:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1655116386; bh=HHUUTpCu3/M+jd/CMl3UC2nZY8phCUN4dHTmnt8yaWg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=p9AWVFEa9HfVheKyqNgX/dkIwC1kOe3sR6r8v4kkq6ZIiN2fW2ppHI1PdlIMXXWY1 5v8BJgzcRQD5xKIYyyYVMLEa/PJnFcHT8RGEsk/4r1yStzTW5cEqPoxadQvWZDwFWi qpWO53ot3ohyRofPvk1ZXDrue+7guXpyXQfKcAaE= 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.4 077/411] macintosh/via-pmu: Fix build failure when CONFIG_INPUT is disabled Date: Mon, 13 Jun 2022 12:05:50 +0200 Message-Id: <20220613094930.988962691@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220613094928.482772422@linuxfoundation.org> References: <20220613094928.482772422@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=-8.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,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 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 574e122ae105..abaf1401cca6 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 21d532a78fa4..d8b6ac2ec313 100644 --- a/drivers/macintosh/via-pmu.c +++ b/drivers/macintosh/via-pmu.c @@ -1464,7 +1464,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