aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Le Moal <[email protected]>2022-10-13 17:16:10 +0900
committerDamien Le Moal <[email protected]>2022-10-17 22:01:57 +0900
commit17cc1ee6e83b16989118237294327bd0dd12b1a4 (patch)
tree6829982972ec9c9b24d42cd86438767dfbce0cba
parent1e41e693f458eef2d5728207dbd327cd3b16580a (diff)
ata: ahci_st: Fix compilation warning
If CONFIG_OF is disabled and the ahci_st driver is builtin (or CONFIG_MODULES is disabled), then using the macro of_match_ptr() results in the st_ahci_match variable being unused, which generates a compilation warning and a compilation error if CONFIG_WERROR is enabled. Fix this by directly assigning st_ahci_match to .of_match_table in the st_ahci_driver platform driver definition. Reported-by: kernel test robot <[email protected]> Signed-off-by: Damien Le Moal <[email protected]> Acked-by: Arnd Bergmann <[email protected]>
-rw-r--r--drivers/ata/ahci_st.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/ata/ahci_st.c b/drivers/ata/ahci_st.c
index 5a2cac60a29a..8607b68eee53 100644
--- a/drivers/ata/ahci_st.c
+++ b/drivers/ata/ahci_st.c
@@ -236,7 +236,7 @@ static struct platform_driver st_ahci_driver = {
.driver = {
.name = DRV_NAME,
.pm = &st_ahci_pm_ops,
- .of_match_table = of_match_ptr(st_ahci_match),
+ .of_match_table = st_ahci_match,
},
.probe = st_ahci_probe,
.remove = ata_platform_remove_one,