staging: gpib: Removing typedef of gpib_interface_t
v3 cover staging: gpib: Removing typedef of gpib_interface_t
Using Linux code style for struct gpib_interface.
Adhering to Linux code style.
Reported by checkpatch.pl
In general, a pointer, or a struct that has elements that can reasonably be directly accessed should never be a typedef.
* Patch 1: "struct gpib_interface"
Having the word "_struct" in the name of the struct doesn't add any information so rename "struct gpib_interface_struct" to "struct gpib_interface".
* Patch 2 - Patch 17: Replacing gpib_interface_t with "struct gpib_interface"
* Patch 18: Removing typedef for gpib_interface_t.
v3 fixes a build issue in v2 "staging: gpib: gpibP: struct gpib_interface"
Michael Rubin (18):
staging: gpib: struct typing for gpib_interface
staging: gpib: agilent_82350b: gpib_interface
staging: gpib: agilent_82357a: gpib_interface
staging: gpib: cb7210: struct gpib_interface
staging: gpib: cec: struct gpib_interface
staging: gpib: common: struct gpib_interface
staging: gpib: fluke: struct gpib_interface
staging: gpib: fmh: struct gpib_interface
staging: gpib: gpio: struct gpib_interface
staging: gpib: hp_82335: struct gpib_interface
staging: gpib: hp2341: struct gpib_interface
staging: gpib: gpibP: struct gpib_interface
staging: gpib: ines: struct gpib_interface
staging: gpib: lpvo_usb: struct gpib_interface
staging: gpib: ni_usb: struct gpib_interface
staging: gpib: pc2: struct gpib_interface
staging: gpib: tnt4882: struct gpib_interface
staging: gpib: Removing typedef gpib_interface_t
.../gpib/agilent_82350b/agilent_82350b.c | 4 ++-- .../gpib/agilent_82357a/agilent_82357a.c | 2 +- drivers/staging/gpib/cb7210/cb7210.c | 18 +++++++------- drivers/staging/gpib/cec/cec_gpib.c | 2 +- drivers/staging/gpib/common/gpib_os.c | 4 ++-- drivers/staging/gpib/eastwood/fluke_gpib.c | 6 ++--- drivers/staging/gpib/fmh_gpib/fmh_gpib.c | 8 +++---- drivers/staging/gpib/gpio/gpib_bitbang.c | 2 +- drivers/staging/gpib/hp_82335/hp82335.c | 2 +- drivers/staging/gpib/hp_82341/hp_82341.c | 4 ++-- drivers/staging/gpib/include/gpibP.h | 4 ++-- drivers/staging/gpib/include/gpib_types.h | 9 ++++--- drivers/staging/gpib/ines/ines_gpib.c | 14 +++++------ .../gpib/lpvo_usb_gpib/lpvo_usb_gpib.c | 2 +- drivers/staging/gpib/ni_usb/ni_usb_gpib.c | 2 +- drivers/staging/gpib/pc2/pc2_gpib.c | 8 +++---- drivers/staging/gpib/tnt4882/tnt4882_gpib.c | 24 +++++++++---------- 17 files changed, 57 insertions(+), 58 deletions(-)
Signature · 1 line
2.43.0
PATCH v3 1/18 staging: gpib: struct typing for gpib_interface
"Having the word "_struct" in the name of the struct doesn't add any information so rename "struct gpib_interface_struct" to "struct gpib_interface".
--- drivers/staging/gpib/include/gpib_types.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/gpib/include/gpib_types.h +2 -2
@@ -22,7 +22,7 @@#include <linux/timer.h> #include <linux/interrupt.h> -typedef struct gpib_interface_struct gpib_interface_t ; +typedef struct gpib_interface gpib_interface_t ;struct gpib_board ;/* config parameters that are only used by driver attach functions */
@@ -51,7 +51,7 @@ struct gpib_board_config {char *serial_number; }; -struct gpib_interface_struct { +struct gpib_interface {/* name of board */ char *name;/* attach() initializes board and allocates resources */
Signature · 1 line
2.43.0
PATCH v3 2/18 staging: gpib: agilent_82350b: gpib_interface
In reply to Michael RubinUsing Linux code style for struct gpib_interface.
Adhering to Linux code style.
Reported by checkpatch.pl
In general, a pointer, or a struct that has elements that can reasonably be directly accessed should never be a typedef.
--- drivers/staging/gpib/agilent_82350b/agilent_82350b.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/gpib/agilent_82350b/agilent_82350b.c +2 -2
@@ -773,7 +773,7 @@ static void agilent_82350b_detach(struct gpib_board *board)agilent_82350b_free_private (board); } -static gpib_interface_t agilent_82350b_unaccel_interface = { +static struct gpib_interface agilent_82350b_unaccel_interface = { .name ="agilent_82350b_unaccel" , .attach = agilent_82350b_unaccel_attach, .detach = agilent_82350b_detach,
@@ -801,7 +801,7 @@ static gpib_interface_t agilent_82350b_unaccel_interface = { .return_to_local = agilent_82350b_return_to_local, }; -static gpib_interface_t agilent_82350b_interface = { +static struct gpib_interface agilent_82350b_interface = { .name ="agilent_82350b" , .attach = agilent_82350b_accel_attach, .detach = agilent_82350b_detach,
Signature · 1 line
2.43.0
PATCH v3 3/18 staging: gpib: agilent_82357a: gpib_interface
In reply to Michael RubinUsing Linux code style for struct gpib_interface.
Adhering to Linux code style.
Reported by checkpatch.pl
In general, a pointer, or a struct that has elements that can reasonably be directly accessed should never be a typedef.
--- drivers/staging/gpib/agilent_82357a/agilent_82357a.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/gpib/agilent_82357a/agilent_82357a.c +1 -1
@@ -1434,7 +1434,7 @@ static void agilent_82357a_detach(struct gpib_board *board)mutex_unlock (&agilent_82357a_hotplug_lock); } -static gpib_interface_t agilent_82357a_gpib_interface = { +static struct gpib_interface agilent_82357a_gpib_interface = { .name ="agilent_82357a" , .attach = agilent_82357a_attach, .detach = agilent_82357a_detach,
Signature · 1 line
2.43.0
PATCH v3 4/18 staging: gpib: cb7210: struct gpib_interface
In reply to Michael RubinUsing Linux code style for struct gpib_interface.
Adhering to Linux code style.
Reported by checkpatch.pl
In general, a pointer, or a struct that has elements that can reasonably be directly accessed should never be a typedef.
--- drivers/staging/gpib/cb7210/cb7210.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-)
drivers/staging/gpib/cb7210/cb7210.c +9 -9
@@ -686,7 +686,7 @@ static void cb7210_return_to_local(struct gpib_board *board)write_byte (nec_priv,AUX_RTL ,AUXMR ); } -static gpib_interface_t cb_pci_unaccel_interface = { +static struct gpib_interface cb_pci_unaccel_interface = { .name ="cbi_pci_unaccel" , .attach = cb_pci_attach, .detach = cb_pci_detach,
@@ -714,7 +714,7 @@ static gpib_interface_t cb_pci_unaccel_interface = { .return_to_local = cb7210_return_to_local, }; -static gpib_interface_t cb_pci_accel_interface = { +static struct gpib_interface cb_pci_accel_interface = { .name ="cbi_pci_accel" , .attach = cb_pci_attach, .detach = cb_pci_detach,
@@ -742,7 +742,7 @@ static gpib_interface_t cb_pci_accel_interface = { .return_to_local = cb7210_return_to_local, }; -static gpib_interface_t cb_pci_interface = { +static struct gpib_interface cb_pci_interface = { .name ="cbi_pci" , .attach = cb_pci_attach, .detach = cb_pci_detach,
@@ -769,7 +769,7 @@ static gpib_interface_t cb_pci_interface = { .return_to_local = cb7210_return_to_local, }; -static gpib_interface_t cb_isa_unaccel_interface = { +static struct gpib_interface cb_isa_unaccel_interface = { .name ="cbi_isa_unaccel" , .attach = cb_isa_attach, .detach = cb_isa_detach,
@@ -797,7 +797,7 @@ static gpib_interface_t cb_isa_unaccel_interface = { .return_to_local = cb7210_return_to_local, }; -static gpib_interface_t cb_isa_interface = { +static struct gpib_interface cb_isa_interface = { .name ="cbi_isa" , .attach = cb_isa_attach, .detach = cb_isa_detach,
@@ -824,7 +824,7 @@ static gpib_interface_t cb_isa_interface = { .return_to_local = cb7210_return_to_local, }; -static gpib_interface_t cb_isa_accel_interface = { +static struct gpib_interface cb_isa_accel_interface = { .name ="cbi_isa_accel" , .attach = cb_isa_attach, .detach = cb_isa_detach,
@@ -1334,7 +1334,7 @@ static void cb_pcmcia_cleanup_module(void)pcmcia_unregister_driver (&cb_gpib_cs_driver); } -static gpib_interface_t cb_pcmcia_unaccel_interface = { +static struct gpib_interface cb_pcmcia_unaccel_interface = { .name ="cbi_pcmcia_unaccel" , .attach = cb_pcmcia_attach, .detach = cb_pcmcia_detach,
@@ -1362,7 +1362,7 @@ static gpib_interface_t cb_pcmcia_unaccel_interface = { .return_to_local = cb7210_return_to_local, }; -static gpib_interface_t cb_pcmcia_interface = { +static struct gpib_interface cb_pcmcia_interface = { .name ="cbi_pcmcia" , .attach = cb_pcmcia_attach, .detach = cb_pcmcia_detach,
@@ -1390,7 +1390,7 @@ static gpib_interface_t cb_pcmcia_interface = { .return_to_local = cb7210_return_to_local, }; -static gpib_interface_t cb_pcmcia_accel_interface = { +static struct gpib_interface cb_pcmcia_accel_interface = { .name ="cbi_pcmcia_accel" , .attach = cb_pcmcia_attach, .detach = cb_pcmcia_detach,
Signature · 1 line
2.43.0
PATCH v3 5/18 staging: gpib: cec: struct gpib_interface
In reply to Michael RubinUsing Linux code style for struct gpib_interface.
Adhering to Linux code style.
Reported by checkpatch.pl
In general, a pointer, or a struct that has elements that can reasonably be directly accessed should never be a typedef.
--- drivers/staging/gpib/cec/cec_gpib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/gpib/cec/cec_gpib.c +1 -1
@@ -188,7 +188,7 @@ static void cec_return_to_local(struct gpib_board *board)nec7210_return_to_local (board, &priv->nec7210_priv); } -static gpib_interface_t cec_pci_interface = { +static struct gpib_interface cec_pci_interface = { .name ="cec_pci" , .attach = cec_pci_attach, .detach = cec_pci_detach,
Signature · 1 line
2.43.0
PATCH v3 6/18 staging: gpib: common: struct gpib_interface
In reply to Michael RubinUsing Linux code style for struct gpib_interface.
Adhering to Linux code style.
Reported by checkpatch.pl
In general, a pointer, or a struct that has elements that can reasonably be directly accessed should never be a typedef.
--- drivers/staging/gpib/common/gpib_os.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/gpib/common/gpib_os.c +2 -2
@@ -2038,7 +2038,7 @@ void init_gpib_descriptor(struct gpib_descriptor *desc)atomic_set (&desc->io_in_progress,0 ); } -int gpib_register_driver (gpib_interface_t *interface,struct module *provider_module) +int gpib_register_driver (struct gpib_interface *interface,struct module *provider_module) {struct gpib_interface_list *entry;
@@ -2054,7 +2054,7 @@ int gpib_register_driver(gpib_interface_t *interface, struct module *provider_mo }EXPORT_SYMBOL (gpib_register_driver); -void gpib_unregister_driver (gpib_interface_t *interface) +void gpib_unregister_driver (struct gpib_interface *interface) {int i;struct list_head *list_ptr;
Signature · 1 line
2.43.0
PATCH v3 7/18 staging: gpib: fluke: struct gpib_interface
In reply to Michael RubinUsing Linux code style for struct gpib_interface.
Adhering to Linux code style.
Reported by checkpatch.pl
In general, a pointer, or a struct that has elements that can reasonably be directly accessed should never be a typedef.
--- drivers/staging/gpib/eastwood/fluke_gpib.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/staging/gpib/eastwood/fluke_gpib.c +3 -3
@@ -712,7 +712,7 @@ static int fluke_accel_read(struct gpib_board *board, uint8_t *buffer, size_t lereturn retval; } -static gpib_interface_t fluke_unaccel_interface = { +static struct gpib_interface fluke_unaccel_interface = { .name ="fluke_unaccel" , .attach = fluke_attach_holdoff_all, .detach = fluke_detach,
@@ -748,7 +748,7 @@ static gpib_interface_t fluke_unaccel_interface = {* register just as the dma controller is also doing a read. */ -static gpib_interface_t fluke_hybrid_interface = { +static struct gpib_interface fluke_hybrid_interface = { .name ="fluke_hybrid" , .attach = fluke_attach_holdoff_all, .detach = fluke_detach,
@@ -775,7 +775,7 @@ static gpib_interface_t fluke_hybrid_interface = { .return_to_local = fluke_return_to_local, }; -static gpib_interface_t fluke_interface = { +static struct gpib_interface fluke_interface = { .name ="fluke" , .attach = fluke_attach_holdoff_end, .detach = fluke_detach,
Signature · 1 line
2.43.0
PATCH v3 8/18 staging: gpib: fmh: struct gpib_interface
In reply to Michael RubinUsing Linux code style for struct gpib_interface.
Adhering to Linux code style.
Reported by checkpatch.pl
In general, a pointer, or a struct that has elements that can reasonably be directly accessed should never be a typedef.
--- drivers/staging/gpib/fmh_gpib/fmh_gpib.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/staging/gpib/fmh_gpib/fmh_gpib.c +4 -4
@@ -1031,7 +1031,7 @@ static int fmh_gpib_fifo_read(struct gpib_board *board, uint8_t *buffer, size_treturn retval; } -static gpib_interface_t fmh_gpib_unaccel_interface = { +static struct gpib_interface fmh_gpib_unaccel_interface = { .name ="fmh_gpib_unaccel" , .attach = fmh_gpib_attach_holdoff_all, .detach = fmh_gpib_detach,
@@ -1059,7 +1059,7 @@ static gpib_interface_t fmh_gpib_unaccel_interface = { .return_to_local = fmh_gpib_return_to_local, }; -static gpib_interface_t fmh_gpib_interface = { +static struct gpib_interface fmh_gpib_interface = { .name ="fmh_gpib" , .attach = fmh_gpib_attach_holdoff_end, .detach = fmh_gpib_detach,
@@ -1087,7 +1087,7 @@ static gpib_interface_t fmh_gpib_interface = { .return_to_local = fmh_gpib_return_to_local, }; -static gpib_interface_t fmh_gpib_pci_interface = { +static struct gpib_interface fmh_gpib_pci_interface = { .name ="fmh_gpib_pci" , .attach = fmh_gpib_pci_attach_holdoff_end, .detach = fmh_gpib_pci_detach,
@@ -1115,7 +1115,7 @@ static gpib_interface_t fmh_gpib_pci_interface = { .return_to_local = fmh_gpib_return_to_local, }; -static gpib_interface_t fmh_gpib_pci_unaccel_interface = { +static struct gpib_interface fmh_gpib_pci_unaccel_interface = { .name ="fmh_gpib_pci_unaccel" , .attach = fmh_gpib_pci_attach_holdoff_all, .detach = fmh_gpib_pci_detach,
Signature · 1 line
2.43.0
PATCH v3 9/18 staging: gpib: gpio: struct gpib_interface
In reply to Michael RubinUsing Linux code style for struct gpib_interface.
Adhering to Linux code style.
Reported by checkpatch.pl
In general, a pointer, or a struct that has elements that can reasonably be directly accessed should never be a typedef.
--- drivers/staging/gpib/gpio/gpib_bitbang.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/gpib/gpio/gpib_bitbang.c +1 -1
@@ -1308,7 +1308,7 @@ static int bb_attach(struct gpib_board *board, const struct gpib_board_config *creturn retval; } -static gpib_interface_t bb_interface = { +static struct gpib_interface bb_interface = { .name =NAME , .attach = bb_attach, .detach = bb_detach,
Signature · 1 line
2.43.0
PATCH v3 10/18 staging: gpib: hp_82335: struct gpib_interface
In reply to Michael RubinUsing Linux code style for struct gpib_interface.
Adhering to Linux code style.
Reported by checkpatch.pl
In general, a pointer, or a struct that has elements that can reasonably be directly accessed should never be a typedef.
--- drivers/staging/gpib/hp_82335/hp82335.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/gpib/hp_82335/hp82335.c +1 -1
@@ -180,7 +180,7 @@ static void hp82335_return_to_local(struct gpib_board *board)tms9914_return_to_local (board, &priv->tms9914_priv); } -static gpib_interface_t hp82335_interface = { +static struct gpib_interface hp82335_interface = { .name ="hp82335" , .attach = hp82335_attach, .detach = hp82335_detach,
Signature · 1 line
2.43.0
PATCH v3 11/18 staging: gpib: hp2341: struct gpib_interface
In reply to Michael RubinUsing Linux code style for struct gpib_interface.
Adhering to Linux code style.
Reported by checkpatch.pl
In general, a pointer, or a struct that has elements that can reasonably be directly accessed should never be a typedef.
--- drivers/staging/gpib/hp_82341/hp_82341.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/gpib/hp_82341/hp_82341.c +2 -2
@@ -411,7 +411,7 @@ static void hp_82341_return_to_local(struct gpib_board *board)tms9914_return_to_local (board, &priv->tms9914_priv); } -static gpib_interface_t hp_82341_unaccel_interface = { +static struct gpib_interface hp_82341_unaccel_interface = { .name ="hp_82341_unaccel" , .attach = hp_82341_attach, .detach = hp_82341_detach,
@@ -439,7 +439,7 @@ static gpib_interface_t hp_82341_unaccel_interface = { .return_to_local = hp_82341_return_to_local, }; -static gpib_interface_t hp_82341_interface = { +static struct gpib_interface hp_82341_interface = { .name ="hp_82341" , .attach = hp_82341_attach, .detach = hp_82341_detach,
Signature · 1 line
2.43.0
PATCH v3 12/18 staging: gpib: gpibP: struct gpib_interface
In reply to Michael RubinUsing Linux code style for struct gpib_interface.
Adhering to Linux code style.
Reported by checkpatch.pl
In general, a pointer, or a struct that has elements that can reasonably be directly accessed should never be a typedef.
--- drivers/staging/gpib/include/gpibP.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/gpib/include/gpibP.h +2 -2
@@ -18,8 +18,8 @@#include <linux/interrupt.h> #include <linux/io.h> -int gpib_register_driver (gpib_interface_t *interface,struct module *mod); -void gpib_unregister_driver (gpib_interface_t *interface); +int gpib_register_driver (struct gpib_interface *interface,struct module *mod); +void gpib_unregister_driver (struct gpib_interface *interface);struct pci_dev *gpib_pci_get_device (const struct gpib_board_config *config,unsigned int vendor_id,unsigned int device_id,struct pci_dev *from); struct pci_dev *gpib_pci_get_subsys(const struct gpib_board_config *config, unsigned int vendor_id,
Signature · 1 line
2.43.0
PATCH v3 13/18 staging: gpib: ines: struct gpib_interface
In reply to Michael RubinUsing Linux code style for struct gpib_interface.
Adhering to Linux code style.
Reported by checkpatch.pl
In general, a pointer, or a struct that has elements that can reasonably be directly accessed should never be a typedef.
--- drivers/staging/gpib/ines/ines_gpib.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
drivers/staging/gpib/ines/ines_gpib.c +7 -7
@@ -539,7 +539,7 @@ void ines_return_to_local(struct gpib_board *board)nec7210_return_to_local (board, &priv->nec7210_priv); } -static gpib_interface_t ines_pci_unaccel_interface = { +static struct gpib_interface ines_pci_unaccel_interface = { .name ="ines_pci_unaccel" , .attach = ines_pci_attach, .detach = ines_pci_detach,
@@ -567,7 +567,7 @@ static gpib_interface_t ines_pci_unaccel_interface = { .return_to_local = ines_return_to_local, }; -static gpib_interface_t ines_pci_interface = { +static struct gpib_interface ines_pci_interface = { .name ="ines_pci" , .attach = ines_pci_accel_attach, .detach = ines_pci_detach,
@@ -595,7 +595,7 @@ static gpib_interface_t ines_pci_interface = { .return_to_local = ines_return_to_local, }; -static gpib_interface_t ines_pci_accel_interface = { +static struct gpib_interface ines_pci_accel_interface = { .name ="ines_pci_accel" , .attach = ines_pci_accel_attach, .detach = ines_pci_detach,
@@ -623,7 +623,7 @@ static gpib_interface_t ines_pci_accel_interface = { .return_to_local = ines_return_to_local, }; -static gpib_interface_t ines_isa_interface = { +static struct gpib_interface ines_isa_interface = { .name ="ines_isa" , .attach = ines_isa_attach, .detach = ines_isa_detach,
@@ -1218,7 +1218,7 @@ void ines_pcmcia_cleanup_module(void)pcmcia_unregister_driver (&ines_gpib_cs_driver); } -static gpib_interface_t ines_pcmcia_unaccel_interface = { +static struct gpib_interface ines_pcmcia_unaccel_interface = { .name ="ines_pcmcia_unaccel" , .attach = ines_pcmcia_attach, .detach = ines_pcmcia_detach,
@@ -1246,7 +1246,7 @@ static gpib_interface_t ines_pcmcia_unaccel_interface = { .return_to_local = ines_return_to_local, }; -static gpib_interface_t ines_pcmcia_accel_interface = { +static struct gpib_interface ines_pcmcia_accel_interface = { .name ="ines_pcmcia_accel" , .attach = ines_pcmcia_accel_attach, .detach = ines_pcmcia_detach,
@@ -1274,7 +1274,7 @@ static gpib_interface_t ines_pcmcia_accel_interface = { .return_to_local = ines_return_to_local, }; -static gpib_interface_t ines_pcmcia_interface = { +static struct gpib_interface ines_pcmcia_interface = { .name ="ines_pcmcia" , .attach = ines_pcmcia_accel_attach, .detach = ines_pcmcia_detach,
Signature · 1 line
2.43.0
PATCH v3 14/18 staging: gpib: lpvo_usb: struct gpib_interface
In reply to Michael RubinUsing Linux code style for struct gpib_interface.
Adhering to Linux code style.
Reported by checkpatch.pl
In general, a pointer, or a struct that has elements that can reasonably be directly accessed should never be a typedef.
--- drivers/staging/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c +1 -1
@@ -1055,7 +1055,7 @@ static int usb_gpib_t1_delay(struct gpib_board *board, unsigned int nano_sec)* *** module dispatch table and init/exit functions *** */ -static gpib_interface_t usb_gpib_interface = { +static struct gpib_interface usb_gpib_interface = { .name =NAME , .attach = usb_gpib_attach, .detach = usb_gpib_detach,
Signature · 1 line
2.43.0
PATCH v3 15/18 staging: gpib: ni_usb: struct gpib_interface
In reply to Michael RubinUsing Linux code style for struct gpib_interface.
Adhering to Linux code style.
Reported by checkpatch.pl
In general, a pointer, or a struct that has elements that can reasonably be directly accessed should never be a typedef.
--- drivers/staging/gpib/ni_usb/ni_usb_gpib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/gpib/ni_usb/ni_usb_gpib.c +1 -1
@@ -2373,7 +2373,7 @@ static void ni_usb_detach(struct gpib_board *board)mutex_unlock (&ni_usb_hotplug_lock); } -static gpib_interface_t ni_usb_gpib_interface = { +static struct gpib_interface ni_usb_gpib_interface = { .name ="ni_usb_b" , .attach = ni_usb_attach, .detach = ni_usb_detach,
Signature · 1 line
2.43.0
PATCH v3 16/18 staging: gpib: pc2: struct gpib_interface
In reply to Michael RubinUsing Linux code style for struct gpib_interface.
Adhering to Linux code style.
Reported by checkpatch.pl
In general, a pointer, or a struct that has elements that can reasonably be directly accessed should never be a typedef.
--- drivers/staging/gpib/pc2/pc2_gpib.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/staging/gpib/pc2/pc2_gpib.c +4 -4
@@ -519,7 +519,7 @@ static void pc2_2a_detach(struct gpib_board *board)pc2a_common_detach (board, pc2_2a_iosize); } -static gpib_interface_t pc2_interface = { +static struct gpib_interface pc2_interface = { .name ="pcII" , .attach = pc2_attach, .detach = pc2_detach,
@@ -547,7 +547,7 @@ static gpib_interface_t pc2_interface = { .return_to_local = pc2_return_to_local, }; -static gpib_interface_t pc2a_interface = { +static struct gpib_interface pc2a_interface = { .name ="pcIIa" , .attach = pc2a_attach, .detach = pc2a_detach,
@@ -575,7 +575,7 @@ static gpib_interface_t pc2a_interface = { .return_to_local = pc2_return_to_local, }; -static gpib_interface_t pc2a_cb7210_interface = { +static struct gpib_interface pc2a_cb7210_interface = { .name ="pcIIa_cb7210" , .attach = pc2a_cb7210_attach, .detach = pc2a_detach,
@@ -603,7 +603,7 @@ static gpib_interface_t pc2a_cb7210_interface = { .return_to_local = pc2_return_to_local, }; -static gpib_interface_t pc2_2a_interface = { +static struct gpib_interface pc2_2a_interface = { .name ="pcII_IIa" , .attach = pc2_2a_attach, .detach = pc2_2a_detach,
Signature · 1 line
2.43.0
PATCH v3 17/18 staging: gpib: tnt4882: struct gpib_interface
In reply to Michael RubinUsing Linux code style for struct gpib_interface.
Adhering to Linux code style.
Reported by checkpatch.pl
In general, a pointer, or a struct that has elements that can reasonably be directly accessed should never be a typedef.
--- drivers/staging/gpib/tnt4882/tnt4882_gpib.c | 24 ++++++++++----------- 1 file changed, 12 insertions(+), 12 deletions(-)
drivers/staging/gpib/tnt4882/tnt4882_gpib.c +12 -12
@@ -1122,7 +1122,7 @@ static int tnt4882_pci_probe(struct pci_dev *dev, const struct pci_device_id *idreturn 0 ; } -static gpib_interface_t ni_pci_interface = { +static struct gpib_interface ni_pci_interface = { .name ="ni_pci" , .attach = ni_pci_attach, .detach = ni_pci_detach,
@@ -1150,7 +1150,7 @@ static gpib_interface_t ni_pci_interface = { .return_to_local = tnt4882_return_to_local, }; -static gpib_interface_t ni_pci_accel_interface = { +static struct gpib_interface ni_pci_accel_interface = { .name ="ni_pci_accel" , .attach = ni_pci_attach, .detach = ni_pci_detach,
@@ -1178,7 +1178,7 @@ static gpib_interface_t ni_pci_accel_interface = { .return_to_local = tnt4882_return_to_local, }; -static gpib_interface_t ni_isa_interface = { +static struct gpib_interface ni_isa_interface = { .name ="ni_isa" , .attach = ni_tnt_isa_attach, .detach = ni_isa_detach,
@@ -1206,7 +1206,7 @@ static gpib_interface_t ni_isa_interface = { .return_to_local = tnt4882_return_to_local, }; -static gpib_interface_t ni_nat4882_isa_interface = { +static struct gpib_interface ni_nat4882_isa_interface = { .name ="ni_nat4882_isa" , .attach = ni_nat4882_isa_attach, .detach = ni_isa_detach,
@@ -1234,7 +1234,7 @@ static gpib_interface_t ni_nat4882_isa_interface = { .return_to_local = tnt4882_return_to_local, }; -static gpib_interface_t ni_nec_isa_interface = { +static struct gpib_interface ni_nec_isa_interface = { .name ="ni_nec_isa" , .attach = ni_nec_isa_attach, .detach = ni_isa_detach,
@@ -1262,7 +1262,7 @@ static gpib_interface_t ni_nec_isa_interface = { .return_to_local = tnt4882_return_to_local, }; -static gpib_interface_t ni_isa_accel_interface = { +static struct gpib_interface ni_isa_accel_interface = { .name ="ni_isa_accel" , .attach = ni_tnt_isa_attach, .detach = ni_isa_detach,
@@ -1290,7 +1290,7 @@ static gpib_interface_t ni_isa_accel_interface = { .return_to_local = tnt4882_return_to_local, }; -static gpib_interface_t ni_nat4882_isa_accel_interface = { +static struct gpib_interface ni_nat4882_isa_accel_interface = { .name ="ni_nat4882_isa_accel" , .attach = ni_nat4882_isa_attach, .detach = ni_isa_detach,
@@ -1318,7 +1318,7 @@ static gpib_interface_t ni_nat4882_isa_accel_interface = { .return_to_local = tnt4882_return_to_local, }; -static gpib_interface_t ni_nec_isa_accel_interface = { +static struct gpib_interface ni_nec_isa_accel_interface = { .name ="ni_nec_isa_accel" , .attach = ni_nec_isa_attach, .detach = ni_isa_detach,
@@ -1377,8 +1377,8 @@ MODULE_DEVICE_TABLE(pnp, tnt4882_pnp_table);#endif #ifdef CONFIG_GPIB_PCMCIA -static gpib_interface_t ni_pcmcia_interface; -static gpib_interface_t ni_pcmcia_accel_interface; +static struct gpib_interface ni_pcmcia_interface; +static struct gpib_interface ni_pcmcia_accel_interface;static int __init init_ni_gpib_cs (void ); static void __exit exit_ni_gpib_cs(void);#endif
@@ -1775,7 +1775,7 @@ static void ni_pcmcia_detach(struct gpib_board *board)tnt4882_free_private (board); } -static gpib_interface_t ni_pcmcia_interface = { +static struct gpib_interface ni_pcmcia_interface = { .name ="ni_pcmcia" , .attach = ni_pcmcia_attach, .detach = ni_pcmcia_detach,
@@ -1803,7 +1803,7 @@ static gpib_interface_t ni_pcmcia_interface = { .return_to_local = tnt4882_return_to_local, }; -static gpib_interface_t ni_pcmcia_accel_interface = { +static struct gpib_interface ni_pcmcia_accel_interface = { .name ="ni_pcmcia_accel" , .attach = ni_pcmcia_attach, .detach = ni_pcmcia_detach,
Signature · 1 line
2.43.0
PATCH v3 18/18 staging: gpib: Removing typedef gpib_interface_t
In reply to Michael RubinRemoving gpib_interface_t to adhere to Linux code style.
Reported by checkpatch.pl
In general, a pointer, or a struct that has elements that can reasonably be directly accessed should never be a typedef.
--- drivers/staging/gpib/include/gpib_types.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
drivers/staging/gpib/include/gpib_types.h +3 -4
@@ -8,7 +8,7 @@#define _GPIB_TYPES_H#ifdef __KERNEL__ -/* gpib_interface_t defines the interface +/* gpib_interface defines the interface * between the board-specific details dealt with in the drivers * and generic interface provided by gpib-common. * This really should be in a different header file.
@@ -22,7 +22,6 @@#include <linux/timer.h> #include <linux/interrupt.h> -typedef struct gpib_interface gpib_interface_t ;struct gpib_board ;/* config parameters that are only used by driver attach functions */
@@ -212,7 +211,7 @@ static inline void init_gpib_pseudo_irq(struct gpib_pseudo_irq *pseudo_irq)/* list so we can make a linked list of drivers */ struct gpib_interface_list {struct list_head list; -gpib_interface_t *interface; +struct gpib_interface *interface;struct module *module; };
@@ -222,7 +221,7 @@ struct gpib_interface_list {*/ struct gpib_board {/* functions used by this board */ -gpib_interface_t *interface; +struct gpib_interface *interface;/* Pointer to module whose use count we should increment when * interface is in use */
Signature · 1 line
2.43.0