[PATCH 0/5] watchdog: dw_wdt: allow only one probe + various fixes

2015-06-26 Thread Ian Abbott
The dw_wdt watchdog driver supports a single DesignWare watchdog device using a statically allocated variable 'dw_wdt' to manage it, but there are some bits of hardware containing two such devices. If the "probe" is called for more than one device, the 'dw_wdt' variable gets clobbered, generally

[PATCH 0/5] watchdog: dw_wdt: allow only one probe + various fixes

2015-06-26 Thread Ian Abbott
The dw_wdt watchdog driver supports a single DesignWare watchdog device using a statically allocated variable 'dw_wdt' to manage it, but there are some bits of hardware containing two such devices. If the probe is called for more than one device, the 'dw_wdt' variable gets clobbered, generally

[PATCH 5/5] watchdog: dw_wdt: unqueue timer synchronously on unexpected close

2015-06-26 Thread Ian Abbott
`del_timer_sync()` instead of `del_timer()`. Signed-off-by: Ian Abbott abbo...@mev.co.uk --- drivers/watchdog/dw_wdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/watchdog/dw_wdt.c b/drivers/watchdog/dw_wdt.c index daab90b..bf617e3 100644 --- a/drivers/watchdog/dw_wdt.c

[PATCH 2/5] watchdog: dw_wdt: reject additional device probes

2015-06-26 Thread Ian Abbott
, the timer queue gets corrupted, leading to a kernel Oops. Use bit 1 of `dw_wdt.state` to indicate that a device has already been probed, and reject attempts to probe extra devices. Signed-off-by: Ian Abbott abbo...@mev.co.uk --- drivers/watchdog/dw_wdt.c | 25 - 1 file

[PATCH 3/5] watchdog: dw_wdt: only unregister restart handler if registered

2015-06-26 Thread Ian Abbott
in the probe function, and only unregister it in the remove function if so. Signed-off-by: Ian Abbott abbo...@mev.co.uk --- drivers/watchdog/dw_wdt.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/watchdog/dw_wdt.c b/drivers/watchdog/dw_wdt.c index cece633..1cd877b

[PATCH 1/5] watchdog: dw_wdt: prepare for more atomic bits

