[PATCH 1/2] staging;gpib: Use Kconfig PCMCIA compilation symbol

Dave Penkler
2025-02-10T15:10:34Z

The drivers supporting the PCMCIA bus were using an intermediate
symbol GPIB_PCMCIA for compiling optional PCMCIA support.
This symbol is no longer needed for the in-tree drivers as the
Kconfig symbol is available.

Use the Kconfig symbol CONFIG_GPIB_PCMCIA directly for conditional
compilation of PCMCIA support.

Signed-off-by: Dave Penkler <dpenkler@gmail.com>
---
drivers/staging/gpib/cb7210/cb7210.c | 10 +++++-----
drivers/staging/gpib/ines/ines_gpib.c | 8 ++++----
drivers/staging/gpib/tnt4882/tnt4882_gpib.c | 12 ++++++------
3 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/drivers/staging/gpib/cb7210/cb7210.c b/drivers/staging/gpib/cb7210/cb7210.c
index 381c508f62eb..7785d674f397 100644
--- a/drivers/staging/gpib/cb7210/cb7210.c
+++ b/drivers/staging/gpib/cb7210/cb7210.c
@@ -1111,7 +1111,7 @@ static struct pci_driver cb7210_pci_driver = {
* pcmcia skeleton example (presumably David Hinds)
***************************************************************************/

-#ifdef GPIB_PCMCIA
+#ifdef CONFIG_GPIB_PCMCIA

#include <linux/kernel.h>
#include <linux/ptrace.h>
@@ -1501,7 +1501,7 @@ static void cb_pcmcia_detach(gpib_board_t *board)
cb7210_generic_detach(board);
}

-#endif /* GPIB_PCMCIA */
+#endif /* CONFIG_GPIB_PCMCIA */

static int __init cb7210_init_module(void)
{
@@ -1549,7 +1549,7 @@ static int __init cb7210_init_module(void)
goto err_isa_unaccel;
}

-#ifdef GPIB_PCMCIA
+#ifdef CONFIG_GPIB_PCMCIA
ret = gpib_register_driver(&cb_pcmcia_interface, THIS_MODULE);
if (ret) {
pr_err("cb7210: gpib_register_driver failed: error = %d\n", ret);
@@ -1577,7 +1577,7 @@ static int __init cb7210_init_module(void)

return 0;

-#ifdef GPIB_PCMCIA
+#ifdef CONFIG_GPIB_PCMCIA
err_pcmcia_driver:
gpib_unregister_driver(&cb_pcmcia_unaccel_interface);
err_pcmcia_unaccel:
@@ -1611,7 +1611,7 @@ static void __exit cb7210_exit_module(void)
gpib_unregister_driver(&cb_pci_unaccel_interface);
gpib_unregister_driver(&cb_isa_accel_interface);
gpib_unregister_driver(&cb_isa_unaccel_interface);
-#ifdef GPIB_PCMCIA
+#ifdef CONFIG_GPIB_PCMCIA
gpib_unregister_driver(&cb_pcmcia_interface);
gpib_unregister_driver(&cb_pcmcia_accel_interface);
gpib_unregister_driver(&cb_pcmcia_unaccel_interface);
diff --git a/drivers/staging/gpib/ines/ines_gpib.c b/drivers/staging/gpib/ines/ines_gpib.c
index 22a05a287bce..73dafbe68acb 100644
--- a/drivers/staging/gpib/ines/ines_gpib.c
+++ b/drivers/staging/gpib/ines/ines_gpib.c
@@ -977,7 +977,7 @@ static struct pci_driver ines_pci_driver = {
.probe = &ines_pci_probe
};

-#ifdef GPIB_PCMCIA
+#ifdef CONFIG_GPIB_PCMCIA

#include <linux/kernel.h>
#include <linux/ptrace.h>
@@ -1410,7 +1410,7 @@ void ines_pcmcia_detach(gpib_board_t *board)
ines_free_private(board);
}

-#endif /* GPIB_PCMCIA */
+#endif /* CONFIG_GPIB_PCMCIA */

static int __init ines_init_module(void)
{
@@ -1446,7 +1446,7 @@ static int __init ines_init_module(void)
goto err_isa;
}

-#ifdef GPIB_PCMCIA
+#ifdef CONFIG_GPIB_PCMCIA
ret = gpib_register_driver(&ines_pcmcia_interface, THIS_MODULE);
if (ret) {
pr_err("ines_gpib: gpib_register_driver failed: error = %d\n", ret);
@@ -1474,7 +1474,7 @@ static int __init ines_init_module(void)

return 0;

-#ifdef GPIB_PCMCIA
+#ifdef CONFIG_GPIB_PCMCIA
err_pcmcia_driver:
gpib_unregister_driver(&ines_pcmcia_accel_interface);
err_pcmcia_accel:
diff --git a/drivers/staging/gpib/tnt4882/tnt4882_gpib.c b/drivers/staging/gpib/tnt4882/tnt4882_gpib.c
index 2e1c3cbebaca..3118fe7613f6 100644
--- a/drivers/staging/gpib/tnt4882/tnt4882_gpib.c
+++ b/drivers/staging/gpib/tnt4882/tnt4882_gpib.c
@@ -1396,7 +1396,7 @@ static const struct pnp_device_id tnt4882_pnp_table[] = {
};
MODULE_DEVICE_TABLE(pnp, tnt4882_pnp_table);

-#ifdef GPIB_PCMCIA
+#ifdef CONFIG_GPIB_PCMCIA
static gpib_interface_t ni_pcmcia_interface;
static gpib_interface_t ni_pcmcia_accel_interface;
static int __init init_ni_gpib_cs(void);
@@ -1461,7 +1461,7 @@ static int __init tnt4882_init_module(void)
goto err_pci_accel;
}

-#ifdef GPIB_PCMCIA
+#ifdef CONFIG_GPIB_PCMCIA
result = gpib_register_driver(&ni_pcmcia_interface, THIS_MODULE);
if (result) {
pr_err("tnt4882_gpib: gpib_register_driver failed: error = %d\n", result);
@@ -1486,7 +1486,7 @@ static int __init tnt4882_init_module(void)

return 0;

-#ifdef GPIB_PCMCIA
+#ifdef CONFIG_GPIB_PCMCIA
err_pcmcia_driver:
gpib_unregister_driver(&ni_pcmcia_accel_interface);
err_pcmcia_accel:
@@ -1524,7 +1524,7 @@ static void __exit tnt4882_exit_module(void)
gpib_unregister_driver(&ni_nec_isa_accel_interface);
gpib_unregister_driver(&ni_pci_interface);
gpib_unregister_driver(&ni_pci_accel_interface);
-#ifdef GPIB_PCMCIA
+#ifdef CONFIG_GPIB_PCMCIA
gpib_unregister_driver(&ni_pcmcia_interface);
gpib_unregister_driver(&ni_pcmcia_accel_interface);
exit_ni_gpib_cs();
@@ -1535,7 +1535,7 @@ static void __exit tnt4882_exit_module(void)
pci_unregister_driver(&tnt4882_pci_driver);
}

-#ifdef GPIB_PCMCIA
+#ifdef CONFIG_GPIB_PCMCIA

#include <linux/kernel.h>
#include <linux/moduleparam.h>
@@ -1889,7 +1889,7 @@ static gpib_interface_t ni_pcmcia_accel_interface = {
.return_to_local = tnt4882_return_to_local,
};

-#endif // GPIB_PCMCIA
+#endif // CONFIG_GPIB_PCMCIA

module_init(tnt4882_init_module);
module_exit(tnt4882_exit_module);
--
2.48.1