staging: gpib: Remove redundant compilation symbol
cover staging: gpib: Remove redundant compilation symbol
The intermediate symbol GPIB_PCMCIA was used for compiling the optional PCMCIA support in the out-of-tree drivers. These patches now replace the redundant symbol with the Kconfig symbol and remove its definition.
Patch 1: Changes the drivers to use the Kconfig symbol CONFIG_GPIB_PCMCIA
directly.
Patch 2: Removes the definition of the intermediate symbol from the
respective Makefiles.
Dave Penkler (2):
staging;gpib: Use Kconfig PCMCIA conditional compilation symbol staging:gpib: Remove definition of GPIB_PCMCIA in Makefiles
drivers/staging/gpib/cb7210/Makefile | 1 - drivers/staging/gpib/cb7210/cb7210.c | 10 +++++----- drivers/staging/gpib/ines/Makefile | 1 - drivers/staging/gpib/ines/ines_gpib.c | 8 ++++---- drivers/staging/gpib/tnt4882/Makefile | 1 - drivers/staging/gpib/tnt4882/tnt4882_gpib.c | 12 ++++++------ 6 files changed, 15 insertions(+), 18 deletions(-)
Signature · 1 line
2.48.1
PATCH 1/2 staging;gpib: Use Kconfig PCMCIA compilation symbol
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.
--- 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(-)
drivers/staging/gpib/cb7210/cb7210.c +5 -5
@@ -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);
drivers/staging/gpib/ines/ines_gpib.c +4 -4
@@ -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:
drivers/staging/gpib/tnt4882/tnt4882_gpib.c +6 -6
@@ -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);
Signature · 1 line
2.48.1
PATCH 2/2 staging:gpib: Remove GPIB_PCMCIA in Makefiles
In reply to Dave PenklerThis symbol is no longer needed since it is being replaced directly by its Kconfig equivalent CONFIG_GPIB_PCMCIA in the drivers providing optional support for the PCMCIA bus.
Remove the definition of GPIB_PCMCIA from the Makefiles.
--- drivers/staging/gpib/cb7210/Makefile | 1 - drivers/staging/gpib/ines/Makefile | 1 - drivers/staging/gpib/tnt4882/Makefile | 1 - 3 files changed, 3 deletions(-)
drivers/staging/gpib/cb7210/Makefile +0 -1
@@ -1,4 +1,3 @@ -ccflags-$(CONFIG_GPIB_PCMCIA) := -DGPIB_PCMCIA obj-$(CONFIG_GPIB_CB7210) += cb7210.o
drivers/staging/gpib/ines/Makefile +0 -1
@@ -1,4 +1,3 @@ -ccflags-$(CONFIG_GPIB_PCMCIA) := -DGPIB_PCMCIA obj-$(CONFIG_GPIB_INES) += ines_gpib.o
drivers/staging/gpib/tnt4882/Makefile +0 -1
@@ -1,4 +1,3 @@ -ccflags-$(CONFIG_GPIB_PCMCIA) := -DGPIB_PCMCIA obj-$(CONFIG_GPIB_NI_PCI_ISA) += tnt4882.o tnt4882-objs := tnt4882_gpib.o mite.o
Signature · 1 line
2.48.1