2015-06-26 Thread Ian Abbott
` member to `state`, define a new macro `DW_WDT_IN_USE` to identify bit 0 as the in-use bit, and replace conditional tests on the whole of `in_use` with single-bit tests on the appropriate bit of `state`. Signed-off-by: Ian Abbott abbo...@mev.co.uk --- drivers/watchdog/dw_wdt.c | 11 +++ 1

[PATCH 4/5] watchdog: dw_wdt: unqueue timer on device removal

2015-06-26 Thread Ian Abbott
The watchdog device's timer may be queued when the platform driver remove function is called. Call `del_timer_sync` to remove it from the queue. Signed-off-by: Ian Abbott abbo...@mev.co.uk --- drivers/watchdog/dw_wdt.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/watchdog

Re: [PATCH v2] staging/comedi: remove unnecessary check around pci_dev_put

2015-06-25 Thread Ian Abbott
oes no harm, but as mentioned by Dan Carpenter, if pcidev could be NULL (which it could be), we should keep the test for readability. -- -=( Ian Abbott @ MEV Ltd.E-mail: )=- -=( Web: http://www.mev.co.uk/ )=- -- To unsubscribe from this list: send the line "unsubscri

Re: [PATCH 1/1] staging/comedi: remove unnecessary check around pci_dev_put

2015-06-25 Thread Ian Abbott
is case. But in other cases, if "pcidev" could be NULL then we should keep the check so that the code is easier to read. So we should keep the check in this case too. -- -=( Ian Abbott @ MEV Ltd.E-mail: )=- -=( Web: http://www.mev.co.uk/ )=- -- To unsubscribe fr

Re: [PATCH 2/2] staging : Comedi : comedi_fops : Fixed the return error code

2015-06-25 Thread Ian Abbott
s for no good reason. -- -=( Ian Abbott @ MEV Ltd.E-mail: )=- -=( Web: http://www.mev.co.uk/ )=- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.

Re: [PATCH 1/1] staging/comedi: remove unnecessary check around pci_dev_put

2015-06-25 Thread Ian Abbott
be NULL then we should keep the check so that the code is easier to read. So we should keep the check in this case too. -- -=( Ian Abbott @ MEV Ltd.E-mail: abbo...@mev.co.uk )=- -=( Web: http://www.mev.co.uk/ )=- -- To unsubscribe from this list: send the line

Re: [PATCH v2] staging/comedi: remove unnecessary check around pci_dev_put

2015-06-25 Thread Ian Abbott
adl_pci9118_driver = { The patch does no harm, but as mentioned by Dan Carpenter, if pcidev could be NULL (which it could be), we should keep the test for readability. -- -=( Ian Abbott @ MEV Ltd.E-mail: abbo...@mev.co.uk )=- -=( Web: http://www.mev.co.uk

Re: [PATCH 2/2] staging : Comedi : comedi_fops : Fixed the return error code

2015-06-25 Thread Ian Abbott
. -- -=( Ian Abbott @ MEV Ltd.E-mail: abbo...@mev.co.uk )=- -=( Web: http://www.mev.co.uk/ )=- -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org

Re: [PATCH v3] staging: comedi: fix cast warning in comedi_compat32.c

2015-06-22 Thread Ian Abbott
err |= __get_user(temp.uptr, >data); Looks okay now apart from it being ugly, but that can't be helped since comedi uses that chanlist member for both user and kernel addresses! Reviewed-by: Ian Abbott -- -=( Ian Abbott @ MEV Ltd.E-mail: )=- -=( W

Re: [PATCH v3 2/2] staging: comedi: das16m1: fix lines over 80 characters

2015-06-22 Thread Ian Abbott
le changed, 10 insertions(+), 7 deletions(-) Reviewed-by: Ian Abbott -- -=( Ian Abbott @ MEV Ltd.E-mail: )=- -=( Web: http://www.mev.co.uk/ )=- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in Please read the FAQ at http://www.tux.org/lkml/

Re: [PATCH v3 1/2] staging: comedi: das16m1: no space before tabs

2015-06-22 Thread Ian Abbott
file changed, 12 insertions(+), 12 deletions(-) Reviewed-by: Ian Abbott -- -=( Ian Abbott @ MEV Ltd.E-mail: )=- -=( Web: http://www.mev.co.uk/ )=- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in Please read the FA

Re: [PATCH v2 1/2] staging: comedi: no space before tabs

2015-06-22 Thread Ian Abbott
of comedi. -- -=( Ian Abbott @ MEV Ltd.E-mail: )=- -=( Web: http://www.mev.co.uk/ )=- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in Please read the FAQ at http://www.tux.org/lkml/

Re: [PATCH] staging: comedi: don't split Author string

2015-06-22 Thread Ian Abbott
ntioned the name of the module, but this is the only one in COMEDI with a split author line. Reviewed-by: Ian Abbott -- -=( Ian Abbott @ MEV Ltd.E-mail: )=- -=( Web: http://www.mev.co.uk/ )=- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in Please read the FAQ at http://www.tux.org/lkml/

Re: [PATCH v2] staging: comedi: fix cast warning in comedi_compat32.c

2015-06-22 Thread Ian Abbott
work. Your first patch was better, apart from exceeding the 80 character line limit. -- -=( Ian Abbott @ MEV Ltd.E-mail: )=- -=( Web: http://www.mev.co.uk/ )=- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in Please read the FAQ at http://www.tux.org/lkml/

Re: [PATCH] staging : Comedi : comedi_fops : Fixed the return error code

2015-06-22 Thread Ian Abbott
rc = -ENOSYS; + rc = -EPERM; Why -EPERM? I think either -ENODEV or -ENXIO would be better. goto out; } if (dev->open) { -- 1.7.9.5 -- -=( Ian Abbott @ MEV Ltd.E-mail: )=- -=(

Re: [PATCH v2 0/6] Staging: comedi: Simplify a trivial if-return sequence

2015-06-22 Thread Ian Abbott
/staging/comedi/drivers/s626.c | 6 +- 6 files changed, 7 insertions(+), 31 deletions(-) Looks good. Reviewed-by: Ian Abbott -- -=( Ian Abbott @ MEV Ltd.E-mail: )=- -=( Web: http://www.mev.co.uk/ )=- -- To unsubscribe from this list: send the line

Re: [PATCH v3] staging: comedi: fix cast warning in comedi_compat32.c

2015-06-22 Thread Ian Abbott
, cmd-chanlist_len); err |= __get_user(temp.uptr, cmd32-data); Looks okay now apart from it being ugly, but that can't be helped since comedi uses that chanlist member for both user and kernel addresses! Reviewed-by: Ian Abbott abbo...@mev.co.uk -- -=( Ian Abbott @ MEV Ltd.E-mail

Re: [PATCH] staging : Comedi : comedi_fops : Fixed the return error code

2015-06-22 Thread Ian Abbott
)) { - rc = -ENOSYS; + rc = -EPERM; Why -EPERM? I think either -ENODEV or -ENXIO would be better. goto out; } if (dev-open) { -- 1.7.9.5 -- -=( Ian Abbott @ MEV Ltd.E-mail: abbo

Re: [PATCH] staging: comedi: don't split Author string

2015-06-22 Thread Ian Abbott
); Okay, it would be nice if the patch subject line mentioned the name of the module, but this is the only one in COMEDI with a split author line. Reviewed-by: Ian Abbott abbo...@mev.co.uk -- -=( Ian Abbott @ MEV Ltd.E-mail: abbo...@mev.co.uk )=- -=( Web: http

Re: [PATCH v2 0/6] Staging: comedi: Simplify a trivial if-return sequence

2015-06-22 Thread Ian Abbott
/staging/comedi/drivers/s626.c | 6 +- 6 files changed, 7 insertions(+), 31 deletions(-) Looks good. Reviewed-by: Ian Abbott abbo...@mev.co.uk -- -=( Ian Abbott @ MEV Ltd.E-mail: abbo...@mev.co.uk )=- -=( Web: http://www.mev.co.uk/ )=- -- To unsubscribe

Re: [PATCH v2] staging: comedi: fix cast warning in comedi_compat32.c

2015-06-22 Thread Ian Abbott
to compat_ptr(), so it won't work. Your first patch was better, apart from exceeding the 80 character line limit. -- -=( Ian Abbott @ MEV Ltd.E-mail: abbo...@mev.co.uk )=- -=( Web: http://www.mev.co.uk/ )=- -- To unsubscribe from this list: send the line unsubscribe

Re: [PATCH v2 1/2] staging: comedi: no space before tabs

2015-06-22 Thread Ian Abbott
, not the whole of comedi. -- -=( Ian Abbott @ MEV Ltd.E-mail: abbo...@mev.co.uk )=- -=( Web: http://www.mev.co.uk/ )=- -- To unsubscribe from this list: send the line unsubscribe linux-kernel in Please read the FAQ at http://www.tux.org/lkml/

Re: [PATCH v3 2/2] staging: comedi: das16m1: fix lines over 80 characters

2015-06-22 Thread Ian Abbott
file changed, 10 insertions(+), 7 deletions(-) Reviewed-by: Ian Abbott abbo...@mev.co.uk -- -=( Ian Abbott @ MEV Ltd.E-mail: abbo...@mev.co.uk )=- -=( Web: http://www.mev.co.uk/ )=- -- To unsubscribe from this list: send the line unsubscribe linux-kernel in Please

Re: [PATCH v3 1/2] staging: comedi: das16m1: no space before tabs

2015-06-22 Thread Ian Abbott
1 file changed, 12 insertions(+), 12 deletions(-) Reviewed-by: Ian Abbott abbo...@mev.co.uk -- -=( Ian Abbott @ MEV Ltd.E-mail: abbo...@mev.co.uk )=- -=( Web: http://www.mev.co.uk/ )=- -- To unsubscribe from this list: send the line unsubscribe

Re: [PATCH] staging: comedi: fix sparse warning in ni_mio_common.c

2015-06-20 Thread Ian Abbott
if (channel == 4) return 0x3; if (channel == 5) Surely that's a false positive sparse warning? -- -=( Ian Abbott @ MEV Ltd.E-mail: )=- -=( Web: http://www.mev.co.uk/ )=- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel

Re: [PATCH 0/6] Staging: comedi: Simplify a trivial if-return sequence

2015-06-20 Thread Ian Abbott
/drivers/s626.c | 6 +- Looks good apart from the checkpatch warning in patch 3 as pointed out by Sudip. For patches 1-2 and 4-6: Reviewed-by: Ian Abbott -- -=( Ian Abbott @ MEV Ltd.E-mail: )=- -=( Web: http://www.mev.co.uk/ )=- -- To unsubscribe from

Re: [PATCH] staging: comedi: fix sparse warning in ni_mio_common.c

2015-06-20 Thread Ian Abbott
) return 0x3; if (channel == 5) Surely that's a false positive sparse warning? -- -=( Ian Abbott @ MEV Ltd.E-mail: abbo...@mev.co.uk )=- -=( Web: http://www.mev.co.uk/ )=- -- To unsubscribe from this list: send the line unsubscribe linux

Re: [PATCH 0/6] Staging: comedi: Simplify a trivial if-return sequence

2015-06-20 Thread Ian Abbott
/drivers/s626.c | 6 +- Looks good apart from the checkpatch warning in patch 3 as pointed out by Sudip. For patches 1-2 and 4-6: Reviewed-by: Ian Abbott abbo...@mev.co.uk -- -=( Ian Abbott @ MEV Ltd.E-mail: abbo...@mev.co.uk )=- -=( Web: http

Re: [PATCH] Staging: comedi: Simplify a trivial if-return sequence

2015-06-16 Thread Ian Abbott
_cb, dioP2ExpansionIO8Bit); That 'dioP2ExpansionIO8Bit' line could do with being un-indented by a couple of spaces so it still lines up with the 'dev' on the preceding line. -- -=( Ian Abbott @ MEV Ltd.E-mail: )=- -=( Web: http://www.mev.co

Re: [PATCH v2] drivers/staging/comedi/drivers/pcl816.c: style fix

2015-06-16 Thread Ian Abbott
el or range number! chanlist[%i]=%d,%d,%d and not %d,%d,%d!\n", i, CR_CHAN(chansegment[i]), Thanks, but it's also fixed by commit 8b4e7da516aa in linux-next. -- -=( Ian Abbott @ MEV Ltd.E-mail: )=- -=( Web: http

Re: [PATCH v2] drivers/staging/comedi/drivers/pcl816.c: style fix

2015-06-16 Thread Ian Abbott
or range number! chanlist[%i]=%d,%d,%d and not %d,%d,%d!\n, i, CR_CHAN(chansegment[i]), Thanks, but it's also fixed by commit 8b4e7da516aa in linux-next. -- -=( Ian Abbott @ MEV Ltd.E-mail: abbo...@mev.co.uk )=- -=( Web: http

Re: [PATCH] Staging: comedi: Simplify a trivial if-return sequence

2015-06-16 Thread Ian Abbott
(dev, s, daqboard2000_8255_cb, dioP2ExpansionIO8Bit); That 'dioP2ExpansionIO8Bit' line could do with being un-indented by a couple of spaces so it still lines up with the 'dev' on the preceding line. -- -=( Ian Abbott @ MEV Ltd.E-mail: abbo...@mev.co.uk

Re: [PATCH] staging: comedi: replace ENOSYS by proper error codes

2015-06-14 Thread Ian Abbott
return -ENOSYS; + return -ENOTTY; That is reasonable. It shouldn't happen anyway if 'f' really is linked to a tty device. And the return value is currently ignored anyway! } static int serial2002_tty_write(struct file *f, unsigned char *buf, int count) As Greg mentioned, it

Re: [PATCH] staging: comedi: replace ENOSYS by proper error codes

2015-06-14 Thread Ian Abbott
. -- -=( Ian Abbott @ MEV Ltd.E-mail: abbo...@mev.co.uk )=- -=( Web: http://www.mev.co.uk/ )=- -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org

[PATCH] staging: comedi: cb_pcimdas: fix handlers for DI and DO subdevices

2015-06-12 Thread Ian Abbott
ename them for consistency. Fixes: e56d03dee14a ("staging: comedi: cb_pcimdas: add main connector digital input/output") Signed-off-by: Ian Abbott --- I left the "Fixes:" line non-line-wrapped. Is that the correct thing to do? --- drivers/staging/comedi/drivers/cb_pcimdas.c |

[PATCH] staging: comedi: cb_pcimdas: fix handlers for DI and DO subdevices

2015-06-12 Thread Ian Abbott
for consistency. Fixes: e56d03dee14a (staging: comedi: cb_pcimdas: add main connector digital input/output) Signed-off-by: Ian Abbott abbo...@mev.co.uk --- I left the Fixes: line non-line-wrapped. Is that the correct thing to do? --- drivers/staging/comedi/drivers/cb_pcimdas.c | 8 1 file changed

[PATCH 01/32] staging: comedi: das08.h: reformat copyright comment

2015-06-05 Thread Ian Abbott
Reformat the copyright comment at the top of the file to use the preferred block comment style. Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/das08.h | 32 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/drivers/staging/comedi

[PATCH 00/32] staging: comedi: das08: tidy up

2015-06-05 Thread Ian Abbott
Clean up the Comedi "das08" module a bit, mostly for consistent naming of things. 01) staging: comedi: das08.h: reformat copyright comment 02) staging: comedi: das08.h: change description in copyright header comment 03) staging: comedi: das08.h: reformat remaining comments 04) staging:

[PATCH 04/32] staging: comedi: das08: use indexed initializer for AI range table types

2015-06-05 Thread Ian Abbott
f `enum das08_lrange`. Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/das08.c | 20 ++-- drivers/staging/comedi/drivers/das08.h | 5 +++-- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/drivers/staging/comedi/drivers/das08.c b/drivers/staging/co

[PATCH 05/32] staging: comedi: das08: improve test for programmable gain

2015-06-05 Thread Ian Abbott
ointer for boards that support programmable gain. This will also allow range tables to be included for convenience for those boards that support multiple ranges by DIP switches. Those boards are currently initialized to use a single "unknown" range. Signed-off-by: Ian Abbott --- driver

[PATCH 07/32] staging: comedi: das08: rename DAS08_LSB and DAS08_MSB

2015-06-05 Thread Ian Abbott
The `DAS08_LSB` and `DAS08_MSB` macros contain the offsets to the least-significant and most-significant analog input data registers. Rename them to `DAS08_AI_LSB_REG` and `DAS08_AI_MSB_REG` respectively and add comments to document them. Signed-off-by: Ian Abbott --- drivers/staging/comedi

[PATCH 02/32] staging: comedi: das08.h: change description in copyright header comment

2015-06-05 Thread Ian Abbott
cription in "das08.c" (the common module for the DAS08 ISA/PCI/PCMCIA drivers). Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/das08.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/comedi/drivers/das08.h b/drivers/staging/comedi/drivers/d

[PATCH 03/32] staging: comedi: das08.h: reformat remaining comments

2015-06-05 Thread Ian Abbott
Reformat remaining comments to use the preferred style for single-line and block comments. Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/das08.h | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/staging/comedi/drivers/das08.h b/drivers/staging

[PATCH 08/32] staging: comedi: das08: rename DAS08_TRIG_12BIT

2015-06-05 Thread Ian Abbott
The `DAS08_TRIG_12BIT` macro contains the offset to the write-only software trigger register for 12-bit or 16-bit analog-to-digital conversions. Rename the macro to `DAS08_AI_TRIG_REG` and add a comment. Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/das08.c | 4 ++-- 1 file

[PATCH 10/32] staging: comedi: das08: rename and rewrite DAS08_EOC

2015-06-05 Thread Ian Abbott
a comment. Also make use of the `BIT()` macro to define the value. Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/das08.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/comedi/drivers/das08.c b/drivers/staging/comedi/drivers/das08.c ind

[PATCH 09/32] staging: comedi: das08: rename DAS08_STATUS

2015-06-05 Thread Ian Abbott
The `DAS08_STATUS` macro contains the offset to the read-only status register. Rename it to `DAS08_STATUS_REG` and add a comment. Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/das08.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging

[PATCH 11/32] staging: comedi: das08: rename and rewrite DAS08_IRQ

2015-06-05 Thread Ian Abbott
t is not used on "JR" boards. Rename the macro to `DAS08_STATUS_IRQ` and add a comment. Also use the `BIT()` macro to define the value. Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/das08.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/sta

[PATCH 14/32] staging: comedi: das08: rename DAS08_MUX() and DAS08_MUX_MASK

2015-06-05 Thread Ian Abbott
. Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/das08.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/staging/comedi/drivers/das08.c b/drivers/staging/comedi/drivers/das08.c index b43bc2d..f0ee617 100644 --- a/drivers/staging/comedi/drivers

[PATCH 16/32] staging: comedi: das08: rename DAS08_OP() and DAS08_DO_MASK

2015-06-05 Thread Ian Abbott
nd returns the corresponding bits for the control register (except on "JR" boards). Rename it to `DAS08_CONTROL_DO(x)` and add a comment. Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/das08.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/st

[PATCH 13/32] staging: comedi: das08: rename DAS08_CONTROL

2015-06-05 Thread Ian Abbott
The `DAS08_CONTROL` macro contains the offset to the write-only control register. Rename it to `DAS08_CONTROL_REG` and add a comment. Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/das08.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging

[PATCH 17/32] staging: comedi: das08: rename and split DAS08JR_DIO

2015-06-05 Thread Ian Abbott
8JR_DO_REG` for the digital output register, and add some comments. Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/das08.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/staging/comedi/drivers/das08.c b/drivers/staging/comedi/drivers/das08.c index 76e35d

