[PATCH] staging: comedi: das1800: prefer kmalloc_array over kmalloc with multiply

2015-01-19 Thread Chase Southwood
Checkpatch doesn't like kmalloc with multiply very much: drivers/staging/comedi/drivers/das1800.c:1377: WARNING: Prefer kmalloc_array over kmalloc with multiply So this patch swaps that use out for kmalloc_array instead. Signed-off-by: Chase Southwood --- drivers/staging/comedi/dr

[PATCH 1/3] Staging: comedi: addi-data: comment cleanup in hwdrv_apci035.c

2014-02-21 Thread Chase Southwood
This patch further cleans up the comments in hwdrv_apci035.c, converting them to kernel style and removing some commented conditional statements that are unused. Signed-off-by: Chase Southwood --- I decided to return to the first driver I touched. I found some more things that could be cleaned

[PATCH 2/3] Staging: comedi: addi-data: cleanup conditional blocks in hwdrv_apci035.c

2014-02-21 Thread Chase Southwood
There were some conditional blocks that had an unneccesary level of indentation in them. We can remove this to improve code clarity. Signed-off-by: Chase Southwood --- .../comedi/drivers/addi-data/hwdrv_apci035.c | 31 ++ 1 file changed, 14 insertions(+), 17 deletions

[PATCH 3/3] Staging: comedi: addi-data: fix a couple of lines that are too long

2014-02-21 Thread Chase Southwood
There are a couple of cases where a comment being on the same line as a statement is causing the line to be over 80 characters long. This is an easy fix; move these comments to the previous line. Signed-off-by: Chase Southwood --- drivers/staging/comedi/drivers/addi-data/hwdrv_apci035.c | 11

Re: [PATCH 2/3] Staging: comedi: addi-data: cleanup conditional blocks in hwdrv_apci035.c

2014-02-24 Thread Chase Southwood
>On Monday, February 24, 2014 8:13 AM, Ian Abbott wrote: >>On 2014-02-22 03:21, Chase Southwood wrote: >> There were some conditional blocks that had an unneccesary level of >> indentation in them.  We can remove this to improve code clarity. >> >&g

[PATCH 2/3 v2] Staging: comedi: addi-data: cleanup conditional blocks in hwdrv_apci035.c

2014-02-24 Thread Chase Southwood
There were some conditional blocks that had an unnecessary level of indentation in them. We can remove this to improve code clarity. Signed-off-by: Chase Southwood --- 2: Moved "else if" up to the same line as closing brace of "if". Left braces on single line "e

[PATCH 3/3 v2] Staging: comedi: addi-data: fix a couple of lines that are too long

2014-02-24 Thread Chase Southwood
There are a couple of cases where a comment being on the same line as a statement is causing the line to be over 80 characters long. This is an easy fix, move these comments to the previous line. Signed-off-by: Chase Southwood --- 2: Some changes to PATCH 2/3 v2 occurred in the immediate

[PATCH] Staging: comedi: addi-data: clean-up variable use in hwdrv_apci035.c

2014-02-25 Thread Chase Southwood
The static variable ui_Command is as of right now being cleared to a value of zero between everytime that it writes to a port and then takes a new value from a port. Seems like this zeroing is unnecessary, so we can just remove these lines. Signed-off-by: Chase Southwood --- This sort of thing

Re: [PATCH] Staging: comedi: addi-data: clean-up variable use in hwdrv_apci035.c

2014-02-25 Thread Chase Southwood
>On Tuesday, February 25, 2014 3:56 AM, Ian Abbott wrote: >>On 2014-02-25 08:15, Chase Southwood wrote: >> The static variable ui_Command is as of right now being cleared to a >> value of zero between everytime that it writes to a port and then takes a >> new value fr

Re: [PATCH v3 1/2] Staging: comedi: convert while loops to timeouts in s626.c

