Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp2908383ybi; Sun, 28 Jul 2019 20:46:17 -0700 (PDT) X-Google-Smtp-Source: APXvYqyDddCGZDxBHYWlt6n+kRqsFCSks3t8odCzbNyAf5CzJ2sLUby/6jBTPItgYUnwVoVteJ3l X-Received: by 2002:a63:61c6:: with SMTP id v189mr94982607pgb.36.1564371977542; Sun, 28 Jul 2019 20:46:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564371977; cv=none; d=google.com; s=arc-20160816; b=PuB0kNLdGdtg+YkgjxvZvxXhdGqW6S0xrVebK+jOm9F1afnMxiYIlXZBBPbGuoQ6Jk JNv6hTUq7ejif/mjwQJ5WUrKMXAzwR2p2umRZksPcfDXZmB4hAu62iN1jP48Oskc6Rk2 gY3py+vVBOIVa7RegHhbrzaARseGEvB/dMlJ9TGqANt3WiomEm7NFsRwCqTtoBGz966+ VUBJufr3oZ5Bex37gB4OlLiydAlePFy8vJPVosZkn0UKAr1KxHWBm7bHcLHF4PpMelsp msT939i0nm/d2JOa8OQd+JFtxK08i4p9hrQM9K/6uTShcY9OuvbuMU9SkhCQLHJLvWxO LjCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=Vhl/qGv6PtqswdPwP7iz4b6BC5qadBDG+D18zxrvE3U=; b=vSuKHzMn5wvdttdT37WFtfCdWaiQzxk2NVh2HDIucidtiw+dMzXpUHgRe45BNgnX2o sTj3Pcs3IkdswPIQegfqCkwJmys2Z8qDsfsPOAhy8M2QDGuGObnp5PkYgpUm9EqedQQB R1t/q7yH2NO8zj9JqVnNmuSbpJHN1qu6r8hcYGj6aLKOza4b0fzztysHFmNxZY3JeDvW PP9XcviPtWwKpisVTanE72ABzHkj6rT+qG7/UX6se3kQlUJTdh8GEFKZT22sAS98O8wV sVLajshrOUiStOJjtGkTHfT7T454pwJv65s7hWrGMzSY33Ixw48mMTmLVLXt5EkGYAEF WEiQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x24si33666468pfr.200.2019.07.28.20.46.02; Sun, 28 Jul 2019 20:46:17 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726635AbfG2DcC (ORCPT + 99 others); Sun, 28 Jul 2019 23:32:02 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:57454 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726320AbfG2DcC (ORCPT ); Sun, 28 Jul 2019 23:32:02 -0400 Received: from DGGEMS408-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 5D63229DBF6460DB3E5C; Mon, 29 Jul 2019 11:16:26 +0800 (CST) Received: from localhost (10.133.213.239) by DGGEMS408-HUB.china.huawei.com (10.3.19.208) with Microsoft SMTP Server id 14.3.439.0; Mon, 29 Jul 2019 11:16:16 +0800 From: YueHaibing To: , , CC: , , YueHaibing Subject: [PATCH] Input: applespi - Fix build error Date: Mon, 29 Jul 2019 11:14:55 +0800 Message-ID: <20190729031455.59400-1-yuehaibing@huawei.com> X-Mailer: git-send-email 2.10.2.windows.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.133.213.239] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org If CONFIG_KEYBOARD_APPLESPI=y but CONFIG_LEDS_CLASS=m building fails: drivers/input/keyboard/applespi.o: In function `applespi_probe': applespi.c:(.text+0x1fcd): undefined reference to `devm_led_classdev_register_ext' Wrap it in LEDS_CLASS macro to fix this. Reported-by: Hulk Robot Fixes: 038b1a05eae6 ("Input: add Apple SPI keyboard and trackpad driver") Signed-off-by: YueHaibing --- drivers/input/keyboard/applespi.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/input/keyboard/applespi.c b/drivers/input/keyboard/applespi.c index acf34a5..9c50b09 100644 --- a/drivers/input/keyboard/applespi.c +++ b/drivers/input/keyboard/applespi.c @@ -1790,11 +1790,13 @@ static int applespi_probe(struct spi_device *spi) applespi->backlight_info.default_trigger = "kbd-backlight"; applespi->backlight_info.brightness_set = applespi_set_bl_level; +#ifdef CONFIG_LEDS_CLASS sts = devm_led_classdev_register(&spi->dev, &applespi->backlight_info); if (sts) dev_warn(&applespi->spi->dev, "Unable to register keyboard backlight class dev (%d)\n", sts); +#endif /* set up debugfs entries for touchpad dimensions logging */ applespi->debugfs_root = debugfs_create_dir("applespi", NULL); -- 2.7.4