[PATCH 18/32] staging: comedi: das08: rename DAS08JR_AO_LSB() and DAS08JR_AO_MSB()

2015-06-05 Thread Ian Abbott
_LSB_REG(x)` and `DAS08JR_AO_MSB_REG(x)` respectively, and add some comments. Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/das08.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/staging/comedi/drivers/das08.c b/drivers/staging/comedi/drivers/das

[PATCH 20/32] staging: comedi: das08: replace DAS08AO_GAIN_CONTROL/STATUS

2015-06-05 Thread Ian Abbott
as the driver does not use it and the read-only parts of the register are documented in the comment. Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/das08.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/staging/comedi/drivers/das08.c

[PATCH 21/32] staging: comedi: das08: rename DAS08AO_AO_LSB() and DAS08AO_AO_MSB()

2015-06-05 Thread Ian Abbott
cros to `DAS08AOX_AO_LSB_REG(x)` and `DAS08AOX_AO_MSB_REG(x)` respectively, and add some comments. Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/das08.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/staging/comedi/drivers/das08.c b/drivers/staging/comedi

[PATCH 22/32] staging: comedi: das08: rename DAS08AO_AO_UPDATE

2015-06-05 Thread Ian Abbott
channel 0's low byte register. The `DAS08AO_AO_UPDATE` macro contains the offset to the low byte register for analog output channel 0 on the "AOL", "AOM", and "AOH" boards, which the driver reads to update the analog outputs. Rename the macro to `DAS08AOX_AO_UPDATE_REG` and add

[PATCH 23/32] staging: comedi: das08: remove board register map comments

2015-06-05 Thread Ian Abbott
block comment style. If anywhere, they should probably be in the "das08_isa" module. Just remove them. The comments for the register macros indicate which boards they apply to anyway, so we don't lose much information. Signed-off-by: Ian Abbott --- drivers/stagi

[PATCH 25/32] staging: comedi: das08.c: reformat remaining comments

2015-06-05 Thread Ian Abbott
Use the preferred style for block comments. Squash double spaces after the comment opening sequence for single-line comments. Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/das08.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/staging/comedi

[PATCH 15/32] staging: comedi: das08: rename and rewrite DAS08_INTE

2015-06-05 Thread Ian Abbott
INTE` and add a comment. Also use the `BIT()` macro to define its value. (Note: the driver does not currently enable interrupts.) Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/das08.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/comedi/driv

