[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/drivers

[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 chase.southw...@gmail.com --- drivers

[PATCH] staging: comedi: change some printk calls to pr_err

2014-11-30 Thread Chase Southwood
There are a handful of calls to printk in ni_stc.h without specified log levels, as well as one in ni_mio_common.c. This patch converts these calls to pr_err() instead, so that they are now explicitly log level ERR. Signed-off-by: Chase Southwood --- I tacked the change to ni_mio_common.c

[PATCH] staging: comedi: change some printk calls to pr_err

2014-11-30 Thread Chase Southwood
There are a handful of calls to printk in ni_stc.h without specified log levels, as well as one in ni_mio_common.c. This patch converts these calls to pr_err() instead, so that they are now explicitly log level ERR. Signed-off-by: Chase Southwood chase.southw...@gmail.com --- I tacked the change

[PATCH 4/4] staging: comedi: hwdrv_apci3120: remove void function return statement

2014-09-10 Thread Chase Southwood
Returns at the end of void functions are useless. Remove this one. Signed-off-by: Chase Southwood Cc: Ian Abbott Cc: H Hartley Sweeten --- drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/comedi/drivers/addi-data

[PATCH 3/4] staging: comedi: hwdrv_apci3120: else is not useful after return

2014-09-10 Thread Chase Southwood
The statement nested in an else after a return may be brought out one indent level, the else is useless. Signed-off-by: Chase Southwood Cc: Ian Abbott Cc: H Hartley Sweeten --- drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions

[PATCH 2/4] staging: comedi: hwdrv_apci3120: add a blank line after declarations

2014-09-10 Thread Chase Southwood
Signed-off-by: Chase Southwood Cc: Ian Abbott Cc: H Hartley Sweeten --- drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c b/drivers/staging/comedi/drivers/addi-data

[PATCH 0/4] staging: comedi: hwdrv_apci1320: style cleanups

2014-09-10 Thread Chase Southwood
This patchset begins by cleaning up the mess of the comments in this driver, then follows that with three very small and trivial checkpatch warning fixes. Chase Southwood (4): staging: comedi: hwdrv_apci3120: clean up comments staging: comedi: hwdrv_apci3120: add a blank line after

[PATCH 1/4] staging: comedi: hwdrv_apci3120: clean up comments

2014-09-10 Thread Chase Southwood
This patch fixes improper comment indentation, removes dead code and obsolete comments, and conforms remaining comments to a consistent kernel commenting style. Signed-off-by: Chase Southwood Cc: Ian Abbott Cc: H Hartley Sweeten --- .../comedi/drivers/addi-data/hwdrv_apci3120.c | 364

[PATCH 1/4] staging: comedi: hwdrv_apci3120: clean up comments

2014-09-10 Thread Chase Southwood
This patch fixes improper comment indentation, removes dead code and obsolete comments, and conforms remaining comments to a consistent kernel commenting style. Signed-off-by: Chase Southwood chase.southw...@gmail.com Cc: Ian Abbott abbo...@mev.co.uk Cc: H Hartley Sweeten hswee

[PATCH 0/4] staging: comedi: hwdrv_apci1320: style cleanups

2014-09-10 Thread Chase Southwood
This patchset begins by cleaning up the mess of the comments in this driver, then follows that with three very small and trivial checkpatch warning fixes. Chase Southwood (4): staging: comedi: hwdrv_apci3120: clean up comments staging: comedi: hwdrv_apci3120: add a blank line after

[PATCH 2/4] staging: comedi: hwdrv_apci3120: add a blank line after declarations

2014-09-10 Thread Chase Southwood
Signed-off-by: Chase Southwood chase.southw...@gmail.com Cc: Ian Abbott abbo...@mev.co.uk Cc: H Hartley Sweeten hswee...@visionengravers.com --- drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/comedi/drivers/addi-data

[PATCH 4/4] staging: comedi: hwdrv_apci3120: remove void function return statement

2014-09-10 Thread Chase Southwood
Returns at the end of void functions are useless. Remove this one. Signed-off-by: Chase Southwood chase.southw...@gmail.com Cc: Ian Abbott abbo...@mev.co.uk Cc: H Hartley Sweeten hswee...@visionengravers.com --- drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c | 2 -- 1 file changed, 2

[PATCH 3/4] staging: comedi: hwdrv_apci3120: else is not useful after return

2014-09-10 Thread Chase Southwood
The statement nested in an else after a return may be brought out one indent level, the else is useless. Signed-off-by: Chase Southwood chase.southw...@gmail.com Cc: Ian Abbott abbo...@mev.co.uk Cc: H Hartley Sweeten hswee...@visionengravers.com --- drivers/staging/comedi/drivers/addi-data

[PATCH] staging: comedi: hwdrv_apci1500: use dev->class_dev in calls to dev_warn()

2014-09-03 Thread Chase Southwood
igned-off-by: Chase Southwood Cc: Ian Abbott Cc: H Hartley Sweeten --- As an aside, it looks like lots of these cases are actually error conditions that might be more appropriate use cases for dev_err(). But they could be changed in a follow on patch, this is enough for this one. .../comedi/drivers/

[PATCH] staging: comedi: hwdrv_apci1500: use dev-class_dev in calls to dev_warn()

2014-09-03 Thread Chase Southwood
git-grep reveals that hwdrv_apci1500.c is the only file in comedi that uses dev-hw_dev in calls to dev_{err,warn}(). The rest of the drivers pass dev-class_dev to these macros instead. Switch the dev_warn() calls in this driver to use dev-class_dev as well, for consistency. Signed-off-by: Chase

[PATCH 4/4] staging: comedi: hwdrv_apci1500: miscellaneous cleanup

2014-08-31 Thread Chase Southwood
This patch completes two final matters of cleanup which are each too small for their own patch. It corrects a couple of indentation issues and removes a return statement at the end of a void function. Signed-off-by: Chase Southwood Cc: Ian Abbott Cc: H Hartley Sweeten --- .../staging/comedi

[PATCH 3/4] staging: comedi: hwdrv_apci1500: clean some whitespace style issues

2014-08-31 Thread Chase Southwood
Now that commented out code has been removed, else statements can move to the same line as the close brace of the if statement. Also, a blank line has been added between declarations and code where needed. Signed-off-by: Chase Southwood Cc: Ian Abbott Cc: H Hartley Sweeten --- .../comedi

[PATCH 0/4] staging: comedi: hwdrv_apci1500: coding style cleanups

2014-08-31 Thread Chase Southwood
This patchset begins by removing unneeded braces and commented out lines of code, and then tidies whitespace issues that are revealed after the braces/dead code is removed. Chase Southwood (4): staging: comedi: hwdrv_apci1500: remove unneeded braces staging: comedi: hwdrv_apci1500: remove

[PATCH 1/4] staging: comedi: hwdrv_apci1500: remove unneeded braces

2014-08-31 Thread Chase Southwood
We don't need braces around single-statement blocks. Signed-off-by: Chase Southwood Cc: Ian Abbott Cc: H Hartley Sweeten --- .../comedi/drivers/addi-data/hwdrv_apci1500.c | 30 +- 1 file changed, 12 insertions(+), 18 deletions(-) diff --git a/drivers/staging/comedi

[PATCH 2/4] staging: comedi: hwdrv_apci1500: remove commented out code

2014-08-31 Thread Chase Southwood
Signed-off-by: Chase Southwood Cc: Ian Abbott Cc: H Hartley Sweeten --- .../comedi/drivers/addi-data/hwdrv_apci1500.c | 249 ++--- 1 file changed, 123 insertions(+), 126 deletions(-) diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1500.c b/drivers/staging

[PATCH] staging: comedi: hwdrv_apci3501: change printk to dev_err

2014-08-31 Thread Chase Southwood
dev_err() is preferred to printk() in device drivers. Signed-off-by: Chase Southwood Cc: Ian Abbott Cc: H Hartley Sweeten --- drivers/staging/comedi/drivers/addi-data/hwdrv_apci3501.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/comedi/drivers/addi-data

[PATCH] staging: comedi: hwdrv_apci035: remove useless return statement

2014-08-31 Thread Chase Southwood
Checkpatch pointed out a void function with a return statement. It can be removed. Signed-off-by: Chase Southwood Cc: Ian Abbott Cc: H Hartley Sweeten --- drivers/staging/comedi/drivers/addi-data/hwdrv_apci035.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/comedi

[PATCH] staging: comedi: usbdux: fix more sparse endianness warnings

2014-08-31 Thread Chase Southwood
:889:20:got restricted __le16 [usertype] This is the result of a couple of calls to cpu_to_le16() being assigned to uint16_t typed variables. Switch the types of these variables/pointers to __le16 accordingly. Signed-off-by: Chase Southwood Suggested-by: Ian Abbott Cc: H Hartley Sweeten

[PATCH] staging: comedi: usbduxsigma: fix more sparse endianness warnings

2014-08-31 Thread Chase Southwood
Sparse shows a couple of warnings like: drivers/staging/comedi/drivers/usbduxsigma.c:787:23: warning: cast to restricted __be32 Looking at the indicated lines shows that the issue is caused by an incorrect cast to uint32_t instead of __be32. Fix this cast. Signed-off-by: Chase Southwood Cc

Re: [PATCH] staging: comedi: usbdux: fix sparse endianness warnings

2014-08-31 Thread Chase Southwood
On Sat, Aug 30, 2014 at 5:40 AM, Ian Abbott wrote: > > That seems fine. Perhaps the variable 'p' in usbdux_ao_insn_write() should > also be of type '__le16 *'? > You're entirely correct. I had seen this in the output from Sparse, but for some reason at first glance I had convinced myself that

Re: [PATCH] staging: comedi: usbdux: fix sparse endianness warnings

2014-08-31 Thread Chase Southwood
On Sat, Aug 30, 2014 at 5:40 AM, Ian Abbott abbo...@mev.co.uk wrote: That seems fine. Perhaps the variable 'p' in usbdux_ao_insn_write() should also be of type '__le16 *'? You're entirely correct. I had seen this in the output from Sparse, but for some reason at first glance I had convinced

[PATCH] staging: comedi: usbdux: fix more sparse endianness warnings

2014-08-31 Thread Chase Southwood
/usbdux.c:889:20:got restricted __le16 [usertype] noident This is the result of a couple of calls to cpu_to_le16() being assigned to uint16_t typed variables. Switch the types of these variables/pointers to __le16 accordingly. Signed-off-by: Chase Southwood chase.southw...@gmail.com Suggested

[PATCH] staging: comedi: usbduxsigma: fix more sparse endianness warnings

2014-08-31 Thread Chase Southwood
Sparse shows a couple of warnings like: drivers/staging/comedi/drivers/usbduxsigma.c:787:23: warning: cast to restricted __be32 Looking at the indicated lines shows that the issue is caused by an incorrect cast to uint32_t instead of __be32. Fix this cast. Signed-off-by: Chase Southwood

[PATCH] staging: comedi: hwdrv_apci035: remove useless return statement

2014-08-31 Thread Chase Southwood
Checkpatch pointed out a void function with a return statement. It can be removed. Signed-off-by: Chase Southwood chase.southw...@gmail.com Cc: Ian Abbott abbo...@mev.co.uk Cc: H Hartley Sweeten hswee...@visionengravers.com --- drivers/staging/comedi/drivers/addi-data/hwdrv_apci035.c | 2 -- 1

[PATCH] staging: comedi: hwdrv_apci3501: change printk to dev_err

2014-08-31 Thread Chase Southwood
dev_err() is preferred to printk() in device drivers. Signed-off-by: Chase Southwood chase.southw...@gmail.com Cc: Ian Abbott abbo...@mev.co.uk Cc: H Hartley Sweeten hswee...@visionengravers.com --- drivers/staging/comedi/drivers/addi-data/hwdrv_apci3501.c | 2 +- 1 file changed, 1 insertion

[PATCH 1/4] staging: comedi: hwdrv_apci1500: remove unneeded braces

2014-08-31 Thread Chase Southwood
We don't need braces around single-statement blocks. Signed-off-by: Chase Southwood chase.southw...@gmail.com Cc: Ian Abbott abbo...@mev.co.uk Cc: H Hartley Sweeten hswee...@visionengravers.com --- .../comedi/drivers/addi-data/hwdrv_apci1500.c | 30 +- 1 file changed, 12

[PATCH 2/4] staging: comedi: hwdrv_apci1500: remove commented out code

2014-08-31 Thread Chase Southwood
Signed-off-by: Chase Southwood chase.southw...@gmail.com Cc: Ian Abbott abbo...@mev.co.uk Cc: H Hartley Sweeten hswee...@visionengravers.com --- .../comedi/drivers/addi-data/hwdrv_apci1500.c | 249 ++--- 1 file changed, 123 insertions(+), 126 deletions(-) diff --git

[PATCH 0/4] staging: comedi: hwdrv_apci1500: coding style cleanups

2014-08-31 Thread Chase Southwood
This patchset begins by removing unneeded braces and commented out lines of code, and then tidies whitespace issues that are revealed after the braces/dead code is removed. Chase Southwood (4): staging: comedi: hwdrv_apci1500: remove unneeded braces staging: comedi: hwdrv_apci1500: remove

[PATCH 4/4] staging: comedi: hwdrv_apci1500: miscellaneous cleanup

2014-08-31 Thread Chase Southwood
This patch completes two final matters of cleanup which are each too small for their own patch. It corrects a couple of indentation issues and removes a return statement at the end of a void function. Signed-off-by: Chase Southwood chase.southw...@gmail.com Cc: Ian Abbott abbo...@mev.co.uk Cc: H

[PATCH 3/4] staging: comedi: hwdrv_apci1500: clean some whitespace style issues

2014-08-31 Thread Chase Southwood
Now that commented out code has been removed, else statements can move to the same line as the close brace of the if statement. Also, a blank line has been added between declarations and code where needed. Signed-off-by: Chase Southwood chase.southw...@gmail.com Cc: Ian Abbott abbo...@mev.co.uk

[PATCH] staging: comedi: addi_apci_1564: move boilerplate text to addi_apci_1564.c

2014-08-29 Thread Chase Southwood
Signed-off-by: Chase Southwood Cc: Ian Abbott Cc: H Hartley Sweeten --- .../comedi/drivers/addi-data/hwdrv_apci1564.c | 23 -- drivers/staging/comedi/drivers/addi_apci_1564.c| 23 ++ 2 files changed, 23 insertions(+), 23 deletions(-) diff --git

[PATCH] staging: comedi: usbdux: fix sparse endianness warnings

2014-08-29 Thread Chase Southwood
ed-off-by: Chase Southwood Cc: Ian Abbott Cc: H Hartley Sweeten --- This is, as usual, compile tested only. I tried to verify as best as I could that this is a sane change, but I am unable to test on the hardware. drivers/staging/comedi/drivers/usbdux.c | 4 ++-- 1 file changed, 2 insertions(+), 2 del

[PATCH] staging: comedi: usbduxsigma: fix sparse endianness warnings

2014-08-29 Thread Chase Southwood
Sparse has many warnings like: drivers/staging/comedi/drivers/usbduxsigma.c:293:21: warning: cast to restricted __be32 on lines on which devpriv->in_buf is passed to be32_to_cpu(). This suggests that this variable should actually be of type __be32. Signed-off-by: Chase Southwood Cc:

[PATCH] staging: comedi: usbdux: fix sparse endianness warnings

2014-08-29 Thread Chase Southwood
Sparse has many warnings like: drivers/staging/comedi/drivers/usbdux.c:366:32: warning: cast to restricted __le16 on lines on which devpriv-in_buf or devpriv-insn_buf are passed to le16_to_cpu(). This suggests that both of these variables should actually be of type __le16. Signed-off-by: Chase

[PATCH] staging: comedi: usbduxsigma: fix sparse endianness warnings

2014-08-29 Thread Chase Southwood
Sparse has many warnings like: drivers/staging/comedi/drivers/usbduxsigma.c:293:21: warning: cast to restricted __be32 on lines on which devpriv-in_buf is passed to be32_to_cpu(). This suggests that this variable should actually be of type __be32. Signed-off-by: Chase Southwood chase.southw

[PATCH] staging: comedi: addi_apci_1564: move boilerplate text to addi_apci_1564.c

2014-08-29 Thread Chase Southwood
Signed-off-by: Chase Southwood chase.southw...@gmail.com Cc: Ian Abbott abbo...@mev.co.uk Cc: H Hartley Sweeten hswee...@visionengravers.com --- .../comedi/drivers/addi-data/hwdrv_apci1564.c | 23 -- drivers/staging/comedi/drivers/addi_apci_1564.c| 23

[PATCH] staging: comedi: s626: remove unnecessary variable initialization

2014-08-17 Thread Chase Southwood
We initialize 'irqbit' to 0, only to properly set it immediately afterwards. Just remove the zero-initialization. Signed-off-by: Chase Southwood Cc: Ian Abbott Cc: H Hartley Sweeten --- drivers/staging/comedi/drivers/s626.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging

[PATCH] staging: comedi: dt2801: change function return type to void

2014-08-17 Thread Chase Southwood
the return type for this function from int to void, and remove the two assignments to 'stat'. Signed-off-by: Chase Southwood Cc: Ian Abbott Cc: H Hartley Sweeten --- drivers/staging/comedi/drivers/dt2801.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/staging

[PATCH] staging: comedi: dt2801: change function return type to void

2014-08-17 Thread Chase Southwood
the return type for this function from int to void, and remove the two assignments to 'stat'. Signed-off-by: Chase Southwood chase.southw...@gmail.com Cc: Ian Abbott abbo...@mev.co.uk Cc: H Hartley Sweeten hswee...@visionengravers.com --- drivers/staging/comedi/drivers/dt2801.c | 8 +++- 1 file

[PATCH] staging: comedi: s626: remove unnecessary variable initialization

2014-08-17 Thread Chase Southwood
We initialize 'irqbit' to 0, only to properly set it immediately afterwards. Just remove the zero-initialization. Signed-off-by: Chase Southwood chase.southw...@gmail.com Cc: Ian Abbott abbo...@mev.co.uk Cc: H Hartley Sweeten hswee...@visionengravers.com --- drivers/staging/comedi/drivers/s626

[PATCH 3/3] staging: comedi: dt3000: remove unneeded variable

2014-08-16 Thread Chase Southwood
en removes the variable. Signed-off-by: Chase Southwood Cc: Ian Abbott Cc: H Hartley Sweeten --- It occurred to me while doing this that zero might be or'd twice to indicate "no information" in order to maintain some three-part structure used elsewhere. If this is the case, I thi

[PATCH 2/3] staging: comedi: addi_apci_1564: correct typo in macro definition

2014-08-16 Thread Chase Southwood
A recent commit introduced a typo in the definition of APCI1564_DO_CC_INT_DISABLE. The macro is not use yet, so not a huge deal, but this patch corrects it. Signed-off-by: Chase Southwood Cc: Ian Abbott Cc: H Hartley Sweeten --- drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c | 2

[PATCH 1/3] staging: comedi: addi_apci_1564: add whitespace to subdevice init

2014-08-16 Thread Chase Southwood
For purely aesthetic purposes, add some whitespace to subdevice initialization. Signed-off-by: Chase Southwood Cc: Ian Abbott Cc: H Hartley Sweeten --- drivers/staging/comedi/drivers/addi_apci_1564.c | 78 - 1 file changed, 39 insertions(+), 39 deletions(-) diff --git

[PATCH 1/3] staging: comedi: addi_apci_1564: add whitespace to subdevice init

2014-08-16 Thread Chase Southwood
For purely aesthetic purposes, add some whitespace to subdevice initialization. Signed-off-by: Chase Southwood chase.southw...@gmail.com Cc: Ian Abbott abbo...@mev.co.uk Cc: H Hartley Sweeten hswee...@visionengravers.com --- drivers/staging/comedi/drivers/addi_apci_1564.c | 78

[PATCH 2/3] staging: comedi: addi_apci_1564: correct typo in macro definition

2014-08-16 Thread Chase Southwood
A recent commit introduced a typo in the definition of APCI1564_DO_CC_INT_DISABLE. The macro is not use yet, so not a huge deal, but this patch corrects it. Signed-off-by: Chase Southwood chase.southw...@gmail.com Cc: Ian Abbott abbo...@mev.co.uk Cc: H Hartley Sweeten hswee

[PATCH 3/3] staging: comedi: dt3000: remove unneeded variable

2014-08-16 Thread Chase Southwood
the variable. Signed-off-by: Chase Southwood chase.southw...@gmail.com Cc: Ian Abbott abbo...@mev.co.uk Cc: H Hartley Sweeten hswee...@visionengravers.com --- It occurred to me while doing this that zero might be or'd twice to indicate no information in order to maintain some three-part structure

[PATCH 3/3] staging: comedi: addi_apci_1564: tidy register map defines

2014-08-11 Thread Chase Southwood
e only offsets to counter registers (since only the counters are offset from dev->iobase). Signed-off-by: Chase Southwood Cc: Ian Abbott Cc: H Hartley Sweeten --- .../comedi/drivers/addi-data/hwdrv_apci1564.c | 70 -- drivers/staging/comedi/drivers/addi_apci_1564.

[PATCH 2/3] staging: comedi: addi_apci_1564: Remove in-driver watchdog support code

2014-08-11 Thread Chase Southwood
will also make future work on the timer and counter subdevices easier. Signed-off-by: Chase Southwood Cc: Ian Abbott Cc: H Hartley Sweeten --- .../comedi/drivers/addi-data/hwdrv_apci1564.c | 54 +- 1 file changed, 12 insertions(+), 42 deletions(-) diff --git a/drive

[PATCH 1/3] staging: comedi: addi_apci_1564: remove apci1564_do_config

2014-08-11 Thread Chase Southwood
The DO config function served the purpose of configuring the diagnostic interrupts for the board. As the driver currently does not support diagnostic interrupts, the digital output subdevice does not need an insn_config operation and this function can be safely removed. Signed-off-by: Chase

[PATCH 0/3] staging: comedi: addi_apci_1564: miscellaneous cleanups

2014-08-11 Thread Chase Southwood
This patchset removes an uncorrect and unneeded insn_config operation, strips out remaining in-driver watchdog subdevice code, and cleans up the driver's register map defines. Chase Southwood (3): staging: comedi: addi_apci_1564: remove apci1564_do_config staging: comedi: addi_apci_1564

[PATCH 0/3] staging: comedi: addi_apci_1564: miscellaneous cleanups

2014-08-11 Thread Chase Southwood
This patchset removes an uncorrect and unneeded insn_config operation, strips out remaining in-driver watchdog subdevice code, and cleans up the driver's register map defines. Chase Southwood (3): staging: comedi: addi_apci_1564: remove apci1564_do_config staging: comedi: addi_apci_1564

[PATCH 1/3] staging: comedi: addi_apci_1564: remove apci1564_do_config

2014-08-11 Thread Chase Southwood
The DO config function served the purpose of configuring the diagnostic interrupts for the board. As the driver currently does not support diagnostic interrupts, the digital output subdevice does not need an insn_config operation and this function can be safely removed. Signed-off-by: Chase

[PATCH 3/3] staging: comedi: addi_apci_1564: tidy register map defines

2014-08-11 Thread Chase Southwood
offsets to counter registers (since only the counters are offset from dev-iobase). Signed-off-by: Chase Southwood chase.southw...@gmail.com Cc: Ian Abbott abbo...@mev.co.uk Cc: H Hartley Sweeten hswee...@visionengraver.com --- .../comedi/drivers/addi-data/hwdrv_apci1564.c | 70

[PATCH 2/3] staging: comedi: addi_apci_1564: Remove in-driver watchdog support code

2014-08-11 Thread Chase Southwood
future work on the timer and counter subdevices easier. Signed-off-by: Chase Southwood chase.southw...@gmail.com Cc: Ian Abbott abbo...@mev.co.uk Cc: H Hartley Sweeten hswee...@visionengravers.com --- .../comedi/drivers/addi-data/hwdrv_apci1564.c | 54 +- 1 file changed

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

2014-07-31 Thread Chase Southwood
. 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 files changed, 32

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

2014-07-31 Thread Chase Southwood
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/comedi

[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 check

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

2014-07-31 Thread Chase Southwood
subdevice with an insn_bits handler to access this information. Signed-off-by: Chase Southwood chase.southw...@gmail.com Cc: Ian Abbott abbo...@mev.co.uk Cc: H Hartley Sweeten hswee...@visionengravers.com --- drivers/staging/comedi/drivers/addi_apci_1564.c | 23 ++- 1 file changed, 22

[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 check

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

2014-07-31 Thread Chase Southwood
. So it is safe to simply remove this function. Signed-off-by: Chase Southwood chase.southw...@gmail.com Cc: Ian Abbott abbo...@mev.co.uk Cc: H Hartley Sweeten hswee...@visionengravers.com --- .../staging/comedi/drivers/addi-data/hwdrv_apci1564.c | 14 -- drivers/staging/comedi/drivers

Re: [PATCH 2/2] staging: comedi: addi_apci_1564: use addi_watchdog module to init watchdog subdevice

2014-07-16 Thread Chase Southwood
On Tue, Jul 15, 2014 at 5:14 AM, Ian Abbott wrote: > On 2014-07-15 05:00, Chase Southwood wrote: >> >> On Mon, Jul 14, 2014 at 4:22 AM, Ian Abbott wrote: >>> >>> On 2014-07-12 23:44, Chase Southwood wrote: >>>> >>>> >>>

Re: [PATCH 2/2] staging: comedi: addi_apci_1564: use addi_watchdog module to init watchdog subdevice

2014-07-16 Thread Chase Southwood
On Tue, Jul 15, 2014 at 5:14 AM, Ian Abbott abbo...@mev.co.uk wrote: On 2014-07-15 05:00, Chase Southwood wrote: On Mon, Jul 14, 2014 at 4:22 AM, Ian Abbott abbo...@mev.co.uk wrote: On 2014-07-12 23:44, Chase Southwood wrote: Use the addi_watchdog module to provide support for the watchdog

Re: [PATCH 2/2] staging: comedi: addi_apci_1564: use addi_watchdog module to init watchdog subdevice

2014-07-14 Thread Chase Southwood
On Mon, Jul 14, 2014 at 4:22 AM, Ian Abbott wrote: > On 2014-07-12 23:44, Chase Southwood wrote: >> >> Use the addi_watchdog module to provide support for the watchdog >> subdevice. >> >> Also, rearrange the subdevice init blocks so that the order makes sense. &

Re: [PATCH 2/2] staging: comedi: addi_apci_1564: use addi_watchdog module to init watchdog subdevice

2014-07-14 Thread Chase Southwood
On Mon, Jul 14, 2014 at 4:22 AM, Ian Abbott abbo...@mev.co.uk wrote: On 2014-07-12 23:44, Chase Southwood wrote: Use the addi_watchdog module to provide support for the watchdog subdevice. Also, rearrange the subdevice init blocks so that the order makes sense. Digital input/output

Re: [PATCH 2/2] staging: comedi: addi_apci_1564: use addi_watchdog module to init watchdog subdevice

2014-07-13 Thread Chase Southwood
On Sun, Jul 13, 2014 at 2:17 PM, Hartley Sweeten wrote: > On Saturday, July 12, 2014 3:44 PM, Chase Southwood wrote: >> Use the addi_watchdog module to provide support for the watchdog >> subdevice. >> >> Also, rearrange the subdevice init blocks so that the order ma

Re: [PATCH 2/2] staging: comedi: addi_apci_1564: use addi_watchdog module to init watchdog subdevice

2014-07-13 Thread Chase Southwood
On Sun, Jul 13, 2014 at 2:17 PM, Hartley Sweeten hartl...@visionengravers.com wrote: On Saturday, July 12, 2014 3:44 PM, Chase Southwood wrote: Use the addi_watchdog module to provide support for the watchdog subdevice. Also, rearrange the subdevice init blocks so that the order makes sense

[PATCH 2/2] staging: comedi: addi_apci_1564: use addi_watchdog module to init watchdog subdevice

2014-07-12 Thread Chase Southwood
-off-by: Chase Southwood Cc: Ian Abbott Cc: H Hartley Sweeten --- drivers/staging/comedi/drivers/addi_apci_1564.c | 34 +++-- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/drivers/staging/comedi/drivers/addi_apci_1564.c b/drivers/staging/comedi/drivers

[PATCH 1/2] staging: comedi: addi_apci_1564: driver no longer needs to include addi_common.h

2014-07-12 Thread Chase Southwood
This driver no longer depends on anything in addi_common.h, save for a few headers that it was including indirectly. Remove the include of addi_common.h and add the includes of and directly. Signed-off-by: Chase Southwood Cc: Ian Abbott Cc: H Hartley Sweeten --- drivers/staging/comedi

[PATCH 1/2] staging: comedi: addi_apci_1564: driver no longer needs to include addi_common.h

2014-07-12 Thread Chase Southwood
This driver no longer depends on anything in addi_common.h, save for a few headers that it was including indirectly. Remove the include of addi_common.h and add the includes of linux/interrupt.h and linux/sched.h directly. Signed-off-by: Chase Southwood chase.southw...@gmail.com Cc: Ian Abbott

[PATCH 2/2] staging: comedi: addi_apci_1564: use addi_watchdog module to init watchdog subdevice

2014-07-12 Thread Chase Southwood
-off-by: Chase Southwood chase.southw...@gmail.com Cc: Ian Abbott abbo...@mev.co.uk Cc: H Hartley Sweeten hswee...@visionengravers.com --- drivers/staging/comedi/drivers/addi_apci_1564.c | 34 +++-- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/drivers/staging

[PATCH 4/4] staging: comedi: addi_apci_1564: fix s->maxdata assignment in do subdevice init.

2014-07-10 Thread Chase Southwood
s->maxdata for the do subdevice should be 1, however currently it is being set to 0x. Fix this. Signed-off-by: Chase Southwood Cc: Ian Abbott Cc: H Hartley Sweeten --- This patch is at the end because I'm somewhat uncertain of its correctness. Every other addi_apci_* dri

[PATCH 2/4] staging: comedi: addi_apci_1564: remove unnecessary dev->board_name initialization

2014-07-10 Thread Chase Southwood
The dev->board_name is now initialized by the comedi core before calling the(*attach) or (*auto_attach) function in a driver. As long as the driver does no additional probing, it's no longer necessary initialize the board_name. Signed-off-by: Chase Southwood Cc: Ian Abbott Cc: H Hartley Swee

[PATCH 3/4] staging: comedi: addi_apci_1564: remove null check of devpriv in apci1564_detach()

2014-07-10 Thread Chase Southwood
There is no need to test whether devpriv is null in this function. The check looks left over and we can just remove it. Signed-off-by: Chase Southwood Cc: Ian Abbott Cc: H Hartley Sweeten --- drivers/staging/comedi/drivers/addi_apci_1564.c | 12 1 file changed, 4 insertions

[PATCH 1/4] staging: comedi: addi_apci_1564: remove len_chanlist from di and do subdevices

2014-07-10 Thread Chase Southwood
This value is only needed for subdevices that support async commands. The comedi core will default the value to 1 when it is not initialized. Signed-off-by: Chase Southwood Cc: Ian Abbott Cc: H Hartley Sweeten --- drivers/staging/comedi/drivers/addi_apci_1564.c | 2 -- 1 file changed, 2

[PATCH 0/4] staging: comedi: addi_apci_1564: small fixes in apci1564_auto_attach() and apci1564_detach()

2014-07-10 Thread Chase Southwood
This is a small patchset containing a handful of fixes to the ADDI-DATA APCI1564 driver that I would like to get out of the way before I forget to take care of them. From here, I will move to start fixing the digital input/timer/counters/watchdog functionality of the board. Chase Southwood (4

[PATCH 0/4] staging: comedi: addi_apci_1564: small fixes in apci1564_auto_attach() and apci1564_detach()

2014-07-10 Thread Chase Southwood
This is a small patchset containing a handful of fixes to the ADDI-DATA APCI1564 driver that I would like to get out of the way before I forget to take care of them. From here, I will move to start fixing the digital input/timer/counters/watchdog functionality of the board. Chase Southwood (4

[PATCH 1/4] staging: comedi: addi_apci_1564: remove len_chanlist from di and do subdevices

2014-07-10 Thread Chase Southwood
This value is only needed for subdevices that support async commands. The comedi core will default the value to 1 when it is not initialized. Signed-off-by: Chase Southwood chase.southw...@gmail.com Cc: Ian Abbott abbo...@mev.co.uk Cc: H Hartley Sweeten hswee...@visionengravers.com --- drivers

[PATCH 4/4] staging: comedi: addi_apci_1564: fix s-maxdata assignment in do subdevice init.

2014-07-10 Thread Chase Southwood
s-maxdata for the do subdevice should be 1, however currently it is being set to 0x. Fix this. Signed-off-by: Chase Southwood chase.southw...@gmail.com Cc: Ian Abbott abbo...@mev.co.uk Cc: H Hartley Sweeten hswee...@visionengravers.com --- This patch is at the end because I'm somewhat

[PATCH 2/4] staging: comedi: addi_apci_1564: remove unnecessary dev-board_name initialization

2014-07-10 Thread Chase Southwood
The dev-board_name is now initialized by the comedi core before calling the(*attach) or (*auto_attach) function in a driver. As long as the driver does no additional probing, it's no longer necessary initialize the board_name. Signed-off-by: Chase Southwood chase.southw...@gmail.com Cc: Ian

[PATCH 3/4] staging: comedi: addi_apci_1564: remove null check of devpriv in apci1564_detach()

2014-07-10 Thread Chase Southwood
There is no need to test whether devpriv is null in this function. The check looks left over and we can just remove it. Signed-off-by: Chase Southwood chase.southw...@gmail.com Cc: Ian Abbott abbo...@mev.co.uk Cc: H Hartley Sweeten hswee...@visionengravers.com --- drivers/staging/comedi/drivers

Re: [PATCH v2 0/3] staging: comedi: addi_apci_1564: miscellaneous fixes and cleanups

2014-07-03 Thread Chase Southwood
On Thu, Jul 3, 2014 at 4:39 AM, Ian Abbott wrote: > On 2014-07-03 03:15, Chase Southwood wrote: >> >> This patchset moves a misplaced include to the proper file, swaps out an >> overly >> aggressive placement of apci1564_reset(), and cleans up >> apci1564_inte

Re: [PATCH v2 0/3] staging: comedi: addi_apci_1564: miscellaneous fixes and cleanups

2014-07-03 Thread Chase Southwood
On Thu, Jul 3, 2014 at 4:39 AM, Ian Abbott abbo...@mev.co.uk wrote: On 2014-07-03 03:15, Chase Southwood wrote: This patchset moves a misplaced include to the proper file, swaps out an overly aggressive placement of apci1564_reset(), and cleans up apci1564_interrupt(). Chase Southwood (3

[PATCH v2 3/3] staging: comedi: addi_apci_1564: clean up apci1564_interrupt()

2014-07-02 Thread Chase Southwood
for the register is is accessing, so we can handle all four counters with a for loop. Finally, the interrupt handler is incorrectly setting and then checking devpriv->timer_select_mode before processing some of the triggered interrupts, so just remove all occurrences of this. Signed-off-by: Ch

[PATCH v2 1/3] staging: comedi: addi_apci_1564: move addi_watchdog.h include to addi_apci_1564.c

2014-07-02 Thread Chase Southwood
Commit aed3f9d (staging: comedi: addi_apci_1564: absorb apci1564_reset()) moved the only use of addi_watchdog.h from hwdrv_apci1564.c to addi_apci_1564.c, but left the include statement itself in the former file. Move this include to the file which actually uses it. Signed-off-by: Chase

[PATCH v2 2/3] staging: comedi: addi_apci_1564: fix use of apci1564_reset() to disable DI interrupts

2014-07-02 Thread Chase Southwood
, and counters as well. Replace the reset function call with a direct disabling of just the digital input interrupts. Signed-off-by: Chase Southwood Cc: Ian Abbott Cc: H Hartley Sweeten --- drivers/staging/comedi/drivers/addi_apci_1564.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff

[PATCH v2 0/3] staging: comedi: addi_apci_1564: miscellaneous fixes and cleanups

2014-07-02 Thread Chase Southwood
This patchset moves a misplaced include to the proper file, swaps out an overly aggressive placement of apci1564_reset(), and cleans up apci1564_interrupt(). Chase Southwood (3): staging: comedi: addi_apci_1564: move addi_watchdog.h include to addi_apci_1564.c staging: comedi

[PATCH v2 0/3] staging: comedi: addi_apci_1564: miscellaneous fixes and cleanups

2014-07-02 Thread Chase Southwood
This patchset moves a misplaced include to the proper file, swaps out an overly aggressive placement of apci1564_reset(), and cleans up apci1564_interrupt(). Chase Southwood (3): staging: comedi: addi_apci_1564: move addi_watchdog.h include to addi_apci_1564.c staging: comedi

[PATCH v2 1/3] staging: comedi: addi_apci_1564: move addi_watchdog.h include to addi_apci_1564.c

2014-07-02 Thread Chase Southwood
Commit aed3f9d (staging: comedi: addi_apci_1564: absorb apci1564_reset()) moved the only use of addi_watchdog.h from hwdrv_apci1564.c to addi_apci_1564.c, but left the include statement itself in the former file. Move this include to the file which actually uses it. Signed-off-by: Chase

[PATCH v2 2/3] staging: comedi: addi_apci_1564: fix use of apci1564_reset() to disable DI interrupts

2014-07-02 Thread Chase Southwood
, and counters as well. Replace the reset function call with a direct disabling of just the digital input interrupts. Signed-off-by: Chase Southwood chase.southw...@gmail.com Cc: Ian Abbott abbo...@mev.co.uk Cc: H Hartley Sweeten hswee...@visionengravers.com --- drivers/staging/comedi/drivers/addi_apci_1564

[PATCH v2 3/3] staging: comedi: addi_apci_1564: clean up apci1564_interrupt()

2014-07-02 Thread Chase Southwood
for the register is is accessing, so we can handle all four counters with a for loop. Finally, the interrupt handler is incorrectly setting and then checking devpriv-timer_select_mode before processing some of the triggered interrupts, so just remove all occurrences of this. Signed-off-by: Chase

Re: [PATCH 0/3] staging: comedi: addi_apci_1564: miscellaneous fixes and cleanups

2014-07-01 Thread Chase Southwood
Hi all, On Mon, Jun 30, 2014 at 5:25 AM, Ian Abbott wrote: > On 2014-06-28 05:47, Chase Southwood wrote: >> >> This patchset moves a misplaced include to the proper file, swaps out an >> overly >> aggressive placement of apci1564_reset(), and cleans up >>

Re: [PATCH 0/3] staging: comedi: addi_apci_1564: miscellaneous fixes and cleanups

2014-07-01 Thread Chase Southwood
Hi all, On Mon, Jun 30, 2014 at 5:25 AM, Ian Abbott abbo...@mev.co.uk wrote: On 2014-06-28 05:47, Chase Southwood wrote: This patchset moves a misplaced include to the proper file, swaps out an overly aggressive placement of apci1564_reset(), and cleans up apci1564_interrupt(). Chase

[PATCH 3/3] staging: comedi: addi_apci_1564: clean up apci1564_interrupt()

2014-06-27 Thread Chase Southwood
of devpriv->timer_select_mode before processing any triggered interrupts, remove all occurrences of this. Signed-off-by: Chase Southwood Cc: Ian Abbott Cc: H Hartley Sweeten --- Hartley, I remember that you mentioned that the counters could be handled using a for loop here. Is there a better

[PATCH 2/3] staging: comedi: addi_apci_1564: fix use of apci1564_reset() to disable DI interrupts

2014-06-27 Thread Chase Southwood
, and counters as well. Replace the reset function call with a direct disabling of just the digital input interrupts. Signed-off-by: Chase Southwood Cc: Ian Abbott Cc: H Hartley Sweeten --- drivers/staging/comedi/drivers/addi_apci_1564.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff

  1   2   3   4   5   >