Fix up block comments to make a trailing */ on a separate line
Signed-off-by: maomao xu
---
drivers/staging/comedi/comedi.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/staging/comedi/comedi.h b/drivers/staging/comedi/comedi.h
index 66edda1..ec5e59c 100644
--- a/
Hello Glen Lee,
The patch de11ee8b214e: "staging: wilc1000: call linux_sdio_init
instead of io_init" from Nov 6, 2015, leads to the following static
checker warning:
drivers/staging/wilc1000/wilc_sdio.c:574 sdio_init()
info: ignoring unreachable code.
drivers/staging/wilc1000/wil
On 13/11/15 18:11, H Hartley Sweeten wrote:
For aesthetics, define some macros to set the bits in the mux control
register. Also, rename the 'mux_ext' member of the private data.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/adv_pc
On 13/11/15 18:11, H Hartley Sweeten wrote:
Now that the PCI-1720 support has been moved to a separate driver, remove
some unnecessary boardinfo in this driver and tidy it up a bit.
v2: address some issues pointed out by Ian Abbott with the patches that
support external analog output refe
On 14/11/15 18:19, Andrzej Pietrasiewicz wrote:
ni_release_ai_mite_channel(), ni_release_ao_mite_channel(),
ni_release_gpct_mite_channel() and ni_release_cdo_mite_channel()
call functions which interpret -1 as a special value meaning "no channel".
This patch adds explicit "no_channel" versions in
This patchset is needed to have open issues of the MOST driver fixed
and the code cleaned up.
Christian Gromm (28):
staging: most: remove unnecessary keep_mbo variable
staging: most: rename variables
staging: most: simplify expression
staging: most: unify types
staging: most: use min_t
This patch unifies variable types to get less castings.
Signed-off-by: Christian Gromm
---
drivers/staging/most/aim-cdev/cdev.c |8 +++-
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/most/aim-cdev/cdev.c
b/drivers/staging/most/aim-cdev/cdev.c
index b29307
This patch renames some variables for better readability.
Signed-off-by: Christian Gromm
---
drivers/staging/most/aim-cdev/cdev.c | 16
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/staging/most/aim-cdev/cdev.c
b/drivers/staging/most/aim-cdev/cdev.c
in
The MBO pointer stacked_mbo and the boolean variable keep_mbo are
always changed together and therefore provide the same information.
This patch removes keep_mbo and uses stacked_mbo instead.
Signed-off-by: Christian Gromm
---
drivers/staging/most/aim-cdev/cdev.c | 12
1 file chan
This patch replaces min with min_t.
Signed-off-by: Christian Gromm
---
drivers/staging/most/aim-cdev/cdev.c |4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/staging/most/aim-cdev/cdev.c
b/drivers/staging/most/aim-cdev/cdev.c
index 4bf0322..6ee4eb2 100644
--- a/d
This patch increments mbo_offs by the number of bytes that have
been copied and resets it in case a complete mbo has been transferred
to user buffer.
Signed-off-by: Christian Gromm
---
drivers/staging/most/aim-cdev/cdev.c |5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git
This patch replaces the ternary ?-operator with a way simpler subtraction.
Signed-off-by: Christian Gromm
---
drivers/staging/most/aim-cdev/cdev.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/most/aim-cdev/cdev.c
b/drivers/staging/most/aim-cdev/cdev.c
i
This patch makes use of functions readl and writel instead of
the __raw_* variants.
Signed-off-by: Christian Gromm
---
drivers/staging/most/hdm-dim2/dim2_hdm.c |4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/most/hdm-dim2/dim2_hdm.c
b/drivers/staging/m
This patch fixes a potential MBO leak in case function aim_read()
exits right after the MBO has been fetched from kfifo and before
it has been saved to the variable stacked_mbo.
Signed-off-by: Christian Gromm
---
drivers/staging/most/aim-cdev/cdev.c |2 +-
1 file changed, 1 insertion(+), 1 d
This patch removes the function destroy_most_c_obj and executes its code
within function destroy_most_inst_obj.
Signed-off-by: Christian Gromm
---
drivers/staging/most/mostcore/core.c | 38 +-
1 file changed, 14 insertions(+), 24 deletions(-)
diff --git a/drive
This patch removes the unnecessary reference conter mod_ref.
Signed-off-by: Christian Gromm
---
drivers/staging/most/mostcore/core.c | 13 +
1 file changed, 1 insertion(+), 12 deletions(-)
diff --git a/drivers/staging/most/mostcore/core.c
b/drivers/staging/most/mostcore/core.c
in
This patch fixes race conditions that might emerge from functions
aim_open, aim_close, aim_read, aim_write and aim_disconnect_channel
within module cdev.
Signed-off-by: Christian Gromm
---
drivers/staging/most/aim-cdev/cdev.c | 89 +-
1 file changed, 54 insertio
This patch fixes the function channel_has_mbo that delivers the false
information in case two AIMs are using the same tx channel.
Signed-off-by: Christian Gromm
---
drivers/staging/most/aim-cdev/cdev.c | 12 ++--
drivers/staging/most/mostcore/core.c |7 ++-
drivers/stag
This patch removes mutex from code that doesn't need any locking.
Signed-off-by: Christian Gromm
---
drivers/staging/most/mostcore/core.c |3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/staging/most/mostcore/core.c
b/drivers/staging/most/mostcore/core.c
index 21
This patch removes the atomic tainted flag. It is needed to get rid of
logical overhead.
Signed-off-by: Christian Gromm
---
drivers/staging/most/mostcore/core.c | 33 +
1 file changed, 1 insertion(+), 32 deletions(-)
diff --git a/drivers/staging/most/mostcore/c
This patch prevents the cdev module from rousing the channel wait queue in
case the channel is about to be closed. It is safe to do so, because the
application can not be waiting within read or write and at the same time
be calling close.
Signed-off-by: Christian Gromm
---
drivers/staging/most/a
This patch adds two missing calls to function ida_simpel_remove.
Signed-off-by: Christian Gromm
---
drivers/staging/most/mostcore/core.c |2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/staging/most/mostcore/core.c
b/drivers/staging/most/mostcore/core.c
index 8be6cdcf..995987d 1
This patch removes unnecessary code to destroy channel objects. It is
needed, because function most_stop_channel, which is indirectly
triggered by function most_deregister_interface, already destroys the
channels.
Signed-off-by: Christian Gromm
---
drivers/staging/most/mostcore/core.c | 13 ---
This patch makes function store_add_link initialize the pointer to an AIM
right before the channel is probed.
Signed-off-by: Christian Gromm
---
drivers/staging/most/mostcore/core.c |7 +--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/most/mostcore/core.c
This patch makes use of kfifo_peek and kfifo_skip, which renders the
variable stacked_mbo useless. It is therefore removed.
Signed-off-by: Christian Gromm
---
drivers/staging/most/aim-cdev/cdev.c | 16 +++-
1 file changed, 3 insertions(+), 13 deletions(-)
diff --git a/drivers/stag
This patch moves the code that disconnects linked channels. It is needed
to have cleaning things up done right.
Signed-off-by: Christian Gromm
---
drivers/staging/most/mostcore/core.c | 24 +++-
1 file changed, 11 insertions(+), 13 deletions(-)
diff --git a/drivers/staging
This patch renames the variable 'channel' to 'c'. This is needed to have
the code look more homogeneous and to prevent format violations.
Signed-off-by: Christian Gromm
---
drivers/staging/most/aim-cdev/cdev.c | 216 +-
1 file changed, 108 insertions(+), 108 dele
This patch invokes AIM's disconnect_channel callback before the
corresponding pointers are re-initialized to NULL.
Signed-off-by: Christian Gromm
---
drivers/staging/most/mostcore/core.c |4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/most/mostcore/core
This patch changes the type of the access reference from atomit_t to int.
It is needed, because the reference variable is secured by synchronization
locks and does not need to be atomic anymore.
Signed-off-by: Christian Gromm
---
drivers/staging/most/aim-cdev/cdev.c | 17 -
1 f
This patch adds a counter for dropped packets. It needed for statistical
analysis.
Signed-off-by: Christian Gromm
---
drivers/staging/most/aim-network/networking.c | 11 ---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/most/aim-network/networking.c
b/d
This patch removes the second forwared declaration of struct most_aim.
Signed-off-by: Christian Gromm
---
drivers/staging/most/aim-cdev/cdev.c |2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/staging/most/aim-cdev/cdev.c
b/drivers/staging/most/aim-cdev/cdev.c
index e5ceb82..e9943
This patch rearranges the code of function aim_write() of module aim-cdev.
It is needed to remove the error lable and make the code straighter.
Signed-off-by: Christian Gromm
---
drivers/staging/most/aim-cdev/cdev.c | 22 ++
1 file changed, 6 insertions(+), 16 deletions(-)
This patch encapsulates shared code. It therefore creates the new functions
stop_channel and destroy_cdev.
Signed-off-by: Christian Gromm
---
drivers/staging/most/aim-cdev/cdev.c | 55 ++
1 file changed, 29 insertions(+), 26 deletions(-)
diff --git a/drivers/st
This patch removes the mutexes stop_task_mutex and deregister mutex,
since they can safely be left out.
Signed-off-by: Christian Gromm
---
drivers/staging/most/mostcore/core.c |9 -
1 file changed, 9 deletions(-)
diff --git a/drivers/staging/most/mostcore/core.c
b/drivers/staging/m
On Wed, Nov 18, 2015 at 01:43:36PM +0100, Christian Gromm wrote:
> This patch makes function store_add_link initialize the pointer to an AIM
> right before the channel is probed.
>
The patch description implies that this is a cleanup but looking at the
patch it looks like a behavior change. Actu
On Wed, Nov 18, 2015 at 01:43:51PM +0100, Christian Gromm wrote:
> This patch adds a counter for dropped packets. It needed for statistical
> analysis.
>
> Signed-off-by: Christian Gromm
> ---
> drivers/staging/most/aim-network/networking.c | 11 ---
> 1 file changed, 8 insertions(+),
inmsg should be freed in case of on_msg() failure to avoid memory leak.
Preserve the error code from on_msg().
Signed-off-by: Vitaly Kuznetsov
---
Changes since v1:
- Preserve the error code from on_msg(). [Dan Carpenter]
---
drivers/hv/hv_utils_transport.c | 7 ---
1 file changed, 4 inserti
As a preparation to reusing outmsg_lock to protect test-and-set openrations
on 'mode' rename it the more general 'lock'.
Signed-off-by: Vitaly Kuznetsov
---
drivers/hv/hv_utils_transport.c | 14 +++---
drivers/hv/hv_utils_transport.h | 2 +-
2 files changed, 8 insertions(+), 8 deletions
The crash is observed when a service is being disabled host side while
userspace daemon is connected to the device:
[ 90.244859] general protection fault: [#1] SMP
...
[ 90.800082] Call Trace:
[ 90.800082] [] __fput+0xc8/0x1f0
[ 90.800082] [] fput+0xe/0x10
...
[ 90.800082] []
When Hyper-V host asks us to remove some util driver by closing the
appropriate channel there is no easy way to force the current file
descriptor holder to hang up but we can start to respond -EBADF to all
operations asking it to exit gracefully.
As we're setting hvt->mode from two separate contex
Changes since v1:
- Don't re-introduce memory leak in hvt_op_write(), preserve the error
code from on_msg() [Dan Carpenter]
Original description:
I'm observing a crash when a utility driver is disabled host side (e.g.
'Guest services' is disabled live) when we have userspace daemon
connected:
On 14/11/15 13:24, Ranjith Thangavel wrote:
BIT macro is used for defining BIT location instead of
shifting operator - coding style issue
Signed-off-by: Ranjith Thangavel
---
drivers/staging/comedi/drivers/pcmmio.c | 20 ++--
1 file changed, 10 insertions(+), 10 deletions(-
On 14/11/15 17:21, Ranjith Thangavel wrote:
kernel type definitions are preferred for variables over
standard type definitions
Signed-off-by: Ranjith Thangavel
---
drivers/staging/comedi/drivers/gsc_hpdi.c | 20 ++--
1 file changed, 10 insertions(+), 10 deletions(-)
diff -
This is a patch to the radio-bcm2048.c file that fixes up a brace warning
found by the checkpatch.pl tool.
Signed-off-by: Jitendra Kumar Khasdev
---
drivers/staging/media/bcm2048/radio-bcm2048.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/media/bcm2048
On 14/11/15 13:13, Ranjith Thangavel wrote:
BIT macro is used for defining BIT location instead of
shifting operator - coding style issue
Signed-off-by: Ranjith Thangavel
---
drivers/staging/comedi/drivers/ni_6527.c | 27 ++-
1 file changed, 14 insertions(+), 13 del
Hi Jitendra,
[auto build test ERROR on: linuxtv-media/master]
[also build test ERROR on: v4.4-rc1 next-20151118]
url:
https://github.com/0day-ci/linux/commits/Jitendra-Kumar-Khasdev/staging-media-bcm2048-fix-brace-coding-style-issue-in-radio-bcm2048-c/20151118-235820
base: git
On Wednesday, November 18, 2015 3:33 AM, Ian Abbott wrote:
> On 13/11/15 18:11, H Hartley Sweeten wrote:
>> For aesthetics, define some macros to set the bits in the mux control
>> register. Also, rename the 'mux_ext' member of the private data.
>>
>> Signed-off-by: H Hartley Sweeten
>> Cc: Ian Ab
Hi Jitendra,
[auto build test ERROR on linuxtv-media/master]
[also build test ERROR on v4.4-rc1 next-20151118]
url:
https://github.com/0day-ci/linux/commits/Jitendra-Kumar-Khasdev/staging-media-bcm2048-fix-brace-coding-style-issue-in-radio-bcm2048-c/20151118-235820
base: git://linuxtv.org
On 14/11/15 17:10, Ranjith Thangavel wrote:
BIT macro is used for defining BIT location instead of
shifting operator, usleep_range is preferred over
udelay - coding style issue
Those two things should be done in separate patches.
Signed-off-by: Ranjith Thangavel
---
drivers/staging/comedi/
On 18/11/15 16:26, Ian Abbott wrote:
On 14/11/15 17:10, Ranjith Thangavel wrote:
BIT macro is used for defining BIT location instead of
shifting operator, usleep_range is preferred over
udelay - coding style issue
Those two things should be done in separate patches.
Sorry, I didn't see you'v
On 16/11/15 16:56, Ranjith Thangavel wrote:
BIT macro is used for defining BIT location instead of
shifting operator - coding style issue
Signed-off-by: Ranjith Thangavel
---
drivers/staging/comedi/drivers/ni_6527.c | 24
1 file changed, 12 insertions(+), 12 deleti
On 16/11/15 17:18, Ranjith Thangavel wrote:
BIT macro is used for defining BIT location instead of
shifting operator, usleep_range is preferred over
udelay - coding style issue
This patch doesn't use usleep_range(), so the description is inaccurate.
Signed-off-by: Ranjith Thangavel
---
dr
On Wednesday, November 18, 2015 9:42 AM, Ian Abbott wrote:
> On 16/11/15 17:18, Ranjith Thangavel wrote:
[snip]
>> -#define DMM32AT_AI_CFG_SCINT_20US (0 << 4)
>> -#define DMM32AT_AI_CFG_SCINT_15US (1 << 4)
>> -#define DMM32AT_AI_CFG_SCINT_10US (2 << 4)
>> -#define DMM32AT_AI_CFG_SCINT_5US
On 18/11/15 16:45, Hartley Sweeten wrote:
On Wednesday, November 18, 2015 9:42 AM, Ian Abbott wrote:
On 16/11/15 17:18, Ranjith Thangavel wrote:
[snip]
-#define DMM32AT_AI_CFG_SCINT_20US (0 << 4)
-#define DMM32AT_AI_CFG_SCINT_15US (1 << 4)
-#define DMM32AT_AI_CFG_SCINT_10US (2
These defines are only used to initialize the diosubd_data 'addr' members
in the boardinfo. For aesthetics, just open-code the values and remove the
defines.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/adv_pci_dio.c | 32 +--
These defines are only used to initialize the diosubd_data 'addr' members
in the boardinfo. For aesthetics, just open-code the values and remove the
defines.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/adv_pci_dio.c | 30 ++-
For aesthetics, post-increment the 'subdev' index when used to get a
comedi_subdevice pointer instead of incrementing it after the subdevice
is initialized.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/adv_pci_dio.c | 16 +---
For aesthetics, replace these defines with a macro.
Refactor the switch in pci_dio_reset() to use common code.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/adv_pci_dio.c | 21 +
1 file changed, 9 insertions(+), 1
The boards supported by this driver either use 8-bit or 16-bit I/O. The
'io_access' member of the boardinfo is used by the (*auto_attach) to
determine which (*insn_bits) function to use.
Simplify the boardinfo a bit by refactoring the 'io_access' member into
a bit-field flag 'is_16bit'. Use the ne
The board reset function disables and clears all interrupts. It also
resets all the digital output channels to 0.
Interrupts are not used by this driver so the disable/clear during the
(*detach) is not necessary.
Reseting all the digital outputs to 0 might not be desired depending
on what the out
Reformat the bolck comment in the kernel CodingStyle.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/adv_pci_dio.c | 40
1 file changed, 17 insertions(+), 23 deletions(-)
diff --git a/drivers/staging/comed
For aesthetics, rename this define and fix the alignment.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/adv_pci_dio.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/comedi/drivers/adv_pci_dio.
This function initializes a digitial output subdevice. For aesthetics,
absorb it into the (*auto_attach).
Remove the improper initialization of the SDF_LSAMPL subdev_flag and
len_chanlist. These are only used by subdevices that support async
commands.
Also remove the unnecessary initilaization of
With the PCI-1760 support moved to a separate driver this one can now
be simplified and cleaned up pretty nicely.
Tidy up this driver and fix all the checkpatch.pl issues.
This series applies after:
"staging: comedi: adv_pci_dio: separate out PCI-1760 support"
H Hartley Sweeten (33):
staging:
Currently the (*insn_bits) functions used the 'regs' member to determine how
many registers need to be read or written to update the subdevice. We can use
the subdevice 'n_chan' to determine this and make the code a bit clearer.
The (*auto_attach) also uses this member to determine how many 8255 d
The "board id" register is always 4-bits (4 di channels) and the register
used to read the bits is always > 0.
Simplify the 'boardid' boardinfo by replacing it with a 'id_reg' member
and open-coding the subdevice n_chan.
For aesthetics, remove all the *_BOARDID defines and just open-code the
regi
For aesthetics, use a const pointer to access the diosubd_data in the
boardinfo when doing the (*auto_attach)..
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/adv_pci_dio.c | 31 +---
1 file changed, 19 insertio
The board reset function disables and clears all interrupts. It also
resets all the digital output channels to 0.
Interrupts are not currently used by this driver. For asthetics, do
the board reset early in the (*auto_attach) to make sure the interrupts
are disabled in case this feature is added.
The Description is a bit long winded and the same information is in
the Devices. Shorten the Description and tidy up the Devices.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/adv_pci_dio.c | 9 +++--
1 file changed, 3 insertions(
For aesthetics, move the disable of the channel freeze for the PCI-1752
and PCI-1756 boards out of the switch used to disable and clear interrupts.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/adv_pci_dio.c | 10 --
1 file ch
This function initializes a digitial input subdevices. For aesthetics,
absorb it into the (*auto_attach).
Remove the improper initialization of the SDF_LSAMPL subdev_flag and
len_chanlist. These are only used by subdevices that support async
commands.
Also, remove the unnecessary 'specflags' from
Change the MODULE_DESCRIPTION to something more useful than the
generic "Comedi low-level driver".
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/adv_pci_dio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers
This member of the boardinfo is identical to the offset of the boardinfo
in the boardtypes array. It's also passed as the 'context' to the driver
(*auto_attach).
The 'cardtype' is only needed by the (*auto_attach) to determine which
PCI BAR to use and in pci_dio_reset() to handle the board specifi
For aesthetics, replace these defines with some macros.
Refactor the switch in pci_dio_reset() to not require the fallthrough
comment.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/adv_pci_dio.c | 33
1 f
For aesthetics, use a common comment for the switch() that disables and clears
interrupts.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/adv_pci_dio.c | 24 ++--
1 file changed, 6 insertions(+), 18 deletions(-)
di
These boards use the same offsets for the interrupt control registers.
For aesthetics, remove the current defines and use common ones.
Fix the switch() in pci_dio_reset() to use common code.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/driv
For aesthetics, use a common define for the interrupt control and status
registers.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/adv_pci_dio.c | 7 +++
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/staging
These boards use the same offsets for the interrupt control registers.
For aesthetics, remove the current defines and use common ones.
Fix the switch() in pci_dio_reset() to use common code.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/driv
For aesthetics, move this enum after the register defines and rename
it to have namespace associated with the driver.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/adv_pci_dio.c | 29
1 file changed, 17 in
Currently the di/do subdevices store a pointer to the diosubd_data in
s->private.
The (*insn_bits) functions then use that to get to the 'addr' needed to access
the registers.
The only member of diosubd_data that is needed by the (*insn_bits) functions is
the 'addr'. For aesthetics, just store th
Currently the board reset function also resets the digital output channels
to 0. This works but it makes the reset function a bit messy and each
board type has to be handled special.
Move the digital output reset into the subdevice init where it can be
handle based on the subdevice setup.
Signed-
These are not necessary and just add cruft. Remove them.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/adv_pci_dio.c | 9 -
1 file changed, 9 deletions(-)
diff --git a/drivers/staging/comedi/drivers/adv_pci_dio.c
b/drivers/s
This function is called as part of the pci_driver (*probe) before
doing the (*auto_attach) of the comedi driver. For aesthetics, move
the function to a more logical place in the driver.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/ad
These defines are only used to initialize the 'timer_regbase' boardinfo.
For aesthetics, just open-code the values and remove the defines.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/adv_pci_dio.c | 6 ++
1 file changed, 2 inser
All the boards use PCI BAR2 for the dev->iobase except for the pci1736
which uses PCI BAR0. Just use the board->cardtype to determine which
PCI BAR to use.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/adv_pci_dio.c | 30 +++--
These defines are only used to initialize the diosubd_data 'addr' members
in the boardinfo. For aesthetics, just open-code the values and remove the
defines.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/adv_pci_dio.c | 14 +--
For aesthetics, use a default case in the switch (board->cardtype) used
to reset the various boards.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/adv_pci_dio.c | 9 ++---
1 file changed, 2 insertions(+), 7 deletions(-)
diff --gi
For aesthetics, move these defines after the register defines and rename
them to have namespace associated with the driver.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/adv_pci_dio.c | 22 +++---
1 file changed, 11 in
On Wed, Nov 18, 2015 at 09:25:22PM +0530, Jitendra Kumar Khasdev wrote:
> This is a patch to the radio-bcm2048.c file that fixes up a brace warning
> found by the checkpatch.pl tool.
>
> Signed-off-by: Jitendra Kumar Khasdev
> ---
> drivers/staging/media/bcm2048/radio-bcm2048.c | 4 ++--
> 1 fil
On Wed, Nov 18, 2015 at 08:53:51AM +, David Binderman wrote:
> hello there,
>
> [linux-4.4-rc1/drivers/staging/rts5208/sd.c:4170]: (style) Expression '(X &
> 0x1e) != 0x3' is always true.
>
> Source code is
>
> if ((ptr[3] & 0x1E) != 0x03) {
>
> Suggest code rework.
Great, please send a
On Wed, Nov 18, 2015 at 05:25:38PM +, David Binderman wrote:
> Hello there Greg,
>
>
> > Date: Wed, 18 Nov 2015 09:14:41 -0800
> > From: gre...@linuxfoundation.org
> > To: dcb...@hotmail.com
> > CC: de...@driverdev.osuosl.org
> > Subject: Re: linux-4.4-
On Wednesday 18 November 2015 10:42 PM, Greg KH wrote:
> On Wed, Nov 18, 2015 at 09:25:22PM +0530, Jitendra Kumar Khasdev wrote:
>> This is a patch to the radio-bcm2048.c file that fixes up a brace warning
>> found by the checkpatch.pl tool.
>>
>> Signed-off-by: Jitendra Kumar Khasdev
>> ---
>>
In `comedi_write()`, the `n` and `m` variables are of type `int`.
Change them to `unsigned int` as they are used to measure a positive
number of bytes. The `count` variable is also of type `int` and holds
the returned number of bytes written. Change it to type `ssize_t` to
match the function's re
The "write" file operation handler, `comedi_write()` returns an error
for pretty much any condition that prevents a "write" going ahead. One
of the conditions that prevents a "write" going ahead is that no
asynchronous command has been set up, but that currently results in a
return value of 0 (unl
`comedi_write()` is the handler for the "write" file operation for
COMEDI devices. It mostly runs without using the main mutex of the
COMEDI device, but uses the `attach_lock` rw_semaphore to protect
against the COMEDI device becoming "detached". A file object can write
data for a COMEDI asynchon
At one point in `comedi_write()`, the variable `n` gets assigned to the
minimum of the parameter `nbytes` and the amount of writeable buffer
space. 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/st
In order to perform a "write" file operation, an asynchronous COMEDI
command in the "write" direction needs to have been set up by the
current file object on the COMEDI "write" subdevice associated with the
file object. If there is a "write" subdevice, but a command has not
been set up by the file
Rearrange the code in `comedi_write()` to reduce the amount of
indentation. The code never reiterates the `while` loop once `count`
has become non-zero, so we can check that in the `while` condition to
save an indentation level. (Note that `nbytes` has been checked to be
non-zero before entering
Tidy up the "write" file operation handler, `comedi_write()` a bit and
improve the error handling.
1) staging: comedi: rearrange comedi_write() code
2) staging: comedi: do extra checks for becoming non-busy for "write"
3) staging: comedi: make some variables unsigned in comedi_write()
4) staging:
`comedi_write()` copies data from the user buffer to the acquisition
data buffer, which is cyclic, using a single call to `copy_from_user()`.
It currently avoids having to deal with wraparound of the cyclic buffer
by limiting the amount it copies (and the amount returned to the user).
Change it to
1 - 100 of 157 matches
Mail list logo