[PATCH 24/32] staging: comedi: das08.c: reformat copyright comment

2015-06-05 Thread Ian Abbott
Replace double spaces with single spaces at the start of each line in the copyright comment at the top of the file. Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/das08.c | 28 ++-- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/drivers

[PATCH 26/32] staging: comedi: das08: rename ai range tables

2015-06-05 Thread Ian Abbott
The `range_das08_pgl`, `range_das08_pgm`, and `range_das08_pgh` variables define the analog input ranges for the "PGL", "PGM", and "PGH" board variants, and are also used for the "AOL", "AOM", and "AOH" board variants. Rename them to

[PATCH 19/32] staging: comedi: das08: add DAS08JR_AO_UPDATE_REG

2015-06-05 Thread Ian Abbott
code more explicit, add a macro `DAS08JR_AO_UPDATE_REG` with the same value as the `DAS08JR_DI_REG` macro (for digital inputs) and use it when reading the register to update the analog outputs. Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/das08.c | 7 ++- 1 file changed, 6 insert

[PATCH 28/32] staging: comedi: das08: rename das08_ai_rinsn()

2015-06-05 Thread Ian Abbott
`das08_ai_rinsn()` is the handler for Comedi `INSN_READ` instructions for the AI subdevice. Rename the function to `das08_ai_insn_read()` for consistency. Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/das08.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff

