_DRQ_ENA BIT(1)
+#define PCMMIO_AO_STATUS_IRQ_ENA BIT(0)
#define PCMMIO_AO_RESOURCE_ENA_REG0x0b
#define PCMMIO_AO_2ND_DAC_OFFSET 0x04
The macro values used to be more-or-less nicely aligned in a column, but
now they are not
fine WENAB (1 << 7) /* window enable */
+#define WENAB BIT(7) /* window enable */
static int ni_65xx_mite_init(struct pci_dev *pcidev)
{
Thanks!
Reviewed-by: Ian Abbott <abbo...@mev.co.uk>
--
-=( Ian Abbott @ MEV Ltd.E-mail: <abbo...@mev.co.u
data_reg_insn_bits(struct comedi_device *dev,
struct comedi_subdevice *s,
Thanks!
Reviewed-by: Ian Abbott <abbo...@mev.co.uk>
--
-=( Ian Abbott @ MEV Ltd.E-mail: <abbo...@mev.co.uk> )=-
-=( Web: http://www.mev.co.u
quot; line.
Thanks.
--
-=( 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 ht
RL_IRQ_ENA (1 << 4)
-#define PARPORT_CTRL_BIDIR_ENA (1 << 5)
+#define PARPORT_CTRL_IRQ_ENA BIT(4)
+#define PARPORT_CTRL_BIDIR_ENA BIT(5)
static int parport_data_reg_insn_bits(struct comedi_device *dev,
struct comedi_subdevice *s,
--
1.7.10.4
--
-=(
sizeof(struct comedi_lrange *),
+GFP_KERNEL);
if (!range_table_list)
return -ENOMEM;
s->range_table_list = range_table_list;
Seems fine!
Reviewed
);
+ range_table_list = kmalloc_array(32,
+sizeof(struct comedi_lrange *),
+GFP_KERNEL);
if (!range_table_list)
return -ENOMEM;
s->range_table_list = range_
quot; line.
Thanks.
--
-=( 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.ker
struct comedi_subdevice *s,
--
1.7.10.4
--
-=( 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 messa
GFP_KERNEL);
if (!range_table_list)
return -ENOMEM;
s->range_table_list = range_table_list;
--
-=( Ian Abbott @ MEV Ltd.E-mail: )=-
-=( Web: http://www.mev.co.uk/ )=-
--
To unsubscribe from
GFP_KERNEL);
if (!range_table_list)
return -ENOMEM;
s->range_table_list = range_table_list;
--
-=( Ian Abbott @ MEV Ltd.E-mail: <abbo...@mev.co.uk> )=-
-=( W
BIT(5)
+#define PCMMIO_AO_STATUS_IRQ_PEND BIT(4)
+#define PCMMIO_AO_STATUS_DATA_DRQ_ENA BIT(2)
+#define PCMMIO_AO_STATUS_REG_SEL BIT(3)
+#define PCMMIO_AO_STATUS_CMD_DRQ_ENA BIT(1)
+#define PCMMIO_AO_STATUS_IRQ_ENA
BIT(6)
+#define PCMMIO_AO_STATUS_CMD_DMA_PEND BIT(5)
+#define PCMMIO_AO_STATUS_IRQ_PEND BIT(4)
+#define PCMMIO_AO_STATUS_DATA_DRQ_ENA BIT(2)
+#define PCMMIO_AO_STATUS_REG_SEL BIT(3)
+#define PCMMIO_AO_STATUS_CMD_DRQ_ENA BIT(1)
+#define PCMMIO_AO_
BIT(2)
No, that's wrong. (0 << 1) is 0, but BIT(0) is 1.
Hartley already fixed the coding style issue. It's in linux-next.
--
-=( Ian Abbott @ MEV Ltd.E-mail: )=-
-=( Web: http://www.mev.co.uk/ )=-
--
To unsubscribe from this list: send the line "unsubsc
I1032_CTRL_INT_ENA BIT(2)
struct apci1032_private {
unsigned long amcc_iobase; /* base of AMCC I/O registers */
Hartley already fixed this coding style issue. It's in linux-next.
--
-=( Ian Abbott @ MEV Ltd.E-mail: )=-
-=( Web: ht
+#define APCI1032_CTRL_INT_AND BIT(1)
+#define APCI1032_CTRL_INT_ENA BIT(2)
struct apci1032_private {
unsigned long amcc_iobase; /* base of AMCC I/O registers */
Hartley already fixed this coding style issue. It's in linux-next.
--
-=( Ian Abbott @ MEV Ltd.
_AND BIT(1)
#define APCI1032_CTRL_INT_ENA BIT(2)
No, that's wrong. (0 << 1) is 0, but BIT(0) is 1.
Hartley already fixed the coding style issue. It's in linux-next.
--
-=( Ian Abbott @ MEV Ltd.E-mail: <abbo...@mev.co.uk> )=-
-=(
Use the preferred style for multi-line comments.
Signed-off-by: Ian Abbott
---
drivers/staging/comedi/drivers/comedi_test.c | 94 ++--
1 file changed, 47 insertions(+), 47 deletions(-)
diff --git a/drivers/staging/comedi/drivers/comedi_test.c
b/drivers/staging/comedi
the waveform period) will be no more than `INT_MAX + UINT_MAX /
1000`.
Signed-off-by: Ian Abbott
---
drivers/staging/comedi/drivers/comedi_test.c | 14 +++---
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/staging/comedi/drivers/comedi_test.c
b/drivers/staging/comedi
the time since the
start of a waveform exceeds the waveform period. Usually, several
samples are produced in each waveform period and modulo operations are
typically more expensive than a simple comparison.
Signed-off-by: Ian Abbott
---
drivers/staging/comedi/drivers/comedi_test.c | 18
_private`. An
`unsigned int` is still wide enough, because the conversion period is no
more than `UINT_MAX / 1000` microseconds and the number of conversions
is no more than 16 (`N_CHANS * 2`).
Signed-off-by: Ian Abbott
---
drivers/staging/comedi/drivers/comedi_test.c | 64 +++-
ts within an `unsigned int`, as that is used to
limit the minimum scan period (`cmd->scan_begin_arg`).
Also ensure rounding of the conversion period and scan period to the
nearest microsecond both fit in an `unsigned int`. Do all this in stage
4 ("fix up any arguments") of the command testin
Rename the members of `struct waveform_private` that are used to handle
AI commands, apart from those members used to control fake waveform
generation. The renames are `timer` --> `ai_timer`, `scan_period` -->
`ai_scan_period`, and `convert_period` --> `ai_convert_period`.
Signed-of
` that records the time of the last scan. This
simplifies the calculation of the number of scans to simulate in the
timer routine, `waveform_ai_interrupt()`.
Signed-off-by: Ian Abbott
---
drivers/staging/comedi/drivers/comedi_test.c | 27 ++-
1 file changed, 10 insertions
.
Signed-off-by: Ian Abbott
---
drivers/staging/comedi/drivers/comedi_test.c | 13 +
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/comedi/drivers/comedi_test.c
b/drivers/staging/comedi/drivers/comedi_test.c
index 1b3ad7f..9655dc3 100644
--- a/drivers/staging
of
the AI subdevice `waveform_ai_insn_read()`. As the stored sample values
are only 16 bits wide, change the type of the `ao_loopbacks[]` member to
`unsigned short` to save some space.
Signed-off-by: Ian Abbott
---
drivers/staging/comedi/drivers/comedi_test.c | 2 +-
1 file changed, 1 insertion(+), 1 del
rent time within a waveform period).
Signed-off-by: Ian Abbott
---
drivers/staging/comedi/drivers/comedi_test.c | 40 ++--
1 file changed, 20 insertions(+), 20 deletions(-)
diff --git a/drivers/staging/comedi/drivers/comedi_test.c
b/drivers/staging/comedi/drivers/come
on
the analog output subdevice to be read back via corresponding channels
on the analog input subdevice. The "insn_read" handler for the analog
input subdevice is `waveform_ai_insn_read()`. Set that as the
"insn_read" handler for the analog output subdevice as well.
Signed-
Signed-off-by: Ian Abbott
---
drivers/staging/comedi/drivers/comedi_test.c | 85 ++--
1 file changed, 54 insertions(+), 31 deletions(-)
diff --git a/drivers/staging/comedi/drivers/comedi_test.c
b/drivers/staging/comedi/drivers/comedi_test.c
index 468847a..318340c 100644
---
ice. The command
is stopped when the "cancel" handler `waveform_ao_cancel()` is called.
This may be due to the command terminating due to completion or an
error, or as a result of the user cancelling the command.
Signed-off-by: Ian Abbott
---
drivers/staging/comedi/drivers/comedi_test.
`waveform_ai_interrupt()` is a timer expiry function used to generate
fake waveform data for an analog input subdevice. Rename it to
`waveform_ai_timer()`.
Signed-off-by: Ian Abbott
---
drivers/staging/comedi/drivers/comedi_test.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions
The "comedi_test" module is a driver for a dummy COMEDI device. It has
an analog input subdevice and an analog output subdevice. The analog
input subdevice supports COMEDI asynchronous acquisition commands using
waveform generators to generate the input data for each channel. A
kernel timer is
the sample values that
would go out of range. This is closer to how a real hardware device
would behave (assuming the input voltage is not high enough to damage
the hardware!).
Signed-off-by: Ian Abbott
---
drivers/staging/comedi/drivers/comedi_test.c | 29 ++--
1 file changed
The `static const int nano_per_micro` variable is set to 1000, the
number of nanoseconds in a microsecond. Remove it and use the
`NSEC_PER_USEC` macro from instead.
Signed-off-by: Ian Abbott
---
drivers/staging/comedi/drivers/comedi_test.c | 17 +++--
1 file changed, 7 insertions
Rename the members of `struct waveform_private` that are used to handle
AI commands, apart from those members used to control fake waveform
generation. The renames are `timer` --> `ai_timer`, `scan_period` -->
`ai_scan_period`, and `convert_period` --> `ai_convert_period`.
Signed-of
` that records the time of the last scan. This
simplifies the calculation of the number of scans to simulate in the
timer routine, `waveform_ai_interrupt()`.
Signed-off-by: Ian Abbott <abbo...@mev.co.uk>
---
drivers/staging/comedi/drivers/comedi_test.c | 27 ++-
1 file c
.
Signed-off-by: Ian Abbott <abbo...@mev.co.uk>
---
drivers/staging/comedi/drivers/comedi_test.c | 13 +
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/comedi/drivers/comedi_test.c
b/drivers/staging/comedi/drivers/comedi_test.c
index 1b3ad7f..9655dc3
rent time within a waveform period).
Signed-off-by: Ian Abbott <abbo...@mev.co.uk>
---
drivers/staging/comedi/drivers/comedi_test.c | 40 ++--
1 file changed, 20 insertions(+), 20 deletions(-)
diff --git a/drivers/staging/comedi/drivers/comedi_test.c
b/drivers/staging
of
the AI subdevice `waveform_ai_insn_read()`. As the stored sample values
are only 16 bits wide, change the type of the `ao_loopbacks[]` member to
`unsigned short` to save some space.
Signed-off-by: Ian Abbott <abbo...@mev.co.uk>
---
drivers/staging/comedi/drivers/comedi_test.c | 2 +-
1 file
ts within an `unsigned int`, as that is used to
limit the minimum scan period (`cmd->scan_begin_arg`).
Also ensure rounding of the conversion period and scan period to the
nearest microsecond both fit in an `unsigned int`. Do all this in stage
4 ("fix up any arguments") of the command testin
_private`. An
`unsigned int` is still wide enough, because the conversion period is no
more than `UINT_MAX / 1000` microseconds and the number of conversions
is no more than 16 (`N_CHANS * 2`).
Signed-off-by: Ian Abbott <abbo...@mev.co.uk>
---
drivers/staging/com
the sample values that
would go out of range. This is closer to how a real hardware device
would behave (assuming the input voltage is not high enough to damage
the hardware!).
Signed-off-by: Ian Abbott <abbo...@mev.co.uk>
---
drivers/staging/comedi/drivers/comedi_test.
The `static const int nano_per_micro` variable is set to 1000, the
number of nanoseconds in a microsecond. Remove it and use the
`NSEC_PER_USEC` macro from instead.
Signed-off-by: Ian Abbott <abbo...@mev.co.uk>
---
drivers/staging/comedi/drivers/comedi_test.c | 17 +++--
The "comedi_test" module is a driver for a dummy COMEDI device. It has
an analog input subdevice and an analog output subdevice. The analog
input subdevice supports COMEDI asynchronous acquisition commands using
waveform generators to generate the input data for each channel. A
kernel timer is
`waveform_ai_interrupt()` is a timer expiry function used to generate
fake waveform data for an analog input subdevice. Rename it to
`waveform_ai_timer()`.
Signed-off-by: Ian Abbott <abbo...@mev.co.uk>
---
drivers/staging/comedi/drivers/comedi_test.c | 5 ++---
1 file changed, 2 inse
Use the preferred style for multi-line comments.
Signed-off-by: Ian Abbott <abbo...@mev.co.uk>
---
drivers/staging/comedi/drivers/comedi_test.c | 94 ++--
1 file changed, 47 insertions(+), 47 deletions(-)
diff --git a/drivers/staging/comedi/drivers/comedi_tes
the time since the
start of a waveform exceeds the waveform period. Usually, several
samples are produced in each waveform period and modulo operations are
typically more expensive than a simple comparison.
Signed-off-by: Ian Abbott <abbo...@mev.co.uk>
---
drivers/staging/comedi/d
the waveform period) will be no more than `INT_MAX + UINT_MAX /
1000`.
Signed-off-by: Ian Abbott <abbo...@mev.co.uk>
---
drivers/staging/comedi/drivers/comedi_test.c | 14 +++---
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/staging/comedi/drivers/comedi_test.c
b/d
ice. The command
is stopped when the "cancel" handler `waveform_ao_cancel()` is called.
This may be due to the command terminating due to completion or an
error, or as a result of the user cancelling the command.
Signed-off-by: Ian Abbott <abbo...@mev.co.uk>
---
d
Signed-off-by: Ian Abbott <abbo...@mev.co.uk>
---
drivers/staging/comedi/drivers/comedi_test.c | 85 ++--
1 file changed, 54 insertions(+), 31 deletions(-)
diff --git a/drivers/staging/comedi/drivers/comedi_test.c
b/drivers/staging/comedi/drivers/comedi_test.c
index 468847a
on
the analog output subdevice to be read back via corresponding channels
on the analog input subdevice. The "insn_read" handler for the analog
input subdevice is `waveform_ai_insn_read()`. Set that as the
"insn_read" handler for the analog output subdevice as well.
Sign
nscans` to avoid the overflow.
This overflow bug doesn't affect any of the current COMEDI drivers. I
stumbled across it while changing to one of the drivers.
Signed-off-by: Ian Abbott
---
drivers/staging/comedi/drivers.c | 38 +-
1 file changed, 21 insertions(
nscans` to avoid the overflow.
This overflow bug doesn't affect any of the current COMEDI drivers. I
stumbled across it while changing to one of the drivers.
Signed-off-by: Ian Abbott <abbo...@mev.co.uk>
---
drivers/staging/comedi/drivers.c | 38 +-
1 file
ies:
default:
- return 0;
+ return false;
case ni_gpct_variant_m_series:
case ni_gpct_variant_660x:
- return 1;
+ return true;
}
}
Looks okay!
Reviewed-by: Ian Abbott
--
-=( Ian Abbott @ MEV Ltd.E-m
case ni_gpct_variant_e_series:
default:
- return 0;
+ return false;
case ni_gpct_variant_m_series:
case ni_gpct_variant_660x:
- return 1;
+ return true;
}
}
Looks okay!
Reviewed-by: Ian Abbott <abbo...@mev.co.uk&
Fix the checkpatch.pl issues:
CHECK: spaces preferred around that '*' (ctx:VxV)
Signed-off-by: Ian Abbott
---
drivers/staging/comedi/comedidev.h | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/comedi/comedidev.h
b/drivers/staging/comedi
Fix some checkpatch issues in "comedidev.h". There are still some
CamelCase warnings, but since those are for the use of "mA" and it
represents "milliamps", I think I'll leave them alone.
1) staging: comedi: comedidev.h: add comments to spin-lock and mutex
2) staging: comedi: comedidev.h: spaces
Fix the checkpatch.pl issues:
CHECK: spinlock_t definition without comment
CHECK: struct mutes definition withoug comment
Signed-off-by: Ian Abbott
---
drivers/staging/comedi/comedidev.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/comedi
onbusy` doesn't get set to `true` unless
the count is 0, but check the return count anyway to make the intention
clearer.
Signed-off-by: Ian Abbott
---
drivers/staging/comedi/comedi_fops.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/comedi/comedi_fops.c
b/dr
type.
Signed-off-by: Ian Abbott
---
drivers/staging/comedi/comedi_fops.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/staging/comedi/comedi_fops.c
b/drivers/staging/comedi/comedi_fops.c
index cca3fb1..ae9d519 100644
--- a/drivers/staging/comedi/comedi_fops.c
+++ b
At one point in `comedi_read()`, the variable `n` gets assigned to the
minimum of the parameter `nbytes` and the amount of readable buffer
space `m`. The way that is done currently is unsafe in the unlikely
case that `nbytes` exceeds `UINT_MAX`, so fix it.
Signed-off-by: Ian Abbott
---
drivers
as terminated, and has no data available to be read.
Signed-off-by: Ian Abbott
---
drivers/staging/comedi/comedi_fops.c | 13 -
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/comedi/comedi_fops.c
b/drivers/staging/comedi/comedi_fops.c
index 89e8e87..cca
in a
return value of 0 (unless COMEDI instructions are being processed or an
asynchronous command has been set up by a different file object).
Change it to return `-EINVAL` in this case.
Signed-off-by: Ian Abbott
---
drivers/staging/comedi/comedi_fops.c | 7 ++-
1 file changed, 6 insertions
tion" is
currently being processed. `-EINVAL` is returned in other cases.
Simplify it by returning `-EINVAL` for all these cases.
Signed-off-by: Ian Abbott
---
drivers/staging/comedi/comedi_fops.c | 21 +++--
1 file changed, 3 insertions(+), 18 deletions(-)
diff --git a/drive
subdevice to be marked as non-busy, and the return
value does not indicate an "end-of-file" condition.
Signed-off-by: Ian Abbott
---
drivers/staging/comedi/comedi_fops.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/comedi/comedi_fops.c
b/dr
d directly through the mmapped
buffer instead of via the "read" file operation.)
Signed-off-by: Ian Abbott
---
drivers/staging/comedi/comedi_fops.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/comedi/comedi_fops.c
b/drivers/staging/comedi/com
it to deal with the wraparound using two calls to
`copy_to_user()` if necessary.
Signed-off-by: Ian Abbott
---
drivers/staging/comedi/comedi_fops.c | 14 ++
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/comedi/comedi_fops.c
b/drivers/staging/comedi
`comedi_read()` initializes `retval` to 0. The other `retval = 0`
assignments are superfluous, so remove them.
Signed-off-by: Ian Abbott
---
drivers/staging/comedi/comedi_fops.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/staging/comedi/comedi_fops.c
b/drivers/staging/comedi
Tidy up the "read" file operation handler, `comedi_read()` a bit and
improve the error handling and the "end-of-file" handling.
There are some other changes I want to make, such as switching to the
newer wait API (prepare_to_wait()/finish_wait()) and preventing several
tasks trying to read or
At one point in `comedi_read()`, the variable `n` gets assigned to the
minimum of the parameter `nbytes` and the amount of readable buffer
space `m`. The way that is done currently is unsafe in the unlikely
case that `nbytes` exceeds `UINT_MAX`, so fix it.
Signed-off-by: Ian Abbott <a
as terminated, and has no data available to be read.
Signed-off-by: Ian Abbott <abbo...@mev.co.uk>
---
drivers/staging/comedi/comedi_fops.c | 13 -
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/comedi/comedi_fops.c
b/drivers/staging/comedi/comedi
`comedi_read()` initializes `retval` to 0. The other `retval = 0`
assignments are superfluous, so remove them.
Signed-off-by: Ian Abbott <abbo...@mev.co.uk>
---
drivers/staging/comedi/comedi_fops.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/staging/comedi/comedi_fop
Tidy up the "read" file operation handler, `comedi_read()` a bit and
improve the error handling and the "end-of-file" handling.
There are some other changes I want to make, such as switching to the
newer wait API (prepare_to_wait()/finish_wait()) and preventing several
tasks trying to read or
onbusy` doesn't get set to `true` unless
the count is 0, but check the return count anyway to make the intention
clearer.
Signed-off-by: Ian Abbott <abbo...@mev.co.uk>
---
drivers/staging/comedi/comedi_fops.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/
type.
Signed-off-by: Ian Abbott <abbo...@mev.co.uk>
---
drivers/staging/comedi/comedi_fops.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/staging/comedi/comedi_fops.c
b/drivers/staging/comedi/comedi_fops.c
index cca3fb1..ae9d519 100644
--- a/drivers/staging/
subdevice to be marked as non-busy, and the return
value does not indicate an "end-of-file" condition.
Signed-off-by: Ian Abbott <abbo...@mev.co.uk>
---
drivers/staging/comedi/comedi_fops.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/stagi
d directly through the mmapped
buffer instead of via the "read" file operation.)
Signed-off-by: Ian Abbott <abbo...@mev.co.uk>
---
drivers/staging/comedi/comedi_fops.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/comedi/comedi_fops.c
b/driv
it to deal with the wraparound using two calls to
`copy_to_user()` if necessary.
Signed-off-by: Ian Abbott <abbo...@mev.co.uk>
---
drivers/staging/comedi/comedi_fops.c | 14 ++
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/comedi/comedi_fops.c
b/d
in a
return value of 0 (unless COMEDI instructions are being processed or an
asynchronous command has been set up by a different file object).
Change it to return `-EINVAL` in this case.
Signed-off-by: Ian Abbott <abbo...@mev.co.uk>
---
drivers/staging/comedi/comedi_fops.c | 7 ++-
tion" is
currently being processed. `-EINVAL` is returned in other cases.
Simplify it by returning `-EINVAL` for all these cases.
Signed-off-by: Ian Abbott <abbo...@mev.co.uk>
---
drivers/staging/comedi/comedi_fops.c | 21 +++--
1 file changed, 3 insertions(+), 18 deletio
Fix the checkpatch.pl issues:
CHECK: spinlock_t definition without comment
CHECK: struct mutes definition withoug comment
Signed-off-by: Ian Abbott <abbo...@mev.co.uk>
---
drivers/staging/comedi/comedidev.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/d
Fix some checkpatch issues in "comedidev.h". There are still some
CamelCase warnings, but since those are for the use of "mA" and it
represents "milliamps", I think I'll leave them alone.
1) staging: comedi: comedidev.h: add comments to spin-lock and mutex
2) staging: comedi: comedidev.h: spaces
Fix the checkpatch.pl issues:
CHECK: spaces preferred around that '*' (ctx:VxV)
Signed-off-by: Ian Abbott <abbo...@mev.co.uk>
---
drivers/staging/comedi/comedidev.h | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/comedi/comedidev.h
b/d
A few changes for the "poll" file operation to avoid poll-waiting on the
same subdevice for both read and write (patch 1), avoid allocating write
buffer space unnecessarily and possibly inappropriately (patch 4),
consider whether any active commands belong to the current file object
(patch 5), and
ing
the buffer space before checking a "write" command is running can cause
problems if the subdevice supports commands in either direction and
currently has an active "read" command.
Signed-off-by: Ian Abbott
---
drivers/staging/comedi/comedi_fops.c | 3 +--
1 file changed, 1
-off-by: Ian Abbott
---
drivers/staging/comedi/comedi_buf.c | 11 +--
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/comedi/comedi_buf.c
b/drivers/staging/comedi/comedi_buf.c
index d45a4b6..4837559 100644
--- a/drivers/staging/comedi/comedi_buf.c
+++ b/drivers
nly file object able to read (or
write) data, take it into consideration.
With this change, if no read (or write) command is running on the
subdevice, or it is started by a different file object, the file object
is marked as readable (or writeable) regardless, but the read (or write)
file operatio
ce becoming
detached at an inopportune moment. Do the same for the "poll" file
operation.
Signed-off-by: Ian Abbott
---
drivers/staging/comedi/comedi_fops.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/comedi/comedi_fops.c
b/drivers/staging/comedi/comedi
.
Signed-off-by: Ian Abbott
---
drivers/staging/comedi/comedi_buf.c | 8
drivers/staging/comedi/comedi_internal.h | 1 +
2 files changed, 9 insertions(+)
diff --git a/drivers/staging/comedi/comedi_buf.c
b/drivers/staging/comedi/comedi_buf.c
index 4837559..90c2801 100644
--- a/drivers
same subdevice twice.
Although harmless, it wastes a poll table entry. Check for that, and
avoid it.
Signed-off-by: Ian Abbott
---
drivers/staging/comedi/comedi_fops.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/comedi/comedi_fops.c
b/drivers/staging/
same subdevice twice.
Although harmless, it wastes a poll table entry. Check for that, and
avoid it.
Signed-off-by: Ian Abbott <abbo...@mev.co.uk>
---
drivers/staging/comedi/comedi_fops.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/comedi/comedi_fops
ce becoming
detached at an inopportune moment. Do the same for the "poll" file
operation.
Signed-off-by: Ian Abbott <abbo...@mev.co.uk>
---
drivers/staging/comedi/comedi_fops.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/comedi/comedi_fops.c
b/driver
.
Signed-off-by: Ian Abbott <abbo...@mev.co.uk>
---
drivers/staging/comedi/comedi_buf.c | 8
drivers/staging/comedi/comedi_internal.h | 1 +
2 files changed, 9 insertions(+)
diff --git a/drivers/staging/comedi/comedi_buf.c
b/drivers/staging/comedi/comedi_buf.c
index 4837559..9
-off-by: Ian Abbott <abbo...@mev.co.uk>
---
drivers/staging/comedi/comedi_buf.c | 11 +--
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/comedi/comedi_buf.c
b/drivers/staging/comedi/comedi_buf.c
index d45a4b6..4837559 100644
--- a/drivers/staging/
nly file object able to read (or
write) data, take it into consideration.
With this change, if no read (or write) command is running on the
subdevice, or it is started by a different file object, the file object
is marked as readable (or writeable) regardless, but the read (or write)
file operatio
ing
the buffer space before checking a "write" command is running can cause
problems if the subdevice supports commands in either direction and
currently has an active "read" command.
Signed-off-by: Ian Abbott <abbo...@mev.co.uk>
---
drivers/staging/comedi/comedi_fop
A few changes for the "poll" file operation to avoid poll-waiting on the
same subdevice for both read and write (patch 1), avoid allocating write
buffer space unnecessarily and possibly inappropriately (patch 4),
consider whether any active commands belong to the current file object
(patch 5), and
Expand the descriptions of the functions and document the return values.
Signed-off-by: Ian Abbott
---
drivers/staging/comedi/comedi_usb.c | 75 +
1 file changed, 52 insertions(+), 23 deletions(-)
diff --git a/drivers/staging/comedi/comedi_usb.c
b/drivers
Expand the descriptions of the functions and document the return values.
Signed-off-by: Ian Abbott
---
drivers/staging/comedi/comedi_pcmcia.c | 104 -
1 file changed, 76 insertions(+), 28 deletions(-)
diff --git a/drivers/staging/comedi/comedi_pcmcia.c
b
Fix the 'Return' tags in the kernel-doc comments as they currently say
'Returns', which is not recognized by kernel-doc.
Signed-off-by: Ian Abbott
---
drivers/staging/comedi/comedi_pci.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/comedi
801 - 900 of 2849 matches
Mail list logo