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

ata: Use IS_ENABLED() instead of checking for built-in or module

The IS_ENABLED() macro checks if a Kconfig symbol has been enabled either
built-in or as a module, use that macro instead of open coding the same.

Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Tejun Heo <tj@kernel.org>

authored by

Javier Martinez Canillas and committed by
Tejun Heo
5219d653 d2abf98e

+2 -2
+1 -1
drivers/ata/ahci.c
··· 580 580 }, 581 581 }; 582 582 583 - #if defined(CONFIG_PATA_MARVELL) || defined(CONFIG_PATA_MARVELL_MODULE) 583 + #if IS_ENABLED(CONFIG_PATA_MARVELL) 584 584 static int marvell_enable; 585 585 #else 586 586 static int marvell_enable = 1;
+1 -1
drivers/ata/pata_marvell.c
··· 146 146 if (pdev->device == 0x6101) 147 147 ppi[1] = &ata_dummy_port_info; 148 148 149 - #if defined(CONFIG_SATA_AHCI) || defined(CONFIG_SATA_AHCI_MODULE) 149 + #if IS_ENABLED(CONFIG_SATA_AHCI) 150 150 if (!marvell_pata_active(pdev)) { 151 151 printk(KERN_INFO DRV_NAME ": PATA port not active, deferring to AHCI driver.\n"); 152 152 return -ENODEV;