From patchwork Fri Nov 1 13:47:41 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yue Haibing X-Patchwork-Id: 11223157 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 40BF215AB 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 27E3620862 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 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.