Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp443868iog; Mon, 13 Jun 2022 06:07:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw4uiZNWogbNsZZZynKyH5BzWEkAjU7QvaqQq/gCfgz2AQjxj0/iUUEgh8ca+eB7c3unB0M X-Received: by 2002:a17:902:ed89:b0:168:a7d0:ddf1 with SMTP id e9-20020a170902ed8900b00168a7d0ddf1mr22176146plj.38.1655125626720; Mon, 13 Jun 2022 06:07:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655125626; cv=none; d=google.com; s=arc-20160816; b=0VveP9FIuiyAFC/WKkGHyKtQdF6+2BcrlgvDfW+Uo1JefbA4emu/bidP3hKs5h+EFX E5JybBoy3GGA6AD8smxgQ1l6+LhMzUNxjM+9Kk84+ym3PKsx4cmGB9tcyBahA6l+pLzS DQlj4g3XWIage7O15DvGnzkCaxWm4U4fBQd3PyKGf/po3waZlaGGItfzxQCmUTXIe8WN OiaPYMu0im9iBAK0Tk+S/t5ML7o4YFbaaTXCDPjAeJWzR+Jwotzugg62uMVgPzTL16Nn Gwt1F3AxuYGSV151hLDSb1AYz+LAtGpIhLDs2YZqukXACFm7kKVF0XS4z1ZUlsHrCZM6 Hdpw== 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=cCLqPRs/o7O+s9FLAG+TZDo8RRIMsRlc8SsDONAgVSQ=; b=HmsdSfu0RYUVGxs0a+e4dmfO/hkezilbkMSAjmkhAynZ1b6Og83B4AJW7w5jupr10p ga4Hk3AS73siM2vuCdIGwa1Ehh/521MykTUoiQ5s45zfGQad3F3ZprJjXXIGIchpg+RW TTocS8DOff+yF+vbovKEHytJ4woNwabIuTu2M9d6ODAXwrjhmwwvFIR6Lt6Qjvhqxcsr BQhkTI1UUjF3UaD3WSw0rh29m6Fce3Xn+DfqSt7qjuE+8rApg0uh0YWX/kFMzPVEAhOS soYVX0t8JSDBtbkKy3esJCzKtTmBwG9FU95kFmZg3hSH7IqsN1ylaJZqf+RGxKhl3H3o ueCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="NdI/GzfL"; 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 h5-20020a63f905000000b00401ae0f4a06si9283180pgi.577.2022.06.13.06.06.53; Mon, 13 Jun 2022 06:07:06 -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="NdI/GzfL"; 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 S243770AbiFMKoj (ORCPT + 99 others); Mon, 13 Jun 2022 06:44:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58578 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347266AbiFMKlX (ORCPT ); Mon, 13 Jun 2022 06:41:23 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CA1FC22B3C; Mon, 13 Jun 2022 03:23:50 -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 816B2B80E2D; Mon, 13 Jun 2022 10:23:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D5558C34114; Mon, 13 Jun 2022 10:23:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1655115828; bh=16YFqYyhqlF8wjxC3u5YtSZGbIxxSWXzvVuA+3jo0aI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NdI/GzfLet+JOhq2sUK/RDFz/XM+F399/678cQn1tcBZAbTs5HsbsE56XtzzFkykz nACB0yL9lLKKVQ1tRvdswyFb0DSbeRqTqDPF5djA0M99ry32AaLsc+72kYJfxgz5PL SPYYQgqaoo7gqW2QtHDjlA2Ch3YivqNjrqTtIhW8= 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 4.14 045/218] macintosh/via-pmu: Fix build failure when CONFIG_INPUT is disabled Date: Mon, 13 Jun 2022 12:08:23 +0200 Message-Id: <20220613094919.085019575@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220613094908.257446132@linuxfoundation.org> References: <20220613094908.257446132@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 97a420c11eed..5e47d91da519 100644 --- a/drivers/macintosh/Kconfig +++ b/drivers/macintosh/Kconfig @@ -77,6 +77,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 ADB_PMU diff --git a/drivers/macintosh/Makefile b/drivers/macintosh/Makefile index ee803638e595..ff099c7d4edd 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 f6e040fcad9a..9d6828f49779 100644 --- a/drivers/macintosh/via-pmu.c +++ b/drivers/macintosh/via-pmu.c @@ -1440,7 +1440,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