From: Dmitry Torokhov Date: Fri, 18 Dec 2020 18:01:33 +0000 (-0800) Subject: Input: da7280 - protect OF match table with CONFIG_OF X-Git-Tag: v5.15~74^2~24^2~42 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6d2ad82fece2f5adcafe77252614fcf7211dec28;p=platform%2Fkernel%2Flinux-starfive.git Input: da7280 - protect OF match table with CONFIG_OF The OF match table is only used when OF is enabled. Fixes: cd3f609823a5 ("Input: new da7280 haptic driver") Reported-by: kernel test robot Acked-by: Roy Im Link: https://lore.kernel.org/r/X9xRLVPt9eBi0CT6@google.com Signed-off-by: Dmitry Torokhov --- diff --git a/drivers/input/misc/da7280.c b/drivers/input/misc/da7280.c index 2f698a8..b08610d 100644 --- a/drivers/input/misc/da7280.c +++ b/drivers/input/misc/da7280.c @@ -1300,11 +1300,13 @@ static int __maybe_unused da7280_resume(struct device *dev) return retval; } +#ifdef CONFIG_OF static const struct of_device_id da7280_of_match[] = { { .compatible = "dlg,da7280", }, { } }; MODULE_DEVICE_TABLE(of, da7280_of_match); +#endif static const struct i2c_device_id da7280_i2c_id[] = { { "da7280", },