[PATCH 29/32] staging: comedi: das08: rename das08_di_rbits() & das08jr_di_rbits()

2015-06-05 Thread Ian Abbott
`das08_di_rbits()` and `das08jr_di_rbits()` are handlers for the Comedi `INSN_BITS` instruction for the digital input subdevice on "non-JR" and "JR" boards, respectively. Rename them to `das08_di_insn_bits()` and `das08jr_di_insn_bits()` respectively for consistency. Signe

[PATCH 30/32] staging: comedi: das08: rename das08_do_wbits() & das08jr_do_wbits()

2015-06-05 Thread Ian Abbott
`das08_do_wbits()` and `das08jr_do_wbits()` are handlers for the Comedi `INSN_BITS` instruction for the digital output subdevice on "non-JR" and "JR" boards, respectively. Rename them to `das08_do_insn_bits()` and `das08jr_do_insn_bits()` respectively for consistency. Signe

[PATCH 32/32] staging: comedi: das08: use better MODULE_DESCRIPTION()

2015-06-05 Thread Ian Abbott
Replace the boiler-plate Comedi module description string with something more specific. Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/das08.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/comedi/drivers/das08.c b/drivers/staging/comedi

[PATCH 31/32] staging: comedi: das08: clarify sign-magnitude conversion

2015-06-05 Thread Ian Abbott
initially supported by a patch from an external contributor to the COMEDI project back in 2001. Assume the code is correct for now, but add a comment to mention the discrepancy. Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/das08.c | 21 ++--- 1 file changed, 18

