From a4f2dc9efc00a56ca30ce340a1405293ec9488a4 Mon Sep 17 00:00:00 2001 From: Srinivas Kandagatla Date: Fri, 2 Aug 2013 10:23:51 +0100 Subject: serial: st-asc: Fix unused variable warning for non DT. This patch fixes a below warning reported by kbuild test robot. drivers/tty/serial/st-asc.c:727:28: warning: 'asc_match' defined but not used [-Wunused-variable] The code used in DT case is now ifdefed under CONFIG_OF to fix this warning. Signed-off-by: Srinivas Kandagatla Reported-by: Kbuild Test Robot Signed-off-by: Greg Kroah-Hartman --- drivers/tty/serial/st-asc.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/tty/serial/st-asc.c') diff --git a/drivers/tty/serial/st-asc.c b/drivers/tty/serial/st-asc.c index 183879825695..2ff4b1bb922d 100644 --- a/drivers/tty/serial/st-asc.c +++ b/drivers/tty/serial/st-asc.c @@ -724,12 +724,14 @@ static struct asc_port *asc_of_get_asc_port(struct platform_device *pdev) return &asc_ports[id]; } +#ifdef CONFIG_OF static struct of_device_id asc_match[] = { { .compatible = "st,asc", }, {}, }; MODULE_DEVICE_TABLE(of, asc_match); +#endif static int asc_serial_probe(struct platform_device *pdev) { -- cgit v1.2.3