Skip to content

Commit 95f610e

Browse files
rtc: pcf85063: scope pcf85063_config structures
Fix possible warning: >> drivers/rtc/rtc-pcf85063.c:566:37: warning: unused variable 'config_rv8063' [-Wunused-const-variable] 566 | static const struct pcf85063_config config_rv8063 = { | ^~~~~~~~~~~~~ Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202507241607.dmz2qrO5-lkp@intel.com/ Link: https://lore.kernel.org/r/20250724090420.917705-1-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
1 parent ae48d35 commit 95f610e

1 file changed

Lines changed: 47 additions & 47 deletions

File tree

drivers/rtc/rtc-pcf85063.c

Lines changed: 47 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -528,53 +528,6 @@ static struct clk *pcf85063_clkout_register_clk(struct pcf85063 *pcf85063)
528528
}
529529
#endif
530530

531-
static const struct pcf85063_config config_pcf85063 = {
532-
.regmap = {
533-
.reg_bits = 8,
534-
.val_bits = 8,
535-
.max_register = 0x0a,
536-
},
537-
};
538-
539-
static const struct pcf85063_config config_pcf85063tp = {
540-
.regmap = {
541-
.reg_bits = 8,
542-
.val_bits = 8,
543-
.max_register = 0x0a,
544-
},
545-
};
546-
547-
static const struct pcf85063_config config_pcf85063a = {
548-
.regmap = {
549-
.reg_bits = 8,
550-
.val_bits = 8,
551-
.max_register = 0x11,
552-
},
553-
.has_alarms = 1,
554-
};
555-
556-
static const struct pcf85063_config config_rv8263 = {
557-
.regmap = {
558-
.reg_bits = 8,
559-
.val_bits = 8,
560-
.max_register = 0x11,
561-
},
562-
.has_alarms = 1,
563-
.force_cap_7000 = 1,
564-
};
565-
566-
static const struct pcf85063_config config_rv8063 = {
567-
.regmap = {
568-
.reg_bits = 8,
569-
.val_bits = 8,
570-
.max_register = 0x11,
571-
.read_flag_mask = BIT(7) | BIT(5),
572-
.write_flag_mask = BIT(5),
573-
},
574-
.has_alarms = 1,
575-
.force_cap_7000 = 1,
576-
};
577-
578531
static int pcf85063_probe(struct device *dev, struct regmap *regmap, int irq,
579532
const struct pcf85063_config *config)
580533
{
@@ -671,6 +624,41 @@ static int pcf85063_probe(struct device *dev, struct regmap *regmap, int irq,
671624

672625
#if IS_ENABLED(CONFIG_I2C)
673626

627+
static const struct pcf85063_config config_pcf85063 = {
628+
.regmap = {
629+
.reg_bits = 8,
630+
.val_bits = 8,
631+
.max_register = 0x0a,
632+
},
633+
};
634+
635+
static const struct pcf85063_config config_pcf85063tp = {
636+
.regmap = {
637+
.reg_bits = 8,
638+
.val_bits = 8,
639+
.max_register = 0x0a,
640+
},
641+
};
642+
643+
static const struct pcf85063_config config_pcf85063a = {
644+
.regmap = {
645+
.reg_bits = 8,
646+
.val_bits = 8,
647+
.max_register = 0x11,
648+
},
649+
.has_alarms = 1,
650+
};
651+
652+
static const struct pcf85063_config config_rv8263 = {
653+
.regmap = {
654+
.reg_bits = 8,
655+
.val_bits = 8,
656+
.max_register = 0x11,
657+
},
658+
.has_alarms = 1,
659+
.force_cap_7000 = 1,
660+
};
661+
674662
static const struct i2c_device_id pcf85063_ids[] = {
675663
{ "pca85073a", .driver_data = (kernel_ulong_t)&config_pcf85063a },
676664
{ "pcf85063", .driver_data = (kernel_ulong_t)&config_pcf85063 },
@@ -743,6 +731,18 @@ static void pcf85063_unregister_driver(void)
743731

744732
#if IS_ENABLED(CONFIG_SPI_MASTER)
745733

734+
static const struct pcf85063_config config_rv8063 = {
735+
.regmap = {
736+
.reg_bits = 8,
737+
.val_bits = 8,
738+
.max_register = 0x11,
739+
.read_flag_mask = BIT(7) | BIT(5),
740+
.write_flag_mask = BIT(5),
741+
},
742+
.has_alarms = 1,
743+
.force_cap_7000 = 1,
744+
};
745+
746746
static const struct spi_device_id rv8063_id[] = {
747747
{ "rv8063" },
748748
{}

0 commit comments

Comments
 (0)