Skip to content

Commit c8ecbc7

Browse files
rtc: pcf85063: quiet maybe-unused variable warnings
pcf85063a_config and rv8263_config are only referenced by pcf85063_of_match, move them in the #ifdef CONFIG_OF section. Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20210202112219.3610853-12-alexandre.belloni@bootlin.com
1 parent ef886c4 commit c8ecbc7

1 file changed

Lines changed: 19 additions & 19 deletions

File tree

drivers/rtc/rtc-pcf85063.c

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -501,15 +501,6 @@ static struct clk *pcf85063_clkout_register_clk(struct pcf85063 *pcf85063)
501501
}
502502
#endif
503503

504-
static const struct pcf85063_config pcf85063a_config = {
505-
.regmap = {
506-
.reg_bits = 8,
507-
.val_bits = 8,
508-
.max_register = 0x11,
509-
},
510-
.has_alarms = 1,
511-
};
512-
513504
static const struct pcf85063_config pcf85063tp_config = {
514505
.regmap = {
515506
.reg_bits = 8,
@@ -518,16 +509,6 @@ static const struct pcf85063_config pcf85063tp_config = {
518509
},
519510
};
520511

521-
static const struct pcf85063_config rv8263_config = {
522-
.regmap = {
523-
.reg_bits = 8,
524-
.val_bits = 8,
525-
.max_register = 0x11,
526-
},
527-
.has_alarms = 1,
528-
.force_cap_7000 = 1,
529-
};
530-
531512
static int pcf85063_probe(struct i2c_client *client)
532513
{
533514
struct pcf85063 *pcf85063;
@@ -611,6 +592,25 @@ static int pcf85063_probe(struct i2c_client *client)
611592
}
612593

613594
#ifdef CONFIG_OF
595+
static const struct pcf85063_config pcf85063a_config = {
596+
.regmap = {
597+
.reg_bits = 8,
598+
.val_bits = 8,
599+
.max_register = 0x11,
600+
},
601+
.has_alarms = 1,
602+
};
603+
604+
static const struct pcf85063_config rv8263_config = {
605+
.regmap = {
606+
.reg_bits = 8,
607+
.val_bits = 8,
608+
.max_register = 0x11,
609+
},
610+
.has_alarms = 1,
611+
.force_cap_7000 = 1,
612+
};
613+
614614
static const struct of_device_id pcf85063_of_match[] = {
615615
{ .compatible = "nxp,pcf85063", .data = &pcf85063tp_config },
616616
{ .compatible = "nxp,pcf85063tp", .data = &pcf85063tp_config },

0 commit comments

Comments
 (0)