Commit 17cc1ee6 authored by Damien Le Moal's avatar Damien Le Moal
Browse files

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: default avatarkernel test robot <lkp@intel.com>
Signed-off-by: default avatarDamien Le Moal <damien.lemoal@opensource.wdc.com>
Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
parent 1e41e693
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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,