From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4B28CCA9ECF for ; Fri, 1 Nov 2019 13:49:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 28B4E217D9 for ; Fri, 1 Nov 2019 13:49:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727538AbfKANt0 (ORCPT ); Fri, 1 Nov 2019 09:49:26 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:5691 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726622AbfKANt0 (ORCPT ); Fri, 1 Nov 2019 09:49:26 -0400 Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id A904FF0927A7025CDCA6; Fri, 1 Nov 2019 21:49:10 +0800 (CST) Received: from localhost (10.133.213.239) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.439.0; Fri, 1 Nov 2019 21:49:04 +0800 From: YueHaibing To: , , , , , , , , , , , CC: , Subject: [PATCH -next] iio: st_accel: Fix unused variable warning Date: Fri, 1 Nov 2019 21:47:41 +0800 Message-ID: <20191101134741.25108-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-iio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org drivers/iio/accel/st_accel_core.c:1005:44: warning: mount_matrix_ext_info defined but not used [-Wunused-const-variable=] Move it to ifdef to mute this warning. Signed-off-by: YueHaibing --- drivers/iio/accel/st_accel_core.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/iio/accel/st_accel_core.c b/drivers/iio/accel/st_accel_core.c index 2e37f8a..bba0717 100644 --- a/drivers/iio/accel/st_accel_core.c +++ b/drivers/iio/accel/st_accel_core.c @@ -1002,10 +1002,12 @@ get_mount_matrix(const struct iio_dev *indio_dev, return adata->mount_matrix; } +#ifdef CONFIG_ACPI static const struct iio_chan_spec_ext_info mount_matrix_ext_info[] = { IIO_MOUNT_MATRIX(IIO_SHARED_BY_ALL, get_mount_matrix), { }, }; +#endif /* Read ST-specific _ONT orientation data from ACPI and generate an * appropriate mount matrix. -- 2.7.4