[PATCH] serial: st-asc: Fix unused variable warning for non DT.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Srinivas Kandagatla <srinivas.kandagatla@xxxxxx>

This patch fixes a below warning reported by kbuild test robot from
Greg.

tree:
git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   a54a4d5171bab310cb20fb62242ef87fa8443efb
commit: c4b058560762ec7ffe159b668fc47a8b7e271949 [2237/2506]
serial:st-asc: Add ST ASC driver.
config: make ARCH=i386 allyesconfig

All warnings:
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 <srinivas.kandagatla@xxxxxx>
---
Hi Greg, 

By mistake I did resend the original '[PATCH v7] serial:st-asc: Add ST ASC
driver' with this warning fix.
However I realised that you just requested me to fix this warning with a new patch.

Can you please ignore '[PATCH v7] serial:st-asc: Add ST ASC driver' patch
and consider this patch to fix the warning.

Thankyou,
srini

 drivers/tty/serial/st-asc.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/tty/serial/st-asc.c b/drivers/tty/serial/st-asc.c
index 1838798..2ff4b1b 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)
 {
-- 
1.7.6.5

--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux