staging: gpib: Removing typedef gpib_board_config_t
cover staging: gpib: Removing typedef gpib_board_config_t
Using Linux code style for struct gpib_board_config.
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: Adding "struct gpib_board_config"
* Patch 2 - Patch 17: Replacing gpib_board_config_t with "struct gpib_board_config"
* Patch 18: Removing typedef for gpib_board_config_t.
Michael Rubin (18):
staing: gpib: struct typing for gpib_board_config
staging: gpib: agilent_82350b: gpib_board_config
staging: gpib: agilent_82357a: gpib_board_config
staging: gpib: cb7210: struct gpib_board_config
staging: gpib: cec: struct gpib_board_config
staging: gpib: common: struct gpib_board_config
staging: gpib: eastwood: struct gpib_board_config
staging: gpib: fmh: struct gpib_board_config
staging: gpib: gpio: struct gpib_board_config
staging: gpib: hp_82335: struct gpib_board_config
staging: gpib: hp_82341: struct gpib_board_config
staging: gpib: gpibP: struct gpib_board_config
staging: gpib: ines: struct gpib_board_config
staging: gpib: lpvo_usb: struct gpib_board_config
staging: gpib: ni_usb: struct gpib_board_config
staging: gpib: pc2: struct gpib_board_config
staging: gpib: tnt4882: struct gpib_board_config
staging: gpib: Removing typedef gpib_board_config
.../gpib/agilent_82350b/agilent_82350b.c | 8 +++--- .../gpib/agilent_82357a/agilent_82357a.c | 4 +-- drivers/staging/gpib/cb7210/cb7210.c | 12 ++++---- drivers/staging/gpib/cec/cec_gpib.c | 4 +-- drivers/staging/gpib/common/gpib_os.c | 28 +++++++++---------- drivers/staging/gpib/eastwood/fluke_gpib.c | 12 ++++---- drivers/staging/gpib/fmh_gpib/fmh_gpib.c | 27 ++++++++++-------- drivers/staging/gpib/gpio/gpib_bitbang.c | 2 +- drivers/staging/gpib/hp_82335/hp82335.c | 4 +-- drivers/staging/gpib/hp_82341/hp_82341.c | 7 +++-- drivers/staging/gpib/include/gpibP.h | 4 +-- drivers/staging/gpib/include/gpib_types.h | 8 +++--- drivers/staging/gpib/ines/ines_gpib.c | 23 +++++++-------- .../gpib/lpvo_usb_gpib/lpvo_usb_gpib.c | 2 +- drivers/staging/gpib/ni_usb/ni_usb_gpib.c | 4 +-- drivers/staging/gpib/pc2/pc2_gpib.c | 12 ++++---- drivers/staging/gpib/tnt4882/tnt4882_gpib.c | 12 ++++---- 17 files changed, 91 insertions(+), 82 deletions(-)
Signature · 1 line
2.43.0
PATCH 1/18 staing: gpib: struct typing for gpib_board_config
Using Linux code style for gpib_board_config struct in .h to allow drivers to migrate.
Adhering to Linux code style.
In general, a pointer, or a struct that has elements that can reasonably be directly accessed should never be a typedef.
Reported by CheckPatch
WARNING: do not add new typedefs
--- drivers/staging/gpib/include/gpib_types.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/staging/gpib/include/gpib_types.h +3 -2
@@ -23,9 +23,10 @@#include <linux/interrupt.h> struct gpib_board ; +typedef struct gpib_board_config gpib_board_config_t ;/* config parameters that are only used by driver attach functions */ -typedef struct { +struct gpib_board_config {/* firmware blob */ void *init_data;int init_data_length;
@@ -48,7 +49,7 @@ typedef struct {char *device_path;/* serial number of hardware to attach */ char *serial_number; -} gpib_board_config_t; +};struct gpib_interface {/* name of board */
Signature · 1 line
2.43.0
PATCH 2/18 staging: gpib: agilent_82350b: gpib_board_config
In reply to Michael RubinUsing Linux code style for struct gpib_board_config
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 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/staging/gpib/agilent_82350b/agilent_82350b.c +4 -4
@@ -492,7 +492,7 @@ static void agilent_82350b_free_private(struct gpib_board *board) }static int init_82350a_hardware (struct gpib_board *board, -const gpib_board_config_t *config) +const struct gpib_board_config *config) {struct agilent_82350b_priv *a_priv = board->private_data;static const unsigned int firmware_length =5302 ;
@@ -587,7 +587,7 @@ static int test_sram(struct gpib_board *board) }static int agilent_82350b_generic_attach (struct gpib_board *board, -const gpib_board_config_t *config, +const struct gpib_board_config *config,int use_fifos) {
@@ -730,13 +730,13 @@ static int agilent_82350b_generic_attach(struct gpib_board *board, }static int agilent_82350b_unaccel_attach (struct gpib_board *board, -const gpib_board_config_t *config) +const struct gpib_board_config *config) {return agilent_82350b_generic_attach (board, config,0 ); }static int agilent_82350b_accel_attach (struct gpib_board *board, -const gpib_board_config_t *config) +const struct gpib_board_config *config) {return agilent_82350b_generic_attach (board, config,1 ); }
Signature · 1 line
2.43.0
PATCH 3/18 staging: gpib: agilent_82357a: gpib_board_config
In reply to Michael RubinUsing Linux code style for struct gpib_board_config
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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/gpib/agilent_82357a/agilent_82357a.c +2 -2
@@ -1292,7 +1292,7 @@ static int agilent_82357a_init(struct gpib_board *board) }static inline int agilent_82357a_device_match (struct usb_interface *interface, -const gpib_board_config_t *config) +const struct gpib_board_config *config) {struct usb_device *const usbdev =interface_to_usbdev (interface);
@@ -1305,7 +1305,7 @@ static inline int agilent_82357a_device_match(struct usb_interface *interface,return 1 ; } -static int agilent_82357a_attach (struct gpib_board *board,const gpib_board_config_t *config) +static int agilent_82357a_attach (struct gpib_board *board,const struct gpib_board_config *config) {int retval;int i;
Signature · 1 line
2.43.0
PATCH 4/18 staging: gpib: cb7210: struct gpib_board_config
In reply to Michael RubinUsing Linux code style for struct gpib_board_config
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 | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/staging/gpib/cb7210/cb7210.c +6 -6
@@ -533,8 +533,8 @@ static irqreturn_t cb7210_interrupt(int irq, void *arg)return cb7210_internal_interrupt (arg); } -static int cb_pci_attach (struct gpib_board *board,const gpib_board_config_t *config); -static int cb_isa_attach (struct gpib_board *board,const gpib_board_config_t *config); +static int cb_pci_attach (struct gpib_board *board,const struct gpib_board_config *config); +static int cb_isa_attach (struct gpib_board *board,const struct gpib_board_config *config);static void cb_pci_detach (struct gpib_board *board);static void cb_isa_detach (struct gpib_board *board);
@@ -926,7 +926,7 @@ static int cb7210_init(struct cb7210_priv *cb_priv, struct gpib_board *board)return 0 ; } -static int cb_pci_attach (struct gpib_board *board,const gpib_board_config_t *config) +static int cb_pci_attach (struct gpib_board *board,const struct gpib_board_config *config) {struct cb7210_priv *cb_priv;struct nec7210_priv *nec_priv;
@@ -1031,7 +1031,7 @@ static void cb_pci_detach(struct gpib_board *board)cb7210_generic_detach (board); } -static int cb_isa_attach (struct gpib_board *board,const gpib_board_config_t *config) +static int cb_isa_attach (struct gpib_board *board,const struct gpib_board_config *config) {int isr_flags =0 ;struct cb7210_priv *cb_priv;
@@ -1133,7 +1133,7 @@ static struct pci_driver cb7210_pci_driver = {static int cb_gpib_config (struct pcmcia_device *link);static void cb_gpib_release (struct pcmcia_device *link); -static int cb_pcmcia_attach (struct gpib_board *board,const gpib_board_config_t *config); +static int cb_pcmcia_attach (struct gpib_board *board,const struct gpib_board_config *config);static void cb_pcmcia_detach (struct gpib_board *board);/*
@@ -1417,7 +1417,7 @@ static struct gpib_interface cb_pcmcia_accel_interface = { .return_to_local = cb7210_return_to_local, }; -static int cb_pcmcia_attach (struct gpib_board *board,const gpib_board_config_t *config) +static int cb_pcmcia_attach (struct gpib_board *board,const struct gpib_board_config *config) {struct cb7210_priv *cb_priv;struct nec7210_priv *nec_priv;
Signature · 1 line
2.43.0
PATCH 5/18 staging: gpib: cec: struct gpib_board_config
In reply to Michael RubinUsing Linux code style for struct gpib_board_config
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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/gpib/cec/cec_gpib.c +2 -2
@@ -40,7 +40,7 @@ static irqreturn_t cec_interrupt(int irq, void *arg)#define CEC_DEV_ID 0x5cec#define CEC_SUBID 0x9050 -static int cec_pci_attach (struct gpib_board *board,const gpib_board_config_t *config); +static int cec_pci_attach (struct gpib_board *board,const struct gpib_board_config *config);static void cec_pci_detach (struct gpib_board *board);
@@ -265,7 +265,7 @@ static void cec_init(struct cec_priv *cec_priv, const struct gpib_board *board)nec7210_board_online (nec_priv, board); } -static int cec_pci_attach (struct gpib_board *board,const gpib_board_config_t *config) +static int cec_pci_attach (struct gpib_board *board,const struct gpib_board_config *config) {struct cec_priv *cec_priv;struct nec7210_priv *nec_priv;
Signature · 1 line
2.43.0
PATCH 6/18 staging: gpib: common: struct gpib_board_config
In reply to Michael RubinUsing Linux code style for struct gpib_board_config
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 | 28 +++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-)
drivers/staging/gpib/common/gpib_os.c +14 -14
@@ -50,9 +50,9 @@ static int sad_ioctl(struct gpib_board *board, gpib_file_private_t *file_priv,static int eos_ioctl (struct gpib_board *board,unsigned long arg);static int request_service_ioctl (struct gpib_board *board,unsigned long arg);static int request_service2_ioctl (struct gpib_board *board,unsigned long arg); -static int iobase_ioctl (gpib_board_config_t *config,unsigned long arg); -static int irq_ioctl (gpib_board_config_t *config,unsigned long arg); -static int dma_ioctl (gpib_board_config_t *config,unsigned long arg); +static int iobase_ioctl (struct gpib_board_config *config,unsigned long arg); +static int irq_ioctl (struct gpib_board_config *config,unsigned long arg); +static int dma_ioctl (struct gpib_board_config *config,unsigned long arg);static int autospoll_ioctl (struct gpib_board *board,gpib_file_private_t *file_priv,unsigned long arg); static int mutex_ioctl(struct gpib_board *board, gpib_file_private_t *file_priv,
@@ -65,8 +65,8 @@ static int set_local_ppoll_mode_ioctl(struct gpib_board *board, unsigned long arstatic int get_local_ppoll_mode_ioctl (struct gpib_board *board,unsigned long arg);static int query_board_rsv_ioctl (struct gpib_board *board,unsigned long arg);static int interface_clear_ioctl (struct gpib_board *board,unsigned long arg); -static int select_pci_ioctl (gpib_board_config_t *config,unsigned long arg); -static int select_device_path_ioctl (gpib_board_config_t *config,unsigned long arg); +static int select_pci_ioctl (struct gpib_board_config *config,unsigned long arg); +static int select_device_path_ioctl (struct gpib_board_config *config,unsigned long arg);static int event_ioctl (struct gpib_board *board,unsigned long arg);static int request_system_control_ioctl (struct gpib_board *board,unsigned long arg);static int t1_delay_ioctl (struct gpib_board *board,unsigned long arg);
@@ -1542,7 +1542,7 @@ static int request_service2_ioctl(struct gpib_board *board, unsigned long arg) request_service2_cmd.new_reason_for_service); } -static int iobase_ioctl (gpib_board_config_t *config,unsigned long arg) +static int iobase_ioctl (struct gpib_board_config *config,unsigned long arg) {u64 base_addr;int retval;
@@ -1561,7 +1561,7 @@ static int iobase_ioctl(gpib_board_config_t *config, unsigned long arg)return 0 ; } -static int irq_ioctl (gpib_board_config_t *config,unsigned long arg) +static int irq_ioctl (struct gpib_board_config *config,unsigned long arg) {unsigned int irq;int retval;
@@ -1578,7 +1578,7 @@ static int irq_ioctl(gpib_board_config_t *config, unsigned long arg)return 0 ; } -static int dma_ioctl (gpib_board_config_t *config,unsigned long arg) +static int dma_ioctl (struct gpib_board_config *config,unsigned long arg) {unsigned int dma_channel;int retval;
@@ -1793,7 +1793,7 @@ static int interface_clear_ioctl(struct gpib_board *board, unsigned long arg)return ibsic (board, usec_duration); } -static int select_pci_ioctl (gpib_board_config_t *config,unsigned long arg) +static int select_pci_ioctl (struct gpib_board_config *config,unsigned long arg) {select_pci_ioctl_t selection;int retval;
@@ -1811,7 +1811,7 @@ static int select_pci_ioctl(gpib_board_config_t *config, unsigned long arg)return 0 ; } -static int select_device_path_ioctl (gpib_board_config_t *config,unsigned long arg) +static int select_device_path_ioctl (struct gpib_board_config *config,unsigned long arg) {select_device_path_ioctl_t *selection;int retval;
@@ -2069,9 +2069,9 @@ void gpib_unregister_driver(struct gpib_interface *interface) }EXPORT_SYMBOL (gpib_unregister_driver); -static void init_gpib_board_config (gpib_board_config_t *config) +static void init_gpib_board_config (struct gpib_board_config *config) { -memset (config,0 ,sizeof (gpib_board_config_t)); +memset (config,0 ,sizeof (struct gpib_board_config )); config->pci_bus =-1 ; config->pci_slot =-1 ; }
@@ -2212,7 +2212,7 @@ int gpib_match_device_path(struct device *dev, const char *device_path_in) }EXPORT_SYMBOL (gpib_match_device_path); -struct pci_dev *gpib_pci_get_device (const gpib_board_config_t *config,unsigned int vendor_id, +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 *pci_device = from;
@@ -2231,7 +2231,7 @@ struct pci_dev *gpib_pci_get_device(const gpib_board_config_t *config, unsigned }EXPORT_SYMBOL (gpib_pci_get_device); -struct pci_dev *gpib_pci_get_subsys (const gpib_board_config_t *config,unsigned int vendor_id, +struct pci_dev *gpib_pci_get_subsys (const struct gpib_board_config *config,unsigned int vendor_id,unsigned int device_id,unsigned int ss_vendor,unsigned int ss_device,struct pci_dev *from)
Signature · 1 line
2.43.0
PATCH 7/18 staging: gpib: eastwood: struct gpib_board_config
In reply to Michael RubinUsing Linux code style for struct gpib_board_config
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 | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-)
drivers/staging/gpib/eastwood/fluke_gpib.c +7 -5
@@ -24,8 +24,10 @@MODULE_LICENSE ("GPL" );MODULE_DESCRIPTION ("GPIB Driver for Fluke cda devices" ); -static int fluke_attach_holdoff_all (struct gpib_board *board,const gpib_board_config_t *config); -static int fluke_attach_holdoff_end (struct gpib_board *board,const gpib_board_config_t *config); +static int fluke_attach_holdoff_all (struct gpib_board *board, +const struct gpib_board_config *config); +static int fluke_attach_holdoff_end (struct gpib_board *board, +const struct gpib_board_config *config);static void fluke_detach (struct gpib_board *board);static int fluke_config_dma (struct gpib_board *board,int output);static irqreturn_t fluke_gpib_internal_interrupt (struct gpib_board *board);
@@ -943,7 +945,7 @@ static bool gpib_dma_channel_filter(struct dma_chan *chan, void *filter_param)return chan->chan_id ==0 ; } -static int fluke_attach_impl (struct gpib_board *board,const gpib_board_config_t *config, +static int fluke_attach_impl (struct gpib_board *board,const struct gpib_board_config *config,unsigned int handshake_mode) {struct fluke_priv *e_priv;
@@ -1049,12 +1051,12 @@ static int fluke_attach_impl(struct gpib_board *board, const gpib_board_config_treturn fluke_init (e_priv, board, handshake_mode); } -int fluke_attach_holdoff_all (struct gpib_board *board,const gpib_board_config_t *config) +int fluke_attach_holdoff_all (struct gpib_board *board,const struct gpib_board_config *config) {return fluke_attach_impl (board, config,HR_HLDA ); } -int fluke_attach_holdoff_end (struct gpib_board *board,const gpib_board_config_t *config) +int fluke_attach_holdoff_end (struct gpib_board *board,const struct gpib_board_config *config) {return fluke_attach_impl (board, config,HR_HLDE ); }
Signature · 1 line
2.43.0
PATCH 8/18 staging: gpib: fmh: struct gpib_board_config
In reply to Michael RubinUsing Linux code style for struct gpib_board_config
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 | 27 ++++++++++++++---------- 1 file changed, 16 insertions(+), 11 deletions(-)
drivers/staging/gpib/fmh_gpib/fmh_gpib.c +16 -11
@@ -32,13 +32,15 @@ MODULE_DESCRIPTION("GPIB Driver for fmh_gpib_core");MODULE_AUTHOR ("Frank Mori Hess <[email protected]>" );static irqreturn_t fmh_gpib_interrupt (int irq,void *arg); -static int fmh_gpib_attach_holdoff_all (struct gpib_board *board,const gpib_board_config_t *config); -static int fmh_gpib_attach_holdoff_end (struct gpib_board *board,const gpib_board_config_t *config); +static int fmh_gpib_attach_holdoff_all (struct gpib_board *board, +const struct gpib_board_config *config); +static int fmh_gpib_attach_holdoff_end (struct gpib_board *board, +const struct gpib_board_config *config);static void fmh_gpib_detach (struct gpib_board *board);static int fmh_gpib_pci_attach_holdoff_all (struct gpib_board *board, -const gpib_board_config_t *config); +const struct gpib_board_config *config);static int fmh_gpib_pci_attach_holdoff_end (struct gpib_board *board, -const gpib_board_config_t *config); +const struct gpib_board_config *config);static void fmh_gpib_pci_detach (struct gpib_board *board);static int fmh_gpib_config_dma (struct gpib_board *board,int output);static irqreturn_t fmh_gpib_internal_interrupt (struct gpib_board *board);
@@ -1335,7 +1337,7 @@ static int fmh_gpib_init(struct fmh_priv *e_priv, struct gpib_board *board, int/* Match callback for driver_find_device */ static int fmh_gpib_device_match (struct device *dev,const void *data) { -const gpib_board_config_t *config = data; +const struct gpib_board_config *config = data;if (dev_get_drvdata (dev))return 0 ;
@@ -1351,7 +1353,7 @@ static int fmh_gpib_device_match(struct device *dev, const void *data)return 1 ; } -static int fmh_gpib_attach_impl (struct gpib_board *board,const gpib_board_config_t *config, +static int fmh_gpib_attach_impl (struct gpib_board *board,const struct gpib_board_config *config,unsigned int handshake_mode,int acquire_dma) {struct fmh_priv *e_priv;
@@ -1454,12 +1456,12 @@ static int fmh_gpib_attach_impl(struct gpib_board *board, const gpib_board_confireturn fmh_gpib_init (e_priv, board, handshake_mode); } -int fmh_gpib_attach_holdoff_all (struct gpib_board *board,const gpib_board_config_t *config) +int fmh_gpib_attach_holdoff_all (struct gpib_board *board,const struct gpib_board_config *config) {return fmh_gpib_attach_impl (board, config,HR_HLDA ,0 ); } -int fmh_gpib_attach_holdoff_end (struct gpib_board *board,const gpib_board_config_t *config) +int fmh_gpib_attach_holdoff_end (struct gpib_board *board,const struct gpib_board_config *config) {return fmh_gpib_attach_impl (board, config,HR_HLDE ,1 ); }
@@ -1497,7 +1499,8 @@ void fmh_gpib_detach(struct gpib_board *board)fmh_gpib_generic_detach (board); } -static int fmh_gpib_pci_attach_impl (struct gpib_board *board,const gpib_board_config_t *config, +static int fmh_gpib_pci_attach_impl (struct gpib_board *board, +const struct gpib_board_config *config,unsigned int handshake_mode) {struct fmh_priv *e_priv;
@@ -1570,12 +1573,14 @@ static int fmh_gpib_pci_attach_impl(struct gpib_board *board, const gpib_board_creturn fmh_gpib_init (e_priv, board, handshake_mode); } -int fmh_gpib_pci_attach_holdoff_all (struct gpib_board *board,const gpib_board_config_t *config) +int fmh_gpib_pci_attach_holdoff_all (struct gpib_board *board, +const struct gpib_board_config *config) {return fmh_gpib_pci_attach_impl (board, config,HR_HLDA ); } -int fmh_gpib_pci_attach_holdoff_end (struct gpib_board *board,const gpib_board_config_t *config) +int fmh_gpib_pci_attach_holdoff_end (struct gpib_board *board, +const struct gpib_board_config *config) {int retval;struct fmh_priv *e_priv;
Signature · 1 line
2.43.0
PATCH 9/18 staging: gpib: gpio: struct gpib_board_config
In reply to Michael RubinUsing Linux code style for struct gpib_board_config
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
@@ -1206,7 +1206,7 @@ static void bb_detach(struct gpib_board *board)free_private (board); } -static int bb_attach (struct gpib_board *board,const gpib_board_config_t *config) +static int bb_attach (struct gpib_board *board,const struct gpib_board_config *config) {struct bb_priv *priv;int retval =0 ;
Signature · 1 line
2.43.0
PATCH 10/18 staging: gpib: hp_82335: struct gpib_board_config
In reply to Michael RubinUsing Linux code style for struct gpib_board_config
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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/gpib/hp_82335/hp82335.c +2 -2
@@ -24,7 +24,7 @@MODULE_LICENSE ("GPL" );MODULE_DESCRIPTION ("GPIB driver for HP 82335 interface cards" ); -static int hp82335_attach (struct gpib_board *board,const gpib_board_config_t *config); +static int hp82335_attach (struct gpib_board *board,const struct gpib_board_config *config);static void hp82335_detach (struct gpib_board *board);static irqreturn_t hp82335_interrupt (int irq,void *arg);
@@ -243,7 +243,7 @@ static void hp82335_clear_interrupt(struct hp82335_priv *hp_priv)writeb (0 , tms_priv->mmiobase +HPREG_INTR_CLEAR ); } -static int hp82335_attach (struct gpib_board *board,const gpib_board_config_t *config) +static int hp82335_attach (struct gpib_board *board,const struct gpib_board_config *config) {struct hp82335_priv *hp_priv;struct tms9914_priv *tms_priv;
Signature · 1 line
2.43.0
PATCH 11/18 staging: gpib: hp_82341: struct gpib_board_config
In reply to Michael RubinUsing Linux code style for struct gpib_board_config
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 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/staging/gpib/hp_82341/hp_82341.c +4 -3
@@ -250,7 +250,7 @@ static int hp_82341_accel_write(struct gpib_board *board, uint8_t *buffer, size_return 0 ; } -static int hp_82341_attach (struct gpib_board *board,const gpib_board_config_t *config); +static int hp_82341_attach (struct gpib_board *board,const struct gpib_board_config *config);static void hp_82341_detach (struct gpib_board *board);
@@ -619,7 +619,8 @@ static int hp_82341_load_firmware_array(struct hp_82341_priv *hp_priv,return 0 ; } -static int hp_82341_load_firmware (struct hp_82341_priv *hp_priv,const gpib_board_config_t *config) +static int hp_82341_load_firmware (struct hp_82341_priv *hp_priv, +const struct gpib_board_config *config) {if (config->init_data_length ==0 ) {if (xilinx_done (hp_priv))
@@ -686,7 +687,7 @@ static int clear_xilinx(struct hp_82341_priv *hp_priv)return 0 ; } -static int hp_82341_attach (struct gpib_board *board,const gpib_board_config_t *config) +static int hp_82341_attach (struct gpib_board *board,const struct gpib_board_config *config) {struct hp_82341_priv *hp_priv;struct tms9914_priv *tms_priv;
Signature · 1 line
2.43.0
PATCH 12/18 staging: gpib: gpibP: struct gpib_board_config
In reply to Michael RubinUsing Linux code style for struct gpib_board_config
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
@@ -20,9 +20,9 @@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 gpib_board_config_t *config,unsigned int vendor_id, +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 gpib_board_config_t *config,unsigned int vendor_id, +struct pci_dev *gpib_pci_get_subsys (const struct gpib_board_config *config,unsigned int vendor_id,unsigned int device_id,unsigned int ss_vendor,unsigned int ss_device,struct pci_dev *from);unsigned int num_gpib_events (const gpib_event_queue_t *queue);
Signature · 1 line
2.43.0
PATCH 13/18 staging: gpib: ines: struct gpib_board_config
In reply to Michael RubinUsing Linux code style for struct gpib_board_config
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 | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-)
drivers/staging/gpib/ines/ines_gpib.c +12 -11
@@ -313,9 +313,9 @@ irqreturn_t ines_interrupt(struct gpib_board *board)return IRQ_HANDLED ; } -static int ines_pci_attach (struct gpib_board *board,const gpib_board_config_t *config); -static int ines_pci_accel_attach (struct gpib_board *board,const gpib_board_config_t *config); -static int ines_isa_attach (struct gpib_board *board,const gpib_board_config_t *config); +static int ines_pci_attach (struct gpib_board *board,const struct gpib_board_config *config); +static int ines_pci_accel_attach (struct gpib_board *board,const struct gpib_board_config *config); +static int ines_isa_attach (struct gpib_board *board,const struct gpib_board_config *config);static void ines_pci_detach (struct gpib_board *board);static void ines_isa_detach (struct gpib_board *board);
@@ -724,7 +724,7 @@ void ines_online(struct ines_priv *ines_priv, const struct gpib_board *board, innec7210_set_reg_bits (nec_priv,IMR1 ,HR_DOIE |HR_DIIE ,0 ); } -static int ines_common_pci_attach (struct gpib_board *board,const gpib_board_config_t *config) +static int ines_common_pci_attach (struct gpib_board *board,const struct gpib_board_config *config) {struct ines_priv *ines_priv;struct nec7210_priv *nec_priv;
@@ -852,7 +852,7 @@ static int ines_common_pci_attach(struct gpib_board *board, const gpib_board_conreturn 0 ; } -int ines_pci_attach (struct gpib_board *board,const gpib_board_config_t *config) +int ines_pci_attach (struct gpib_board *board,const struct gpib_board_config *config) {struct ines_priv *ines_priv;int retval;
@@ -867,7 +867,7 @@ int ines_pci_attach(struct gpib_board *board, const gpib_board_config_t *config)return 0 ; } -int ines_pci_accel_attach (struct gpib_board *board,const gpib_board_config_t *config) +int ines_pci_accel_attach (struct gpib_board *board,const struct gpib_board_config *config) {struct ines_priv *ines_priv;int retval;
@@ -884,7 +884,7 @@ int ines_pci_accel_attach(struct gpib_board *board, const gpib_board_config_t *cstatic const int ines_isa_iosize =0x20 ; -int ines_isa_attach (struct gpib_board *board,const gpib_board_config_t *config) +int ines_isa_attach (struct gpib_board *board,const struct gpib_board_config *config) {struct ines_priv *ines_priv;struct nec7210_priv *nec_priv;
@@ -1000,8 +1000,9 @@ static const int ines_pcmcia_iosize = 0x20;static int ines_gpib_config (struct pcmcia_device *link);static void ines_gpib_release (struct pcmcia_device *link); -static int ines_pcmcia_attach (struct gpib_board *board,const gpib_board_config_t *config); -static int ines_pcmcia_accel_attach (struct gpib_board *board,const gpib_board_config_t *config); +static int ines_pcmcia_attach (struct gpib_board *board,const struct gpib_board_config *config); +static int ines_pcmcia_accel_attach (struct gpib_board *board, +const struct gpib_board_config *config);static void ines_pcmcia_detach (struct gpib_board *board);static irqreturn_t ines_pcmcia_interrupt (int irq,void *arg);static int ines_common_pcmcia_attach (struct gpib_board *board);
@@ -1345,7 +1346,7 @@ int ines_common_pcmcia_attach(struct gpib_board *board)return 0 ; } -int ines_pcmcia_attach (struct gpib_board *board,const gpib_board_config_t *config) +int ines_pcmcia_attach (struct gpib_board *board,const struct gpib_board_config *config) {struct ines_priv *ines_priv;int retval;
@@ -1360,7 +1361,7 @@ int ines_pcmcia_attach(struct gpib_board *board, const gpib_board_config_t *confreturn 0 ; } -int ines_pcmcia_accel_attach (struct gpib_board *board,const gpib_board_config_t *config) +int ines_pcmcia_accel_attach (struct gpib_board *board,const struct gpib_board_config *config) {struct ines_priv *ines_priv;int retval;
Signature · 1 line
2.43.0
PATCH 14/18 staging: gpib: lpvo_usb: struct gpib_board_config
In reply to Michael RubinUsing Linux code style for struct gpib_board_config
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
@@ -384,7 +384,7 @@ static void set_timeout(struct gpib_board *board)* detach() will be called. Always. */ -static int usb_gpib_attach (struct gpib_board *board,const gpib_board_config_t *config) +static int usb_gpib_attach (struct gpib_board *board,const struct gpib_board_config *config) {int retval, j;u32 base = config->ibbase;
Signature · 1 line
2.43.0
PATCH 15/18 staging: gpib: ni_usb: struct gpib_board_config
In reply to Michael RubinUsing Linux code style for struct gpib_board_config
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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/gpib/ni_usb/ni_usb_gpib.c +2 -2
@@ -2198,14 +2198,14 @@ static int ni_usb_hs_plus_extra_init(struct ni_usb_priv *ni_priv) }static inline int ni_usb_device_match (struct usb_interface *interface, -const gpib_board_config_t *config) +const struct gpib_board_config *config) {if (gpib_match_device_path (&interface->dev, config->device_path) ==0 )return 0 ;return 1 ; } -static int ni_usb_attach (struct gpib_board *board,const gpib_board_config_t *config) +static int ni_usb_attach (struct gpib_board *board,const struct gpib_board_config *config) {int retval;int i, index;
Signature · 1 line
2.43.0
PATCH 16/18 staging: gpib: pc2: struct gpib_board_config
In reply to Michael RubinUsing Linux code style for struct gpib_board_config
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 | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/staging/gpib/pc2/pc2_gpib.c +6 -6
@@ -252,7 +252,7 @@ static void free_private(struct gpib_board *board) board->private_data =NULL ; } -static int pc2_generic_attach (struct gpib_board *board,const gpib_board_config_t *config, +static int pc2_generic_attach (struct gpib_board *board,const struct gpib_board_config *config,enum nec7210_chipset chipset) {struct pc2_priv *pc2_priv;
@@ -295,7 +295,7 @@ static int pc2_generic_attach(struct gpib_board *board, const gpib_board_config_return 0 ; } -static int pc2_attach (struct gpib_board *board,const gpib_board_config_t *config) +static int pc2_attach (struct gpib_board *board,const struct gpib_board_config *config) {int isr_flags =0 ;struct pc2_priv *pc2_priv;
@@ -366,7 +366,7 @@ static void pc2_detach(struct gpib_board *board)free_private (board); } -static int pc2a_common_attach (struct gpib_board *board,const gpib_board_config_t *config, +static int pc2a_common_attach (struct gpib_board *board,const struct gpib_board_config *config,unsigned int num_registers,enum nec7210_chipset chipset) {unsigned int i, j;
@@ -460,17 +460,17 @@ static int pc2a_common_attach(struct gpib_board *board, const gpib_board_config_return 0 ; } -static int pc2a_attach (struct gpib_board *board,const gpib_board_config_t *config) +static int pc2a_attach (struct gpib_board *board,const struct gpib_board_config *config) {return pc2a_common_attach (board, config, pc2a_iosize,NEC7210 ); } -static int pc2a_cb7210_attach (struct gpib_board *board,const gpib_board_config_t *config) +static int pc2a_cb7210_attach (struct gpib_board *board,const struct gpib_board_config *config) {return pc2a_common_attach (board, config, pc2a_iosize,CB7210 ); } -static int pc2_2a_attach (struct gpib_board *board,const gpib_board_config_t *config) +static int pc2_2a_attach (struct gpib_board *board,const struct gpib_board_config *config) {return pc2a_common_attach (board, config, pc2_2a_iosize,NAT4882 ); }
Signature · 1 line
2.43.0
PATCH 17/18 staging: gpib: tnt4882: struct gpib_board_config
In reply to Michael RubinUsing Linux code style for struct gpib_board_config
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 | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/staging/gpib/tnt4882/tnt4882_gpib.c +6 -6
@@ -898,7 +898,7 @@ static void tnt4882_init(struct tnt4882_priv *tnt_priv, const struct gpib_boardtnt_writeb (tnt_priv, tnt_priv->imr0_bits,IMR0 ); } -static int ni_pci_attach (struct gpib_board *board,const gpib_board_config_t *config) +static int ni_pci_attach (struct gpib_board *board,const struct gpib_board_config *config) {struct tnt4882_priv *tnt_priv;struct nec7210_priv *nec_priv;
@@ -1019,7 +1019,7 @@ static int ni_isapnp_find(struct pnp_dev **dev)return 0 ; } -static int ni_isa_attach_common (struct gpib_board *board,const gpib_board_config_t *config, +static int ni_isa_attach_common (struct gpib_board *board,const struct gpib_board_config *config,enum nec7210_chipset chipset) {struct tnt4882_priv *tnt_priv;
@@ -1075,17 +1075,17 @@ static int ni_isa_attach_common(struct gpib_board *board, const gpib_board_confireturn 0 ; } -static int ni_tnt_isa_attach (struct gpib_board *board,const gpib_board_config_t *config) +static int ni_tnt_isa_attach (struct gpib_board *board,const struct gpib_board_config *config) {return ni_isa_attach_common (board, config,TNT4882 ); } -static int ni_nat4882_isa_attach (struct gpib_board *board,const gpib_board_config_t *config) +static int ni_nat4882_isa_attach (struct gpib_board *board,const struct gpib_board_config *config) {return ni_isa_attach_common (board, config,NAT4882 ); } -static int ni_nec_isa_attach (struct gpib_board *board,const gpib_board_config_t *config) +static int ni_nec_isa_attach (struct gpib_board *board,const struct gpib_board_config *config) {return ni_isa_attach_common (board, config,NEC7210 ); }
@@ -1702,7 +1702,7 @@ static void __exit exit_ni_gpib_cs(void)static const int pcmcia_gpib_iosize =32 ; -static int ni_pcmcia_attach (struct gpib_board *board,const gpib_board_config_t *config) +static int ni_pcmcia_attach (struct gpib_board *board,const struct gpib_board_config *config) {struct local_info_t *info;struct tnt4882_priv *tnt_priv;
Signature · 1 line
2.43.0
PATCH 18/18 staging: gpib: Removing typedef gpib_board_config
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 | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/staging/gpib/include/gpib_types.h +2 -3
@@ -23,7 +23,6 @@#include <linux/interrupt.h> struct gpib_board ; -typedef struct gpib_board_config gpib_board_config_t ;/* config parameters that are only used by driver attach functions */ struct gpib_board_config {
@@ -55,7 +54,7 @@ struct gpib_interface {/* name of board */ char *name;/* attach() initializes board and allocates resources */ -int (*attach)(struct gpib_board *board,const gpib_board_config_t *config); +int (*attach)(struct gpib_board *board,const struct gpib_board_config *config);/* detach() shuts down board and frees resources */ void (*detach)(struct gpib_board *board);/* read() should read at most 'length' bytes from the bus into
@@ -291,7 +290,7 @@ struct gpib_board {struct gpib_pseudo_irq pseudo_irq;/* error dong autopoll */ atomic_t stuck_srq; -gpib_board_config_t config; +struct gpib_board_config config;/* Flag that indicates whether board is system controller of the bus */ unsigned master : 1;/* individual status bit */
Signature · 1 line
2.43.0