Staging: comedi: fix tabulation and over 80 chars issues in amplc_pci224.c This is a patch to the amplc_pci224.c file that fixes up tabulation style errors and over 80 chars warning found by the checkpatch.pl tool Signed-off-by: Stephane Pajot <[email protected]>
PATCH 2/2 Staging: comedi: fix tabulation and over 80 chars issues in amplc_pci224.c This is a patch to the amplc_pci224.c file that fixes up tabulation style errors and over 80 chars warning found by the checkpatch.pl tool Signed-off-by: Stephane Pajot <[email protected]>
--- drivers/staging/comedi/drivers/amplc_pci224.c | 63 +++++++++++++------------ 1 files changed, 33 insertions(+), 30 deletions(-)
drivers/staging/comedi/drivers/amplc_pci224.c +33 -30
@@ -52,33 +52,33 @@ Supports: Configuration options - PCI224: [0] - PCI bus of device (optional). [1] - PCI slot of device (optional). - If bus/slot is not specified, the first available PCI device - will be used. + If bus/slot is not specified, the first available PCI device + will be used. [2] - Select available ranges according to jumper LK1. All channels - are set to the same range: - 0=Jumper position 1-2 (factory default), 4 software-selectable - internal voltage references, giving 4 bipolar and 4 unipolar - ranges: - [-10V,+10V], [-5V,+5V], [-2.5V,+2.5V], [-1.25V,+1.25V], - [0,+10V], [0,+5V], [0,+2.5V], [0,1.25V]. - 1=Jumper position 2-3, 1 external voltage reference, giving - 1 bipolar and 1 unipolar range: - [-Vext,+Vext], [0,+Vext]. + are set to the same range : + 0 = Jumper position 1-2 (factory default), 4 software-selectable + internal voltage references, giving 4 bipolar and 4 unipolar + ranges : + [-10V, + 10V][-5V, + 5V][-2.5V, + 2.5V][-1.25V, + 1.25V] + [0, + 10V][0, + 5V][0, + 2.5V][0, 1.25V]. + 1 = Jumper position 2-3, 1 external voltage reference, giving + 1 bipolar and 1 unipolar range : + [-Vext, + Vext][0, + Vext]. Configuration options - PCI234: [0] - PCI bus of device (optional). [1] - PCI slot of device (optional). - If bus/slot is not specified, the first available PCI device - will be used. + If bus/slot is not specified, the first available PCI device + will be used. [2] - Select internal or external voltage reference according to - jumper LK1. This affects all channels: - 0=Jumper position 1-2 (factory default), Vref=5V internal. - 1=Jumper position 2-3, Vref=Vext external. + jumper LK1. This affects all channels : + 0 = Jumper position 1-2 (factory default), Vref = 5V internal. + 1 = Jumper position 2-3, Vref = Vext external. [3] - Select channel 0 range according to jumper LK2: - 0=Jumper position 2-3 (factory default), range [-2*Vref,+2*Vref] - (10V bipolar when options[2]=0). - 1=Jumper position 1-2, range [-Vref,+Vref] - (5V bipolar when options[2]=0). + 0 = Jumper position 2-3 (factory default), range[-2*Vref, + 2*Vref] + (10V bipolar when options[2] = 0). + 1 = Jumper position 1-2, range[-Vref, + Vref] + (5V bipolar when options[2] = 0). [4] - Select channel 1 range according to jumper LK3: cf. options[3]. [5] - Select channel 2 range according to jumper LK4: cf. options[3]. [6] - Select channel 3 range according to jumper LK5: cf. options[3].
@@ -401,7 +401,8 @@ MODULE_DEVICE_TABLE(pci, pci224_pci_table);/* this structure is for data unique to this hardware driver. If several hardware drivers keep similar information in this structure, -feel free to suggest moving the variable to the struct comedi_device struct. */ +feel free to suggest moving the variable +to the struct comedi_device struct. */ struct pci224_private {struct pci_dev *pci_dev;/* PCI device */ const unsigned short *hwrange;
@@ -678,12 +679,14 @@ static void pci224_ao_handle_fifo(struct comedi_device *dev,switch (dacstat &PCI224_DACCON_FIFOFL_MASK ) {case PCI224_DACCON_FIFOFL_EMPTY : room =PCI224_FIFO_ROOM_EMPTY ; -if (!devpriv->ao_stop_continuous && devpriv->ao_stop_count ==0 ) { -/* FIFO empty at end of counted acquisition. */ -pci224_ao_stop (dev, s); - s->async->events |=COMEDI_CB_EOA ; -comedi_event (dev, s); -return ; +if (!devpriv->ao_stop_continuous ==0 ) { +if (devpriv->ao_stop_count ==0 ) { +/* FIFO empty at end of counted acquisition. */ +pci224_ao_stop (dev, s); + s->async->events |=COMEDI_CB_EOA ; +comedi_event (dev, s); +return ; + } }break ;case PCI224_DACCON_FIFOFL_ONETOHALF :
@@ -912,9 +915,9 @@ pci224_ao_cmdtest(struct comedi_device *dev, struct comedi_subdevice *s,if ((cmd->scan_begin_arg &CR_FLAGS_MASK & ~(CR_EDGE |CR_INVERT )) !=0 ) { cmd->scan_begin_arg =COMBINE (cmd->scan_begin_arg,0 , -CR_FLAGS_MASK & ~(CR_EDGE - | -CR_INVERT )); +CR_FLAGS_MASK & ~(CR_EDGE + | +CR_INVERT )); err++; }break ;
Signature · 1 line
1.7.1
Quoted 9 lines · Stephane Pajot
--- drivers/staging/comedi/drivers/amplc_pci224.c | 63 +++++++++++++------------ 1 files changed, 33 insertions(+), 30 deletions(-)drivers/staging/comedi/drivers/amplc_pci224.c +0
-0
drivers/staging/comedi/drivers/amplc_pci224.c Supports: · line 56
Quoted 7 lines
drivers/staging/comedi/drivers/amplc_pci224.c +2
-2@@ -52,33 +52,33 @@ Supports: Configuration options - PCI224: [0] - PCI bus of device (optional). [1] - PCI slot of device (optional). - If bus/slot is not specified, the first available PCI device - will be used. + If bus/slot is not specified, the first available PCI device + will be used.
Why did you change these comment lines?
drivers/staging/comedi/drivers/amplc_pci224.c MODULE_DEVICE_TABLE(pci, pci224_pci_table); · line 405
Quoted 7 lines
drivers/staging/comedi/drivers/amplc_pci224.c +2
-1@@ -401,7 +401,8 @@ MODULE_DEVICE_TABLE(pci, pci224_pci_table);/* this structure is for data unique to this hardware driver. If several hardware drivers keep similar information in this structure, -feel free to suggest moving the variable to the struct comedi_device struct. */ +feel free to suggest moving the variable +to the struct comedi_device struct. */
If you are going to change a multi-line comment like this, please use the proper formatting for it. Your change didn't really help anything here.
Quoted 5 lines
drivers/staging/comedi/drivers/amplc_pci224.c +0
-0struct pci224_private {struct pci_dev *pci_dev;/* PCI device */ const unsigned short *hwrange;@@ -678,12 +679,14 @@ static void pci224_ao_handle_fifo(struct comedi_device *dev,switch (dacstat &PCI224_DACCON_FIFOFL_MASK ) {
drivers/staging/comedi/drivers/amplc_pci224.c static void pci224_ao_handle_fifo(struct comedi_device *dev, · line 683
Quoted 10 lines
drivers/staging/comedi/drivers/amplc_pci224.c +2
-6case PCI224_DACCON_FIFOFL_EMPTY : room =PCI224_FIFO_ROOM_EMPTY ; -if (!devpriv->ao_stop_continuous && devpriv->ao_stop_count ==0 ) { -/* FIFO empty at end of counted acquisition. */ -pci224_ao_stop (dev, s); - s->async->events |=COMEDI_CB_EOA ; -comedi_event (dev, s); -return ; +if (!devpriv->ao_stop_continuous ==0 ) { +if (devpriv->ao_stop_count ==0 ) {
You just changed the logic of this if statment, not good at all.
thanks,
greg k-h