Browse Source

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>
Javier Martinez Canillas 9 years ago
parent
commit
5219d6530e
2 changed files with 2 additions and 2 deletions
  1. 1 1
      drivers/ata/ahci.c
  2. 1 1
      drivers/ata/pata_marvell.c

+ 1 - 1
drivers/ata/ahci.c

@@ -580,7 +580,7 @@ static struct pci_driver ahci_pci_driver = {
 	},
 	},
 };
 };
 
 
-#if defined(CONFIG_PATA_MARVELL) || defined(CONFIG_PATA_MARVELL_MODULE)
+#if IS_ENABLED(CONFIG_PATA_MARVELL)
 static int marvell_enable;
 static int marvell_enable;
 #else
 #else
 static int marvell_enable = 1;
 static int marvell_enable = 1;

+ 1 - 1
drivers/ata/pata_marvell.c

@@ -146,7 +146,7 @@ static int marvell_init_one (struct pci_dev *pdev, const struct pci_device_id *i
 	if (pdev->device == 0x6101)
 	if (pdev->device == 0x6101)
 		ppi[1] = &ata_dummy_port_info;
 		ppi[1] = &ata_dummy_port_info;
 
 
-#if defined(CONFIG_SATA_AHCI) || defined(CONFIG_SATA_AHCI_MODULE)
+#if IS_ENABLED(CONFIG_SATA_AHCI)
 	if (!marvell_pata_active(pdev)) {
 	if (!marvell_pata_active(pdev)) {
 		printk(KERN_INFO DRV_NAME ": PATA port not active, deferring to AHCI driver.\n");
 		printk(KERN_INFO DRV_NAME ": PATA port not active, deferring to AHCI driver.\n");
 		return -ENODEV;
 		return -ENODEV;