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
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
`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
, 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
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
`
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
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
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
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
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.
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
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
.
--
-=( 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
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
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/
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
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/
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/
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/
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: )=-
-=(
/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
, 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
)) {
- 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
);
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
/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
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
,
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/
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
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
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
/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
)
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
/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
_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
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
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
(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
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
.
--
-=( 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
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 |
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
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
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:
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
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
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
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
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
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
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
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
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
.
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
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
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
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
_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
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
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
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
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
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
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
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
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
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
`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
`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
`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
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
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
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
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
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
---
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
`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
`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
`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
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
, 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
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
. 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
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
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
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
/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
. 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
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
.
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
. 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
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
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
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
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
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
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
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
.
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
` 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
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
1001 - 1100 of 2849 matches
Mail list logo