[PATCH 06/32] staging: comedi: das08.h: make self-reliant

2015-06-05 Thread Ian Abbott
n the parameter list of a function prototype, so just declare `struct comedi_device` as an incomplete type. It also uses `bool`, so include to declare it. Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/das08.h | 4 1 file changed, 4 insertions(+) diff --git a/drivers/staging/comed

[PATCH 27/32] staging: comedi: das08: rename the gainlist variables

2015-06-05 Thread Ian Abbott
input Comedi subdevice. Rename the variables to reflect that. Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/das08.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/staging/comedi/drivers/das08.c b/drivers/staging/comedi/drivers/das08.c

[PATCH 12/32] staging: comedi: das08: rename and rewrite DAS08_IP

2015-06-05 Thread Ian Abbott
onsistency with other register macros. Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/das08.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/staging/comedi/drivers/das08.c b/drivers/staging/comedi/drivers/das08.c index 935bbfb..eef0456 100644 ---

[PATCH 32/32] staging: comedi: das08: use better MODULE_DESCRIPTION()

2015-06-05 Thread Ian Abbott
Replace the boiler-plate Comedi module description string with something more specific. Signed-off-by: Ian Abbott abbo...@mev.co.uk --- drivers/staging/comedi/drivers/das08.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/comedi/drivers/das08.c b/drivers

[PATCH 30/32] staging: comedi: das08: rename das08_do_wbits() das08jr_do_wbits()

2015-06-05 Thread Ian Abbott
`das08_do_wbits()` and `das08jr_do_wbits()` are handlers for the Comedi `INSN_BITS` instruction for the digital output subdevice on non-JR and JR boards, respectively. Rename them to `das08_do_insn_bits()` and `das08jr_do_insn_bits()` respectively for consistency. Signed-off-by: Ian Abbott abbo

[PATCH 29/32] staging: comedi: das08: rename das08_di_rbits() das08jr_di_rbits()

