Skip to contentSkip to conversation

rtc: rx6110: fix warning with !OF

PATCH New [email protected] 1 participant 1 message Dec 11, 2022 Real time clock (RTC)

lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

PATCH 1/1 rtc: rx6110: fix warning with !OF

From: Alexandre Belloni <[email protected]>

rx6110_spi_of_match is not used when !OF, leading to a warning:

Quoted 1 line
Quoted 1 line

drivers/rtc/rtc-rx6110.c:384:34: warning: 'rx6110_spi_of_match' defined but not used [-Wunused-const-variable=]

     384 | static const struct of_device_id rx6110_spi_of_match[] = {
         |                                  ^~~~~~~~~~~~~~~~~~~
---
 drivers/rtc/rtc-rx6110.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/rtc/rtc-rx6110.c +1 -1
index cc634558b928..76a49838014b 100644
@@ -376,7 +376,7 @@ static const struct spi_device_id rx6110_spi_id[] = {
 };
 MODULE_DEVICE_TABLE(spi, rx6110_spi_id);
 
-static const struct of_device_id rx6110_spi_of_match[] = {
+static const __maybe_unused struct of_device_id rx6110_spi_of_match[] = {
 	{ .compatible = "epson,rx6110" },
 	{ },
 };
Signature · 1 line
2.38.1