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.
Unified · Split
| @@ -724,12 +724,14 @@ static struct asc_port *asc_of_get_asc_port(struct platform_device *pdev) · 723 unmodified lines | ||
| 724 | 724 | return &asc_ports[id]; |
| 725 | 725 | } |
| 726 | 726 | |
| 727 | +#ifdef CONFIG_OF | |
| 727 | 728 | static struct of_device_id asc_match[] = { |
| 728 | 729 | { .compatible = "st,asc", }, |
| 729 | 730 | {}, |
| 730 | 731 | }; |
| 731 | 732 | |
| 732 | 733 | MODULE_DEVICE_TABLE(of, asc_match); |
| 734 | +#endif | |
| 733 | 735 | |
| 734 | 736 | static int asc_serial_probe(struct platform_device *pdev) |
| 735 | 737 | { |