Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

+19 -19
+19 -19
drivers/rtc/rtc-pcf85063.c
··· 501 501 } 502 502 #endif 503 503 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 - 513 504 static const struct pcf85063_config pcf85063tp_config = { 514 505 .regmap = { 515 506 .reg_bits = 8, 516 507 .val_bits = 8, 517 508 .max_register = 0x0a, 518 509 }, 519 - }; 520 - 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 510 }; 530 511 531 512 static int pcf85063_probe(struct i2c_client *client) ··· 592 611 } 593 612 594 613 #ifdef CONFIG_OF 614 + static const struct pcf85063_config pcf85063a_config = { 615 + .regmap = { 616 + .reg_bits = 8, 617 + .val_bits = 8, 618 + .max_register = 0x11, 619 + }, 620 + .has_alarms = 1, 621 + }; 622 + 623 + static const struct pcf85063_config rv8263_config = { 624 + .regmap = { 625 + .reg_bits = 8, 626 + .val_bits = 8, 627 + .max_register = 0x11, 628 + }, 629 + .has_alarms = 1, 630 + .force_cap_7000 = 1, 631 + }; 632 + 595 633 static const struct of_device_id pcf85063_of_match[] = { 596 634 { .compatible = "nxp,pcf85063", .data = &pcf85063tp_config }, 597 635 { .compatible = "nxp,pcf85063tp", .data = &pcf85063tp_config },