ata: pata_ftide010: Remove build dependency on OF
authorDamien Le Moal <damien.lemoal@opensource.wdc.com>
Fri, 14 Oct 2022 02:39:27 +0000 (11:39 +0900)
committerDamien Le Moal <damien.lemoal@opensource.wdc.com>
Mon, 17 Oct 2022 23:05:10 +0000 (08:05 +0900)
The pata_ftide010 can be built without CONFIG_OF being enabled, as long
as the macro of_match_ptr() is not used when initializing the platform
driver .of_match_table field.

Remove the use of this macro and the build dependency on OF.

Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru>
drivers/ata/Kconfig
drivers/ata/pata_ftide010.c

index 37e0651..b30f718 100644 (file)
@@ -696,7 +696,6 @@ config PATA_EP93XX
 
 config PATA_FTIDE010
        tristate "Faraday Technology FTIDE010 PATA support"
-       depends on OF
        depends on ARM || COMPILE_TEST
        depends on SATA_GEMINI
        help
index 0117df0..88924b5 100644 (file)
@@ -560,7 +560,7 @@ static const struct of_device_id pata_ftide010_of_match[] = {
 static struct platform_driver pata_ftide010_driver = {
        .driver = {
                .name = DRV_NAME,
-               .of_match_table = of_match_ptr(pata_ftide010_of_match),
+               .of_match_table = pata_ftide010_of_match,
        },
        .probe = pata_ftide010_probe,
        .remove = pata_ftide010_remove,