* [PATCH] ata: Use IS_ENABLED() instead of checking for built-in or module
@ 2016-05-18 20:11 Javier Martinez Canillas
2016-05-27 15:27 ` Tejun Heo
0 siblings, 1 reply; 2+ messages in thread
From: Javier Martinez Canillas @ 2016-05-18 20:11 UTC (permalink / raw)
To: linux-kernel
Cc: Javier Martinez Canillas, Tejun Heo, linux-ide,
Bartlomiej Zolnierkiewicz
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>
---
drivers/ata/ahci.c | 2 +-
drivers/ata/pata_marvell.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index a83bbcc58b4c..90eabaf81215 100644
--- a/drivers/ata/ahci.c
+++ b/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;
#else
static int marvell_enable = 1;
diff --git a/drivers/ata/pata_marvell.c b/drivers/ata/pata_marvell.c
index ae9feb1ba8f7..ff468a6fd8dd 100644
--- a/drivers/ata/pata_marvell.c
+++ b/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)
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)) {
printk(KERN_INFO DRV_NAME ": PATA port not active, deferring to AHCI driver.\n");
return -ENODEV;
--
2.5.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ata: Use IS_ENABLED() instead of checking for built-in or module
2016-05-18 20:11 [PATCH] ata: Use IS_ENABLED() instead of checking for built-in or module Javier Martinez Canillas
@ 2016-05-27 15:27 ` Tejun Heo
0 siblings, 0 replies; 2+ messages in thread
From: Tejun Heo @ 2016-05-27 15:27 UTC (permalink / raw)
To: Javier Martinez Canillas
Cc: linux-kernel, linux-ide, Bartlomiej Zolnierkiewicz
On Wed, May 18, 2016 at 04:11:28PM -0400, Javier Martinez Canillas wrote:
> 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>
Applied to libata/for-4.8.
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-05-27 15:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-18 20:11 [PATCH] ata: Use IS_ENABLED() instead of checking for built-in or module Javier Martinez Canillas
2016-05-27 15:27 ` Tejun Heo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).