2014-03-14 Thread Chase Southwood
>On Tuesday, March 11, 2014 9:26 AM, Ian Abbott wrote: >>On 2014-03-09 04:00, Chase Southwood wrote: >> This patch changes a handful of while loops to timeouts to prevent >> infinite looping on hardware failure. A couple such loops are in a >> function (s626_debi_trans

Re: [PATCH] staging: comedi: fix memory leak

2014-03-14 Thread Chase Southwood
>On Friday, March 14, 2014 11:47 AM, Levente Kurusa wrote: >Call kfree() on bdev. The variable is otherwise leaked. > >Signed-off-by: Levente Kurusa >--- >drivers/staging/comedi/drivers/comedi_bond.c | 1 + >1 file changed, 1 insertion(+) > >diff --git a/drivers/staging/comedi/drivers/comedi_bond

Re: [PATCH v3 1/2] Staging: comedi: convert while loops to timeouts in s626.c

2014-03-15 Thread Chase Southwood
>On Saturday, March 15, 2014 12:26 AM, "gre...@linuxfoundation.org" > wrote: >>On Fri, Mar 14, 2014 at 06:43:37PM -0700, Chase Southwood wrote: >>>On Tuesday, March 11, 2014 9:26 AM, Ian Abbott wrote: >>>>On 2014-03-09 04:00, Chase Southwood wrote:

Re: [PATCH] staging: comedi: fix memory leak

2014-03-15 Thread Chase Southwood
>On Saturday, March 15, 2014 1:55 AM, Levente Kurusa wrote: >>On 03/15/2014 04:30 AM, Chase Southwood wrote: >>> On Friday, March 14, 2014 11:47 AM, Levente Kurusa wrote: >>>  >>>Call kfree() on bdev. The variable is otherwise leaked.

Re: [PATCH] Staging: comedi: add timeouts to while loops in s626.c

2014-03-03 Thread Chase Southwood
>On Monday, March 3, 2014 8:13 AM, Ian Abbott wrote: >>On 2014-03-02 04:13, Chase Southwood wrote: >>>On Friday, February 28, 2014 11:49 PM, Chase Southwood >>> wrote: >>>> On Friday, February 28, 2014 11:26 AM, Ian Abbott >>>> wrot

[PATCH v2 1/2] Staging: comedi: convert while loops to timeouts in s626.c

2014-03-04 Thread Chase Southwood
from, as this information is enough to recreate the entire readl() call, and is passed in the 'context' parameter. A couple of additional macros have been defined where this method is not completely sufficient. The proper comedi_timeout() calls are then used. Signed-off-by: Chase

[PATCH v2 2/2] Staging: comedi: propagate timeout errors in s626.c

2014-03-04 Thread Chase Southwood
This patch for s626.c propagates the errors from the newly introduced calls to comedi_timeout() as far as possible. Signed-off-by: Chase Southwood --- Compile tested only. drivers/staging/comedi/drivers/s626.c | 63 +-- 1 file changed, 45 insertions(+), 18

Re: [PATCH v2 1/2] Staging: comedi: introduce {outl,inl}_amcc() and {outl,inl}_iobase() helper functions in hwdrv_apci1564.c

2014-03-04 Thread Chase Southwood
>On Tuesday, March 4, 2014 6:38 PM, Greg KH wrote: >>On Mon, Mar 03, 2014 at 12:27:55PM +0300, Dan Carpenter wrote: >>> On Sun, Mar 02, 2014 at 08:52:19PM -0600, Chase Southwood wrote: >>> This patch introduces a few simple outl and inl helper functions to allow >

[PATCH 1/5] Staging: comedi: addi-data: tidy up digital input register map defines in hwdrv_apci1564.c

2014-03-05 Thread Chase Southwood
in excess of 80 characters. Further, some of the old defines were being used incorrectly in the i_APCI1564_Reset() function. Upon swapping the old defines out for the new ones in this function, their use has been corrected. Signed-off-by: Chase Southwood --- Greg, as promised, this is the most

[PATCH 2/5] Staging: comedi: addi-data: tidy up digital output register map defines in hwdrv_apci1564.c

2014-03-05 Thread Chase Southwood
in excess of 80 characters. Further, some of the old defines were being used incorrectly in the i_APCI1564_Reset() function. Upon swapping the old defines out for the new ones in this function, their use has been corrected. Signed-off-by: Chase Southwood --- .../comedi/drivers/addi-data

[PATCH 4/5] Staging: comedi: addi-data: tidy up timer register map defines in hwdrv_apci1564.c

2014-03-05 Thread Chase Southwood
of 80 characters. Signed-off-by: Chase Southwood --- .../comedi/drivers/addi-data/hwdrv_apci1564.c | 82 +- 1 file changed, 33 insertions(+), 49 deletions(-) diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c b/drivers/staging/comedi/drivers/addi

[PATCH 5/5] Staging: comedi: addi-data: tidy up counter register map defines in hwdrv_apci1564.c

2014-03-05 Thread Chase Southwood
This patch for hwdrv_apci1564.c fixes the register map defines for the digital input registers such that they are all the real offsets to each register, rather than a mix of real offsets and adders to those offsets. Signed-off-by: Chase Southwood --- .../comedi/drivers/addi-data/hwdrv_apci1564

[PATCH 3/5] Staging: comedi: addi-data: tidy up watchdog register map defines in hwdrv_apci1564.c

2014-03-05 Thread Chase Southwood
excess of 80 characters. Signed-off-by: Chase Southwood --- .../comedi/drivers/addi-data/hwdrv_apci1564.c | 48 -- 1 file changed, 18 insertions(+), 30 deletions(-) diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c b/drivers/staging/comedi/drivers/addi

Re: [PATCH v2 1/2] Staging: comedi: convert while loops to timeouts in s626.c

2014-03-06 Thread Chase Southwood
>On Wednesday, March 5, 2014 6:10 AM, Ian Abbott wrote: >>On 2014-03-04 08:43, Chase Southwood wrote: >>This patch changes a handful of while loops to timeouts to prevent >>infinite looping on hardware failure.  A couple such loops are in a >>function (s626_debi_trans

[PATCH] Staging: comedi: addi-data: remove unnecessary variable initializations in hwdrv_apci035.c

2014-02-27 Thread Chase Southwood
Nearly every variable in hwdrv_apci035.c is initialized to 0 when it is declared, and then set to some other value before ever being used. As such, we can remove all of these initializations. They are accomplishing nothing. Signed-off-by: Chase Southwood --- .../comedi/drivers/addi-data

[PATCH 1/2] Staging: comedi: addi-data: fix lines that are over 80 characters

2014-02-27 Thread Chase Southwood
hwdrv_apci1564.c had numerous lines over the column limit. This patch splits all such lines to bring them in compliance with coding style. Signed-off-by: Chase Southwood --- .../comedi/drivers/addi-data/hwdrv_apci1564.c | 50 -- 1 file changed, 36 insertions(+), 14

[PATCH 2/2] Staging: comedi: addi-data: remove unnecessary variable initializations in hwdrv_apci1564.c

2014-02-27 Thread Chase Southwood
A handful of variables here were being initialized to 0 upon declaration, however they are always then set to another value before their first use, so initialization here is useless and we can remove it. Signed-off-by: Chase Southwood --- drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564

[PATCH] Staging: comedi: add timeouts to while loops in s626.c

2014-02-27 Thread Chase Southwood
Smatch located a handful of while loops testing readl calls in s626.c. Since these while loops depend on readl succeeding, it's safer to make sure they time out eventually. Signed-off-by: Chase Southwood --- Ian and/or Hartley, I'd love your comments on this. It seems to me that we

Re: [PATCH 1/2] Staging: comedi: addi-data: fix lines that are over 80 characters

2014-02-28 Thread Chase Southwood
>On Friday, February 28, 2014 1:57 AM, Dan Carpenter >wrote: >>On Fri, Feb 28, 2014 at 10:52:32AM +0300, Dan Carpenter wrote: >>> On Fri, Feb 28, 2014 at 01:31:20AM -0600, Chase Southwood wrote: >> > hwdrv_apci1564.c had numerous lines over the column limit.  T

[PATCH 1/2 v2] Staging: comedi: fix lines that are over 80 characters

2014-02-28 Thread Chase Southwood
This patch introduces a simple helper function, outl_1564_timer(), to allow several lines which violate the character limit to be shortened. A handful of other lines that are too long are appropriately split as well. Cc: Dan Carpenter Signed-off-by: Chase Southwood --- 2: introduced

[PATCH 2/2 v2] Staging: comedi: addi-data: remove unnecessary variable initializations in hwdrv_apci1564.c

2014-02-28 Thread Chase Southwood
A handful of variables here were being initialized to 0 upon declaration, however they are always then set to another value before their first use, so initialization here is useless and we can remove it. Signed-off-by: Chase Southwood --- 2: no content change; redone and resent after PATCH 1/2

Re: [PATCH 1/2 v2] Staging: comedi: fix lines that are over 80 characters

2014-02-28 Thread Chase Southwood
>On Friday, February 28, 2014 3:42 AM, Dan Carpenter >wrote: >>On Fri, Feb 28, 2014 at 03:15:45AM -0600, Chase Southwood wrote: >> This patch introduces a simple helper function, outl_1564_timer(), to >> allow several lines which violate the character limit to be sh

Re: [PATCH 1/2 v2] Staging: comedi: fix lines that are over 80 characters

2014-02-28 Thread Chase Southwood
>On Friday, February 28, 2014 4:31 PM, Greg KH >wrote: >>On Fri, Feb 28, 2014 at 03:15:45AM -0600, Chase Southwood wrote: >> >> This patch introduces a simple helper function, outl_1564_timer(), to >> allow several lines which violate the character limit to be sh

Re: [PATCH] Staging: comedi: add timeouts to while loops in s626.c

2014-02-28 Thread Chase Southwood
>On Friday, February 28, 2014 11:26 AM, Ian Abbott wrote: >>On 2014-02-28 07:35, Chase Southwood wrote: >> Smatch located a handful of while loops testing readl calls in s626.c. >> Since these while loops depend on readl succeeding, it's safer to make >&g

[PATCH 2/2] Staging: comedi: use outl_1564_* and inl_1564_* helper functions in hwdrv_apci1564.c

2014-03-01 Thread Chase Southwood
We can use these inl and outl helper functions to improve code readability and shorten several lines to under the character limit. Cc: Dan Carpenter Signed-off-by: Chase Southwood --- I checked over this all several times so I hope it is correct. I welcome feedback on anything here Thanks

[PATCH 1/2] Staging: comedi: introduce outl_1564_* and inl_1564_* helper functions in hwdrv_apci1564.c

2014-03-01 Thread Chase Southwood
This patch introduces a handful of outl and inl helper functions with the ultimate goal of improving code readability and allowing several lines which violate the character limit to be shortened in a sane way. Cc: Dan Carpenter Signed-off-by: Chase Southwood --- This patchset serves as a

Re: [PATCH 1/2] Staging: comedi: introduce outl_1564_* and inl_1564_* helper functions in hwdrv_apci1564.c

2014-03-01 Thread Chase Southwood
Hi Dan, >On Saturday, March 1, 2014 6:46 AM, Dan Carpenter >wrote: >>On Sat, Mar 01, 2014 at 04:28:27AM -0600, Chase Southwood wrote: >> This patch introduces a handful of outl and inl helper functions with the >> ultimate goal of improving code readability and allowin

Re: [PATCH 1/2] Staging: comedi: introduce outl_1564_* and inl_1564_* helper functions in hwdrv_apci1564.c

2014-03-01 Thread Chase Southwood
>On Saturday, March 1, 2014 6:18 PM, Chase Southwood > wrote: >Hi Dan, > [snip] > >I like this idea.  Just to clarify though, basically all of the macros would >change to something like  > >#define APCI1564_DIGITAL_IP 0x4 #define APCI1564_DIGITAL_IP_INTERRUPT_M

Re: [PATCH] Staging: comedi: add timeouts to while loops in s626.c

2014-03-01 Thread Chase Southwood
>On Friday, February 28, 2014 11:49 PM, Chase Southwood > wrote: >>On Friday, February 28, 2014 11:26 AM, Ian Abbott wrote: >>>On 2014-02-28 07:35, Chase Southwood wrote: [snip] >>In the case of s626_send_dac(), it doesn't seem to be used in any >>crit

[PATCH v2 2/2] Staging: comedi: use inl() and outl() helper functions

2014-03-02 Thread Chase Southwood
Use the newly created helper functions to improve code readability and shorten several lines to under the character limit. Cc: Dan Carpenter Signed-off-by: Chase Southwood --- I've reviewed this as best as I can, but I know it's a bear to review. If there is some logical way that you

[PATCH v2 1/2] Staging: comedi: introduce {outl,inl}_amcc() and {outl,inl}_iobase() helper functions in hwdrv_apci1564.c

2014-03-02 Thread Chase Southwood
plus the offset. This is to simplify the use of these macros in the new helper functions. Cc: Dan Carpenter Signed-off-by: Chase Southwood --- All right, here's another shot at this. Dan, I took your outl_amcc idea and did a version for the outl/inl calls based from devpriv->iobase as

[PATCH] Staging: comedi: Correct a few printf format codes

2014-02-12 Thread Chase Southwood
with %i, change these to %u, and one was an int formatted with %u, we want to format this with %d. Signed-off-by: Chase Southwood --- drivers/staging/comedi/comedi_fops.c | 8 drivers/staging/comedi/drivers/comedi_bond.c | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions

[PATCH] Staging: comedi: clean up conditional statement in addi_apci_3xxx.c

2014-02-12 Thread Chase Southwood
data[0] != INSN_CONFIG_DIO_QUERY), return an error, but in every other case, initialize mask and then proceed. Found by a static checker. Signed-off-by: Chase Southwood --- drivers/staging/comedi/drivers/addi_apci_3xxx.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff -

Re: [PATCH 1/4] Staging: comedi: addi-data: fix brace-related coding style issues in hwdrv_apci035.c

2014-02-18 Thread Chase Southwood
>On Tuesday, February 18, 2014 5:00 AM, Dan Carpenter > wrote: >>On Mon, Feb 17, 2014 at 12:45:07PM -0800, Chase Southwood wrote: >>>On Monday, February 17, 2014 7:16 AM, Ian Abbott wrote: >>>> >>>>On 2014-02-16 08:40, Chase Southwood wrote: &

[PATCH 2/4] Staging: comedi: addi-data: cleanup brace usage in hwdrv_apci1564.c

2014-02-18 Thread Chase Southwood
hwdrv_apci1564.c had many single statments wrapped in braces, so we can delete these. Also, some else statements were improperly placed, fix these too. Signed-off-by: Chase Southwood --- .../comedi/drivers/addi-data/hwdrv_apci1564.c | 58 -- 1 file changed, 22

[PATCH 1/4] Staging: comedi: addi-data: cleanup comments in hwdrv_apci1564.c

2014-02-18 Thread Chase Southwood
comments. Signed-off-by: Chase Southwood --- Moving onto a new addi-data driver. Generally mostly the same issues though. .../comedi/drivers/addi-data/hwdrv_apci1564.c | 93 +- 1 file changed, 38 insertions(+), 55 deletions(-) diff --git a/drivers/staging/comedi/drivers/addi

[PATCH 3/4] Staging: comedi: addi-data: replace printk() with dev_err() in hwdrv_apci1564.c

2014-02-18 Thread Chase Southwood
There were a small handful of printk() calls in hwdrv_apci1564.c. It is generally better to use dev_err() for error messages instead, so I switched all the printk() calls out, as well as cleaned up the error strings. Signed-off-by: Chase Southwood --- drivers/staging/comedi/drivers/addi-data

[PATCH 4/4] Staging: comedi: addi-data: don't initialize a static variable to 0

2014-02-18 Thread Chase Southwood
In hwdrv_apci1564.c, one static variable is zero initialized. This is unneeded and redundant, so we remove the initialization. Signed-off-by: Chase Southwood --- drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a

Re: [PATCH v2] staging: comedi: s626: use comedi_timeout() on remaining loops

2014-04-03 Thread Chase Southwood
>On Thursday, April 3, 2014 3:38 AM, Dan Carpenter >wrote: >>On Tue, Mar 25, 2014 at 10:43:58PM -0500, Chase Southwood wrote: >>There were just a handful of more while loops in this file that needed >>timeouts, and this patch takes care of them.  One new callback is >

[PATCH v3] staging: comedi: s626: use comedi_timeout() on remaining loops

2014-04-03 Thread Chase Southwood
negative error code from comedi_timeout() can be propagated if necessary. Signed-off-by: Chase Southwood --- 2: s626_i2c_handshake_eoc() can be used in s626_initialize() as noted by Ian. So, s626_initialize_eoc() has been removed, and its uses swapped for s626_i2c_handshake_eoc(). 3: *Type of

[PATCH] Staging: comedi: fix spacing coding style issue in 8255.c.

2014-01-09 Thread Chase Southwood
This patch for 8255.c fixes a spacing warning found by checkpatch.pl. Signed-off-by: Chase Southwood --- drivers/staging/comedi/drivers/8255.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/comedi/drivers/8255.c b/drivers/staging/comedi/drivers/8255.c

[PATCH 3/3] Staging: comedi: fix extra whitespace style issues in ni_mio_common.c.

2014-01-10 Thread Chase Southwood
This patch for ni_mio_common.c removes extra whitespace causing checkpatch.pl warnings. Signed-off-by: Chase Southwood --- drivers/staging/comedi/drivers/ni_mio_common.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/comedi/drivers/ni_mio_common.c b

[PATCH 2/3] Staging: comedi: fix indentation coding style issue in ni_mio_common.c.

2014-01-10 Thread Chase Southwood
This patch for ni_mio_common.c fixes several indentation warnings from checkpatch.pl. Signed-off-by: Chase Southwood --- drivers/staging/comedi/drivers/ni_mio_common.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/comedi/drivers/ni_mio_common.c b

[PATCH 1/3] Staging: comedi: fix numerous brace coding style issues in ni_mio_common.c.

2014-01-10 Thread Chase Southwood
This patch for ni_mio_common.c removes many unneccesary braces to fix checkpatch.pl warnings. Signed-off-by: Chase Southwood --- drivers/staging/comedi/drivers/ni_mio_common.c | 124 + 1 file changed, 43 insertions(+), 81 deletions(-) diff --git a/drivers/staging/comedi

[PATCH 0/3] Staging: comedi: Checkpatch cleanups in ni_mio_common.c

2014-01-10 Thread Chase Southwood
This patch series fixes several warnings reported by checkpatch.pl in ni_mio_common.c of the comedi driver. Among the issues fixed: *Many unnecessary braces have been removed. *Improper indentation has been corrected. *Extra whitespace before semicolons has been removed. *Extra whitespace after f

Re: [PATCH 0/3] Staging: comedi: Checkpatch cleanups in ni_mio_common.c

2014-01-10 Thread Chase Southwood
Oops, left out some of my cover letter. Here is the amended patchset cover letter. On Fri, Jan 10, 2014 at 10:07 PM, Chase Southwood wrote: > > This patch series fixes several warnings reported by checkpatch.pl in > ni_mio_common.c of the comedi driver. > > Among the issues

[PATCH] Staging: comedi: move trailing statement to next line in ni_mio_common.c

2014-01-13 Thread Chase Southwood
This patch for ni_mio_common.c silences a checkpatch error due to a trailing statement. Signed-off-by: Chase Southwood --- drivers/staging/comedi/drivers/ni_mio_common.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/comedi/drivers/ni_mio_common.c b

[PATCH] Staging: comedi: remove unnecessary braces in pcl711.c

2014-01-13 Thread Chase Southwood
This patch for pcl711.c removes braces causing a checkpatch.pl warning. It also removes an empty else arm of an if-else statement. Signed-off-by: Chase Southwood --- I removed the "else" arm of this statement because it was empty, save for the "ignore" comment. If it

[PATCH v2] Staging: comedi: convert while loop to timeout in ni_mio_common.c.

2014-01-14 Thread Chase Southwood
This patch to ni_mio_common.c changes a while loop to a timeout for loop, which is preferred. Signed-off-by: Chase Southwood --- I know Mr. Abbott mentioned that he wouldn't expect clean-up patches to have to deal with this sort of thing, but I thought I'd at least give the timeou

[PATCH v3] Staging: comedi: convert while loop to timeout in ni_mio_common.c

2014-01-14 Thread Chase Southwood
This patch to ni_mio_common.c changes a simple while loop to a timeout, which is preferred. Signed-off-by: Chase Southwood --- I removed the extra counter variable this time. Greg, you mentioned that I could just look at the time that has expired to far, and exit and error out if that

[PATCH v4] Staging: comedi: convert while loop to timeout in ni_mio_common.c

2014-01-14 Thread Chase Southwood
This patch for ni_mio_common.c changes out a while loop for a timeout, which is preferred. Signed-off-by: Chase Southwood --- OK, here's another go at it. Hopefully everything looks more correct this time. Greg, I've followed the pattern you gave me, and I really appreciate all o

[PATCH v5] Staging: comedi: convert while loop to timeout in ni_mio_common.c

2014-01-14 Thread Chase Southwood
This patch for ni_mio_common.c changes out a while loop for a timeout, which is preferred. Signed-off-by: Chase Southwood --- All right, I think this guy's ready to go now! Thanks for all the help! Chase 2: Changed from simple clean-up to swapping a timeout in for a while loop. 3: Re

[PATCH v6] Staging: comedi: convert while loop to timeout in ni_mio_common.c

2014-01-15 Thread Chase Southwood
This patch for ni_mio_common.c changes out a while loop for a timeout, which is preferred. Signed-off-by: Chase Southwood --- 2: Changed from simple clean-up to swapping a timeout in for a while loop. 3: Removed extra counter variable, and added error checking. 4: No longer using counter

[PATCH v7] Staging: comedi: convert while loop to timeout in ni_mio_common.c

2014-01-15 Thread Chase Southwood
This patch for ni_mio_common.c changes out a while loop for a timeout, which is preferred. Signed-off-by: Chase Southwood --- Hartley, I sincerely apologize for the obvious mistake, I thought I had built it but clearly I made a mistake somewhere, as your observation is exactly correct. It is

[PATCH 1/2] staging: comedi: addi_apci_1564: add subdevice to check diagnostic status

2014-07-31 Thread Chase Southwood
input subdevice with an insn_bits handler to access this information. Signed-off-by: Chase Southwood Cc: Ian Abbott Cc: H Hartley Sweeten --- drivers/staging/comedi/drivers/addi_apci_1564.c | 23 ++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/drivers/staging/c

[PATCH 0/2] staging: comedi: addi_apci_1564: provide interface to read diagnostic status

2014-07-31 Thread Chase Southwood
This patchset creates a simple subdevice to allow for reading of the board's diagnostic status, and then removes any code which is related to diagnostic interrupts, as the driver will not support these at this time. Chase Southwood (2): staging: comedi: addi_apci_1564: add subdevice to

[PATCH 2/2] staging: comedi: addi_apci_1564: remove diagnostic interrupt support code

2014-07-31 Thread Chase Southwood
the comedi API. So it is safe to simply remove this function. Signed-off-by: Chase Southwood Cc: Ian Abbott Cc: H Hartley Sweeten --- .../staging/comedi/drivers/addi-data/hwdrv_apci1564.c | 14 -- drivers/staging/comedi/drivers/addi_apci_1564.c| 18 -- 2 fi

Re: [PATCH v7] Staging: comedi: convert while loop to timeout in ni_mio_common.c

2014-01-16 Thread Chase Southwood
>On Thursday, January 16, 2014 5:31 AM, Ian Abbott wrote: >On 2014-01-15 19:22, Chase Southwood wrote: >> This patch for ni_mio_common.c changes out a while loop for a timeout, >> which is preferred. >> >> Signed-off-by: Chase Southwood >> --- >> &g

[PATCH v8] Staging: comedi: convert while loop to timeout in ni_mio_common.c

2014-01-16 Thread Chase Southwood
This patch for ni_mio_common.c changes out a while loop for a timeout, which is preferred. Signed-off-by: Chase Southwood --- Okay, back to v2, basically. I fixed the checkpatch warning from v2, and added the error checking that was from v3, but otherwise it is the same. Of note, I have used

Re: [PATCH 5/5] Staging: comedi: addi-data: tidy up counter register map defines in hwdrv_apci1564.c

2014-03-07 Thread Chase Southwood
>On Thursday, March 6, 2014 11:59 AM, Hartley Sweeten > wrote: >>On Thursday, March 06, 2014 12:26 AM, Chase Southwood wrote: >> >>This patch for hwdrv_apci1564.c fixes the register map defines for the >>digital input registers such that they are all the real offs

[PATCH v2 3/5] Staging: comedi: addi-data: tidy up watchdog register

2014-03-07 Thread Chase Southwood
This patch for fixes the register map defines for the watchdog registers such that they are all the real offsets to each register, rather than a mix of real offsets and adders to those offsets. Signed-off-by: Chase Southwood --- 2: Simplified commit message, fixed indentation and whitespace

[PATCH v2 1/5] Staging: comedi: addi-data: tidy up digital input register map defines in hwdrv_apci1564.c

2014-03-07 Thread Chase Southwood
swapping the old defines out for the new ones in this function, their use has been corrected. Signed-off-by: Chase Southwood --- 2: Simplified commit message, fixed indentation. .../comedi/drivers/addi-data/hwdrv_apci1564.c | 78 +- 1 file changed, 31 insertions(+), 47

[PATCH v2 2/5] Staging: comedi: addi-data: tidy up digital output register map defines in hwdrv_apci1564.c

2014-03-07 Thread Chase Southwood
. Upon swapping the old defines out for the new ones in this function, their use has been corrected. Signed-off-by: Chase Southwood --- 2: Simplified commit message, fixed indentation and whitespace damage. I have test applied this patch, it should work now. .../comedi/drivers/addi-data

[PATCH v2 4/5] Staging: comedi: addi-data: tidy up timer register map defines in hwdrv_apci1564.c

2014-03-07 Thread Chase Southwood
This patch for fixes the register map defines for the timer registers such that they are all the real offsets to each register, rather than a mix of real offsets and adders to those offsets. Signed-off-by: Chase Southwood --- 2: Simplified commit message, fixed indentation and whitespace damage

[PATCH v2 5/5] Staging: comedi: addi-data: tidy up counter register map defines in hwdrv_apci1564.c

2014-03-07 Thread Chase Southwood
This patch fixes the register map defines for the counter registers such that they are all the real offsets to each register, rather than a mix of real offsets and adders to those offsets. Signed-off-by: Chase Southwood --- 2: Simplified commit message, fixed indentation and whitespace damage

Re: [PATCH v2 5/5] Staging: comedi: addi-data: tidy up counter register map defines in hwdrv_apci1564.c

2014-03-07 Thread Chase Southwood
>On Friday, March 7, 2014 11:38 AM, Hartley Sweeten > wrote: >>On Friday, March 07, 2014 1:38 AM, Chase Southwood wrote: >>This patch fixes the register map defines for the counter registers such >>that they are all the real offsets to each register, rather than a m

[PATCH v3 1/5] Staging: comedi: addi-data: tidy up digital input register map defines in hwdrv_apci1564.c

2014-03-07 Thread Chase Southwood
swapping the old defines out for the new ones in this function, their use has been corrected. Signed-off-by: Chase Southwood --- 2: Simplified commit message, fixed indentation. 3: Fixed indentation (again) .../comedi/drivers/addi-data/hwdrv_apci1564.c | 78 +- 1 file

[PATCH v3 3/5] Staging: comedi: addi-data: tidy up watchdog register

2014-03-07 Thread Chase Southwood
This patch for fixes the register map defines for the watchdog registers such that they are all the real offsets to each register, rather than a mix of real offsets and adders to those offsets. Signed-off-by: Chase Southwood --- 2: Simplified commit message, fixed indentation and whitespace

[PATCH v3 4/5] Staging: comedi: addi-data: tidy up timer register map defines in hwdrv_apci1564.c

2014-03-07 Thread Chase Southwood
This patch for fixes the register map defines for the timer registers such that they are all the real offsets to each register, rather than a mix of real offsets and adders to those offsets. Signed-off-by: Chase Southwood --- 2: Simplified commit message, fixed indentation and whitespace damage

[PATCH v3 5/5] Staging: comedi: addi-data: tidy up counter register map defines in hwdrv_apci1564.c

2014-03-07 Thread Chase Southwood
This patch fixes the register map defines for the counter registers such that they are all the real offsets to each register, rather than a mix of real offsets and adders to those offsets. Signed-off-by: Chase Southwood --- 2: Simplified commit message, fixed indentation and whitespace damage

[PATCH v3 2/5] Staging: comedi: addi-data: tidy up digital output register map defines in hwdrv_apci1564.c

2014-03-07 Thread Chase Southwood
. Upon swapping the old defines out for the new ones in this function, their use has been corrected. Signed-off-by: Chase Southwood --- 2: Simplified commit message, fixed indentation and whitespace damage. I have test applied this patch, it should work now. 3: Fixed indentation (again) .../comedi

[PATCH v3 2/2] Staging: comedi: propagate timeout errors in s626.c

2014-03-07 Thread Chase Southwood
This patch for s626.c propagates the errors from the newly introduced calls to comedi_timeout() as far as possible. Signed-off-by: Chase Southwood --- Compile tested. 2: This patch was introduced in v2 of this set. 3: Rebased on top of PATCH 1/2 edits. drivers/staging/comedi/drivers/s626.c

[PATCH v3 1/2] Staging: comedi: convert while loops to timeouts in

2014-03-07 Thread Chase Southwood
different conditions tested in while loops in s626_send_dac(). The proper comedi_timeout() calls are then used. Signed-off-by: Chase Southwood --- Ian, here is a version of this patchset employing the enum you recommended. The second patch has been rebased on top of this one. 2: Used comedi_timeout

Re: [PATCH v3 1/2] Staging: comedi: convert while loops to timeouts in

2014-03-08 Thread Chase Southwood
Hi Greg, >On Saturday, March 8, 2014 9:00 PM, Greg KH wrote: >>On Fri, Mar 07, 2014 at 07:43:04PM -0600, Chase Southwood wrote: >>This patch changes a handful of while loops to timeouts to prevent >>infinite looping on hardware failure. A couple such loop

[PATCH v3 1/2] Staging: comedi: convert while loops to timeouts in s626.c

2014-03-08 Thread Chase Southwood
different conditions tested in while loops in s626_send_dac(). The proper comedi_timeout() calls are then used. Signed-off-by: Chase Southwood --- Ian, here is a version of this patchset employing the enum you recommended. The second patch has been rebased on top of this one. 2: Used comedi_timeout

[PATCH] Staging: comedi: addi-data: style cleanups in hwdrv_apci1564.c

2014-03-08 Thread Chase Southwood
: Chase Southwood --- Despite apply testing all of the patches in my series which cleaned up all of these defines, and triple checking my tab space settings to ensure they were correct, somehow after the set was merged, the indentation STILL ended up messy. This patch takes care of that as well as a

[PATCH 1/2] staging: comedi: addi_apci_1564: board does not have analog inputs

2014-04-25 Thread Chase Southwood
This board does not have analog inputs. Remove the subdevice init for them. Signed-off-by: Chase Southwood Cc: Ian Abbott Cc: H Hartley Sweeten --- Compile tested only. To be applied on top of [PATCH] staging: comedi: addi_apci_1564: separate from addi_common.c drivers/staging/comedi

[PATCH 2/2] staging: comedi: addi_apci_1564: board does not have analog outputs

2014-04-25 Thread Chase Southwood
The board supported by this driver does not have analog outputs. Remove the subdevice init for it. Signed-off-by: Chase Southwood Cc: Ian Abbott Cc: H Hartley Sweeten --- Compile tested only. drivers/staging/comedi/drivers/addi_apci_1564.c | 13 ++--- 1 file changed, 2 insertions

[PATCH 1/6] staging: comedi: addi_apci_1564: remove eeprom support code

2014-04-26 Thread Chase Southwood
Reading the eeprom on this board is not necessary. All information required is in the boardinfo. Remove the eeprom support code which is not really useful here. Signed-off-by: Chase Southwood Cc: Ian Abbott Cc: H Hartley Sweeten --- drivers/staging/comedi/drivers/addi_apci_1564.c | 46

[PATCH 2/6] staging: comedi: addi_apci_1564: remove unnecessary include

2014-04-26 Thread Chase Southwood
This include is no longer needed. Signed-off-by: Chase Southwood Cc: Ian Abbott Cc: H Hartley Sweeten --- drivers/staging/comedi/drivers/addi_apci_1564.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/comedi/drivers/addi_apci_1564.c b/drivers/staging/comedi/drivers

[PATCH 4/6] staging: comedi: addi_apci_1564: simplify the PCI bar reading and don't read the unused bars

2014-04-26 Thread Chase Southwood
This driver only uses PCI bar 1 (devpriv->i_IobaseAmcc), and PCI bar 2 (dev->iobase) doon't bother reading the unused PCI bars. Signed-off-by: Chase Southwood Cc: Ian Abbott Cc: H Hartley Sweeten --- Hartley, As far as I can tell from reading the I/O Mapping you sent me, these

[PATCH 3/6] staging: comedi: addi_apci_1032: board has 32 digital inputs

2014-04-26 Thread Chase Southwood
This board always has 32 digital inputs. Remove the test when initializing the subdevice. Also, since this board is the only one supported by this driver, remove the boardinfo about the digital inputs and just use the data directly in the subdevice init. Signed-off-by: Chase Southwood Cc: Ian

[PATCH 5/6] staging: comedi: addi_apci_2032: remove unnecessary info from boardinfo

2014-04-26 Thread Chase Southwood
The i_IorangeBase1, i_PCIEeprom, and pc_EepromChip data in the boardinfo was only needed to work out the usage of the PCI bars. Now that that is squared away, this info is no longer needed and can be removed. Signed-off-by: Chase Southwood Cc: Ian Abbott Cc: H Hartley Sweeten --- drivers

[PATCH 6/6] staging: comedi: addi_apci_2032: remove use of devpriv->s_EeParameters

2014-04-26 Thread Chase Southwood
This driver no longer reads the eeprom to find the board specific data, all the necessary data is in the boardinfo. Use the boardinfo directly instead of passing through devpriv->s_EeParameters. Signed-off-by: Chase Southwood Cc: Ian Abbott Cc: H Hartley Sweeten --- Ian and Hartley,

Re: [PATCH 6/6] staging: comedi: addi_apci_2032: remove use of devpriv->s_EeParameters

2014-04-29 Thread Chase Southwood
Saturday, April 26, 2014 6:39 PM, Chase Southwood wrote: >> This driver no longer reads the eeprom to find the board specific data, >> all the necessary data is in the boardinfo. Use the boardinfo directly >> instead of passing through devpriv->s_EeParameters. >> >> S

Re: [PATCH 4/6] staging: comedi: addi_apci_1564: simplify the PCI bar reading and don't read the unused bars

2014-04-29 Thread Chase Southwood
27;ll make sure to be more careful in the future. Thanks your all of the assistance and patience, Chase On Mon, Apr 28, 2014 at 1:09 PM, Hartley Sweeten wrote: > On Saturday, April 26, 2014 6:37 PM, Chase Southwood wrote: >> This driver only uses PCI bar 1 (devpriv->i_IobaseAmcc), an

[PATCH 3/6 v2] staging: comedi: addi_apci_1564: board has 32 digital inputs

2014-04-29 Thread Chase Southwood
This board always has 32 digital inputs. Remove the test when initializing the subdevice. Also, since this board is the only one supported by this driver, remove the boardinfo about the digital inputs and just use the data directly in the subdevice init. Signed-off-by: Chase Southwood Cc: Ian

[PATCH 4/6 v2] staging: comedi: addi_apci_1564: simplify the PCI bar reading and don't read the unused bars

2014-04-29 Thread Chase Southwood
This driver only uses PCI bar 1 (devpriv->i_IobaseAmcc), and PCI bar 2 (dev->iobase) doon't bother reading the unused PCI bars. Signed-off-by: Chase Southwood Cc: Ian Abbott Cc: H Hartley Sweeten --- 2: Bad PCI bar numbers corrected. drivers/staging/comedi/drivers/addi_apci_

[PATCH 5/6 v2] staging: comedi: addi_apci_1564: remove unnecessary info from boardinfo

2014-04-29 Thread Chase Southwood
The i_IorangeBase1, i_PCIEeprom, and pc_EepromChip data in the boardinfo was only needed to work out the usage of the PCI bars. Now that that is squared away, this info is no longer needed and can be removed. Signed-off-by: Chase Southwood Cc: Ian Abbott Cc: H Hartley Sweeten --- 2: Incorrect

[PATCH 6/6 v2] staging: comedi: addi_apci_1564: remove use of devpriv->s_EeParameters

2014-04-29 Thread Chase Southwood
This driver no longer reads the eeprom to find the board specific data, all the necessary data is in the boardinfo. Use the boardinfo directly instead of passing through devpriv->s_EeParameters. Signed-off-by: Chase Southwood Cc: Ian Abbott Cc: H Hartley Sweeten --- 2: Incorrect patch ti

[PATCH v2] Staging: comedi: clean up conditional statement in addi_apci_3xxx.c

2014-02-13 Thread Chase Southwood
e mask otherwise, so all the io_bits are modified for port 2. This ensures that mask is always initialized by the time it is used. Signed-off-by: Chase Southwood --- 2: Addressed all of the comments provided by Hartley regarding correct structure of this patch. Hopefully everything looks better! d

  1   2   3   >