2015-06-05 Thread Ian Abbott
`das08_di_rbits()` and `das08jr_di_rbits()` are handlers for the Comedi `INSN_BITS` instruction for the digital input subdevice on non-JR and JR boards, respectively. Rename them to `das08_di_insn_bits()` and `das08jr_di_insn_bits()` respectively for consistency. Signed-off-by: Ian Abbott abbo

[PATCH 28/32] staging: comedi: das08: rename das08_ai_rinsn()

2015-06-05 Thread Ian Abbott
`das08_ai_rinsn()` is the handler for Comedi `INSN_READ` instructions for the AI subdevice. Rename the function to `das08_ai_insn_read()` for consistency. Signed-off-by: Ian Abbott abbo...@mev.co.uk --- drivers/staging/comedi/drivers/das08.c | 7 --- 1 file changed, 4 insertions(+), 3

[PATCH 26/32] staging: comedi: das08: rename ai range tables

2015-06-05 Thread Ian Abbott
The `range_das08_pgl`, `range_das08_pgm`, and `range_das08_pgh` variables define the analog input ranges for the PGL, PGM, and PGH board variants, and are also used for the AOL, AOM, and AOH board variants. Rename them to use the `das08_` prefix for consistency. Signed-off-by: Ian Abbott abbo

[PATCH 19/32] staging: comedi: das08: add DAS08JR_AO_UPDATE_REG

2015-06-05 Thread Ian Abbott
, add a macro `DAS08JR_AO_UPDATE_REG` with the same value as the `DAS08JR_DI_REG` macro (for digital inputs) and use it when reading the register to update the analog outputs. Signed-off-by: Ian Abbott abbo...@mev.co.uk --- drivers/staging/comedi/drivers/das08.c | 7 ++- 1 file changed, 6

[PATCH 09/32] staging: comedi: das08: rename DAS08_STATUS

2015-06-05 Thread Ian Abbott
The `DAS08_STATUS` macro contains the offset to the read-only status register. Rename it to `DAS08_STATUS_REG` and add a comment. Signed-off-by: Ian Abbott abbo...@mev.co.uk --- drivers/staging/comedi/drivers/das08.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git

[PATCH 10/32] staging: comedi: das08: rename and rewrite DAS08_EOC

2015-06-05 Thread Ian Abbott
. Also make use of the `BIT()` macro to define the value. Signed-off-by: Ian Abbott abbo...@mev.co.uk --- drivers/staging/comedi/drivers/das08.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/comedi/drivers/das08.c b/drivers/staging/comedi/drivers/das08.c

[PATCH 08/32] staging: comedi: das08: rename DAS08_TRIG_12BIT

2015-06-05 Thread Ian Abbott
The `DAS08_TRIG_12BIT` macro contains the offset to the write-only software trigger register for 12-bit or 16-bit analog-to-digital conversions. Rename the macro to `DAS08_AI_TRIG_REG` and add a comment. Signed-off-by: Ian Abbott abbo...@mev.co.uk --- drivers/staging/comedi/drivers/das08.c | 4

[PATCH 03/32] staging: comedi: das08.h: reformat remaining comments

2015-06-05 Thread Ian Abbott
Reformat remaining comments to use the preferred style for single-line and block comments. Signed-off-by: Ian Abbott abbo...@mev.co.uk --- drivers/staging/comedi/drivers/das08.h | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/staging/comedi/drivers/das08.h b

[PATCH 07/32] staging: comedi: das08: rename DAS08_LSB and DAS08_MSB

2015-06-05 Thread Ian Abbott
The `DAS08_LSB` and `DAS08_MSB` macros contain the offsets to the least-significant and most-significant analog input data registers. Rename them to `DAS08_AI_LSB_REG` and `DAS08_AI_MSB_REG` respectively and add comments to document them. Signed-off-by: Ian Abbott abbo...@mev.co.uk --- drivers

[PATCH 02/32] staging: comedi: das08.h: change description in copyright header comment

2015-06-05 Thread Ian Abbott
/PCI/PCMCIA drivers). Signed-off-by: Ian Abbott abbo...@mev.co.uk --- drivers/staging/comedi/drivers/das08.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/comedi/drivers/das08.h b/drivers/staging/comedi/drivers/das08.h index 57c7640..388855e 100644

[PATCH 11/32] staging: comedi: das08: rename and rewrite DAS08_IRQ

2015-06-05 Thread Ian Abbott
. Rename the macro to `DAS08_STATUS_IRQ` and add a comment. Also use the `BIT()` macro to define the value. Signed-off-by: Ian Abbott abbo...@mev.co.uk --- drivers/staging/comedi/drivers/das08.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/staging/comedi/drivers

[PATCH 24/32] staging: comedi: das08.c: reformat copyright comment

2015-06-05 Thread Ian Abbott
Replace double spaces with single spaces at the start of each line in the copyright comment at the top of the file. Signed-off-by: Ian Abbott abbo...@mev.co.uk --- drivers/staging/comedi/drivers/das08.c | 28 ++-- 1 file changed, 14 insertions(+), 14 deletions(-) diff

