mirror of
https://github.com/torvalds/linux
synced 2024-09-06 18:01:05 +00:00
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 <lkp@intel.com> Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com> Acked-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
parent
1e41e693f4
commit
17cc1ee6e8
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue