Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S941731AbcLWMi3 (ORCPT ); Fri, 23 Dec 2016 07:38:29 -0500 Received: from mx0b-0016f401.pphosted.com ([67.231.156.173]:48740 "EHLO mx0b-0016f401.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S941474AbcLWMi2 (ORCPT ); Fri, 23 Dec 2016 07:38:28 -0500 From: Jisheng Zhang To: , CC: , , Jisheng Zhang Subject: [PATCH] serial: 8250_dw: #ifdef out dw8250_acpi_match if ACPI isn't set Date: Fri, 23 Dec 2016 20:33:55 +0800 Message-ID: <20161223123355.1370-1-jszhang@marvell.com> X-Mailer: git-send-email 2.11.0 MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-12-23_09:,, signatures=0 X-Proofpoint-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1612050000 definitions=main-1612230214 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1029 Lines: 33 dw8250_acpi_match is used only when ACPI is enabled. Fix the following gcc warning when W=1 is set: drivers/tty/serial/8250/8250_dw.c:640:36: warning: 'dw8250_acpi_match' defined but not used [-Wunused-const-variable=] Signed-off-by: Jisheng Zhang --- drivers/tty/serial/8250/8250_dw.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/tty/serial/8250/8250_dw.c b/drivers/tty/serial/8250/8250_dw.c index c89fafc972b6..bd43cbfd0783 100644 --- a/drivers/tty/serial/8250/8250_dw.c +++ b/drivers/tty/serial/8250/8250_dw.c @@ -637,6 +637,7 @@ static const struct of_device_id dw8250_of_match[] = { }; MODULE_DEVICE_TABLE(of, dw8250_of_match); +#ifdef CONFIG_ACPI static const struct acpi_device_id dw8250_acpi_match[] = { { "INT33C4", 0 }, { "INT33C5", 0 }, @@ -651,6 +652,7 @@ static const struct acpi_device_id dw8250_acpi_match[] = { { }, }; MODULE_DEVICE_TABLE(acpi, dw8250_acpi_match); +#endif static struct platform_driver dw8250_platform_driver = { .driver = { -- 2.11.0