[PATCH 22/32] staging: comedi: das08: rename DAS08AO_AO_UPDATE

2015-06-05 Thread Ian Abbott
. The `DAS08AO_AO_UPDATE` macro contains the offset to the low byte register for analog output channel 0 on the AOL, AOM, and AOH boards, which the driver reads to update the analog outputs. Rename the macro to `DAS08AOX_AO_UPDATE_REG` and add a comment. Signed-off-by: Ian Abbott abbo...@mev.co.uk --- drivers/staging

[PATCH 23/32] staging: comedi: das08: remove board register map comments

2015-06-05 Thread Ian Abbott
. If anywhere, they should probably be in the das08_isa module. Just remove them. The comments for the register macros indicate which boards they apply to anyway, so we don't lose much information. Signed-off-by: Ian Abbott abbo...@mev.co.uk --- drivers/staging/comedi/drivers/das08.c | 68

[PATCH 25/32] staging: comedi: das08.c: reformat remaining comments

2015-06-05 Thread Ian Abbott
Use the preferred style for block comments. Squash double spaces after the comment opening sequence for single-line comments. Signed-off-by: Ian Abbott abbo...@mev.co.uk --- drivers/staging/comedi/drivers/das08.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers

[PATCH 15/32] staging: comedi: das08: rename and rewrite DAS08_INTE

2015-06-05 Thread Ian Abbott
the `BIT()` macro to define its value. (Note: the driver does not currently enable interrupts.) Signed-off-by: Ian Abbott abbo...@mev.co.uk --- drivers/staging/comedi/drivers/das08.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/comedi/drivers/das08.c b/drivers

[PATCH 27/32] staging: comedi: das08: rename the gainlist variables

2015-06-05 Thread Ian Abbott
input Comedi subdevice. Rename the variables to reflect that. Signed-off-by: Ian Abbott abbo...@mev.co.uk --- drivers/staging/comedi/drivers/das08.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/staging/comedi/drivers/das08.c b/drivers/staging/comedi

[PATCH 06/32] staging: comedi: das08.h: make self-reliant

2015-06-05 Thread Ian Abbott
of a function prototype, so just declare `struct comedi_device` as an incomplete type. It also uses `bool`, so include linux/types.h to declare it. Signed-off-by: Ian Abbott abbo...@mev.co.uk --- drivers/staging/comedi/drivers/das08.h | 4 1 file changed, 4 insertions(+) diff --git a/drivers/staging

[PATCH 31/32] staging: comedi: das08: clarify sign-magnitude conversion

2015-06-05 Thread Ian Abbott
initially supported by a patch from an external contributor to the COMEDI project back in 2001. Assume the code is correct for now, but add a comment to mention the discrepancy. Signed-off-by: Ian Abbott abbo...@mev.co.uk --- drivers/staging/comedi/drivers/das08.c | 21 ++--- 1 file

[PATCH 12/32] staging: comedi: das08: rename and rewrite DAS08_IP

2015-06-05 Thread Ian Abbott
with other register macros. Signed-off-by: Ian Abbott abbo...@mev.co.uk --- drivers/staging/comedi/drivers/das08.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/staging/comedi/drivers/das08.c b/drivers/staging/comedi/drivers/das08.c index 935bbfb..eef0456 100644

[PATCH 16/32] staging: comedi: das08: rename DAS08_OP() and DAS08_DO_MASK

2015-06-05 Thread Ian Abbott
the corresponding bits for the control register (except on JR boards). Rename it to `DAS08_CONTROL_DO(x)` and add a comment. Signed-off-by: Ian Abbott abbo...@mev.co.uk --- drivers/staging/comedi/drivers/das08.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/staging

[PATCH 14/32] staging: comedi: das08: rename DAS08_MUX() and DAS08_MUX_MASK

2015-06-05 Thread Ian Abbott
. Signed-off-by: Ian Abbott abbo...@mev.co.uk --- drivers/staging/comedi/drivers/das08.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/staging/comedi/drivers/das08.c b/drivers/staging/comedi/drivers/das08.c index b43bc2d..f0ee617 100644 --- a/drivers

[PATCH 17/32] staging: comedi: das08: rename and split DAS08JR_DIO

2015-06-05 Thread Ian Abbott
` for the digital output register, and add some comments. Signed-off-by: Ian Abbott abbo...@mev.co.uk --- drivers/staging/comedi/drivers/das08.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/staging/comedi/drivers/das08.c b/drivers/staging/comedi/drivers/das08.c index

[PATCH 13/32] staging: comedi: das08: rename DAS08_CONTROL

2015-06-05 Thread Ian Abbott
The `DAS08_CONTROL` macro contains the offset to the write-only control register. Rename it to `DAS08_CONTROL_REG` and add a comment. Signed-off-by: Ian Abbott abbo...@mev.co.uk --- drivers/staging/comedi/drivers/das08.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git

<    6   7   8   9   10   11   12   13   14   15   >