This patch removes SIOCDEVPRIVATE + 1 ioctl. It currently is just a
stub which does some useless printks and returns. In the original code,
if the user passes priv_cmd.total_len == 0 then it will Oops. Also it
leaks memory every time it's called. In the future, we will implement
this functionality using generic API functions
Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This driver creates a network device when s-Par sends a device
create message to create network adapter on the visorbus. When
the message is received by visorbus, the visornic_probe function
is called and the netdev device is created and managed by the
visornic driver.
Signed-off-by: David Kershner <david.kershner@unisys.com> Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
David Kershner [Tue, 16 Jun 2015 03:31:58 +0000 (23:31 -0400)]
staging: unisys: define structures outside of iochannel
During testing with visornic the offset of num_rcv_bufs
was being reported at 188 instead of 186. The vnic structure
starts at 180 and the macaddr is only 6 bytes long.
When I defined and packed the structures outside of the struct
and then referenced them in the struct the correct offset
was generated.
Signed-off-by: David Kershner <david.kershner@unisys.com> Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
David Kershner [Tue, 16 Jun 2015 03:31:56 +0000 (23:31 -0400)]
staging: unisys: s-Par video channel includes EFI framebuffer
The efi framebuffer is defined within the s-Par video channel
console. Before we get the device create message for the video
console, s-Par has alreaady informed linux about the efi
framebuffer and a memory region is already set up for it. Since
we do not use the video channel in linux, we are just ignoring
the failure of the video channel request_mem_region.
Testing: This patch was tested on top of s-Par and we no longer
leave the partition in a failed state.
Signed-off-by: David Kershner <david.kershner@unisys.com> Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dmitry Kalinkin [Sat, 13 Jun 2015 13:34:03 +0000 (16:34 +0300)]
staging: vme_user: remove buf_unalloc helper
buf_unalloc is essentially a vme_free_consistent:
1) image[i].kern_buf is never NULL in buf_alloc call
2) kern_buf, pci_buf and size_buf get zeroed in vme_user_probe anyway
Dmitry Kalinkin [Thu, 28 May 2015 12:07:00 +0000 (15:07 +0300)]
vme: tsi148: fix first DMA item mapping
This moves DMA mapping of the first list element to vme_list_add, the
same place where other elements mappings occur. This prevents extra
mapping or over-unmapping in the cases when vme_list_exec is called more
or less than one time respectively.
Sudip Mukherjee [Fri, 12 Jun 2015 10:50:43 +0000 (16:20 +0530)]
staging: rtl8188eu: remove function which does nothing
The function rtw_mfree_all_stainfo() is just holding the lock,
traversing the list, and then unlocking. It is not doing anything else.
So removed the function and modified the places from where it was called.
Luca Ceresoli [Thu, 11 Jun 2015 22:20:43 +0000 (00:20 +0200)]
staging: rtl8188eu: rtw_mlme_ext.c: reorder message callbacks and tables
The message handling stored in mlme_sta_tbl and OnAction_tbl are internal and
will be declared static, and their declaration removed from rtw_mlme_ext.h, in
a later commit.
This would break compilation, since they are are referenced before their
definition.
Reorder these functions and the structures that hold them so that symbols are
defined before they are referenced, without the need for forward declarations.
This commit only reorders code, there is no content change.
Juston Li [Fri, 12 Jun 2015 10:17:22 +0000 (03:17 -0700)]
staging: sm750fb: fix c99 comments
fixed all checkpatch.pl ERROR: do not use C99 // comments
Any C99 comments used to comment out code are simply removed.
Also some of the errors occur inside '#if 0' blocks which I
might as well fix since checkpatch.pl caught them but the blocks
themselves should probably be cleaned up later.
Changes since v1: close a comment block
Signed-off-by: Juston Li <juston.h.li@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Fix the following endinness warnings detected by sparse:
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:669:34: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:669:34: expected restricted __le16 [usertype] duration_id
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:669:34: got int
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:679:33: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:679:33: expected restricted __le16 [usertype] algorithm
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:679:33: got int
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:1090:32: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:1090:32: expected restricted __le16 [usertype] duration_id
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:1090:32: got int
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:1109:30: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:1109:30: expected restricted __le16 [usertype] listen_interval
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:1109:30: got int
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:3130:24: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:3130:24: expected restricted __le16 [usertype] reason
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:3130:24: got unsigned char [unsigned] [usertype] asRsn
staging: rtl8192e: Remove dead code: dig_t::dbg_mode, drx_path_sel::DbgMode
dig_t::dbg_mode and drx_path_sel::DbgMode are initialized to one value and
checked only once in code.This patch throws them away, and deletes
always-true conditions.
David Kershner [Fri, 12 Jun 2015 20:46:08 +0000 (16:46 -0400)]
staging: unisys: Don't hold device responses until driver loads
Currently if a driver is not loaded for a device, we will not
respond to the device create until it is done. This causes
s-Par to not mark the partition running if the driver for the
device is not loaded. Since there are several devices that
could be assigned to a guest that don't have an actual
driver this will cause us to never go running.
If the device driver is loaded, we WILL continue to only
respond to the device PAUSE message when the device driver
has responded that it is done with the device.
Signed-off-by: David Kershner <david.kershner@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
For DAS08/JR/16 and DAS08/JR/AO-16 boards, the 16-bit analog input
readings are assumed to be in a sign-magnitude format and need
converting to the COMEDI unsigned sample format. The expressions to do
the conversion look a little messy. Use a local variable `magnitude` to
make it easier to follow.
Also, there seems to be some discrepancy between the manual for these
boards and the COMEDI code. The manual implies that 0 is full-scale
negative and 65535 is full-scale positive. However, the COMEDI code has
used the sign-magnitude conversion for these boards since these two
boards were 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 <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
`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 <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
`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 <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Fri, 5 Jun 2015 17:30:31 +0000 (18:30 +0100)]
staging: comedi: das08: rename das08_ai_rinsn()
`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 <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Fri, 5 Jun 2015 17:30:30 +0000 (18:30 +0100)]
staging: comedi: das08: rename the gainlist variables
`das08_pgh_gainlist[]`, `das08_pgl_gainlist[]`, and
`das08_pgm_gainlist[]` hold the gain codes indexed by range index for
various boards that support programmable gain. `das08_gainlist[]` is a
look-up table to find the appropriate gain list for a board. These are
all associated with the analog input Comedi subdevice. Rename the
variables to reflect that.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Fri, 5 Jun 2015 17:30:29 +0000 (18:30 +0100)]
staging: comedi: das08: rename ai range tables
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 <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
The "das08" module contains some comments outlining the register maps
for some of the ISA boards supported by this module in combination with
the "das08_isa" module. The comments are somewhat sporadically placed,
don't detail all the boards, and don't use the preferred 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 <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Fri, 5 Jun 2015 17:30:25 +0000 (18:30 +0100)]
staging: comedi: das08: rename DAS08AO_AO_UPDATE
"AOL", "AOM", and "AOH" boards have a jumper that controls whether
analog output channels are updated simultaneously or individually. When
set to update individually, individual channels are updated when the
high byte register is written. When set to update simultaneously,
channels are not updated until any of the analog output registers are
read. The driver doesn't know the jumper setting and is not interested
in the simultaneous update feature, so it updates a channel by writing
the low byte register, the high byte register, and then reading 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 a comment.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Fri, 5 Jun 2015 17:30:24 +0000 (18:30 +0100)]
staging: comedi: das08: rename DAS08AO_AO_LSB() and DAS08AO_AO_MSB()
The `DAS08AO_AO_LSB(x)` macro returns the offset to the analog output
low byte register for channel x (0 or 1) for "AOL", "AOM", and "AOH"
boards. The `DAS08AO_AO_MSB(x)` macro returns the offset to the
corresponding high byte register. Rename the macros to
`DAS08AOX_AO_LSB_REG(x)` and `DAS08AOX_AO_MSB_REG(x)` respectively, and
add some comments.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
The `DAS08AO_GAIN_CONTROL` and `DAS08AO_GAIN_STATUS` macros hold the
offset to the "programmable gain" register on "PGL", "PGM", "PGH",
"AOL", "AOM" and "AOH" boards. Writing a code to this register sets the
gain for the current analog input channel (selected in the main control
register). The written value can be read back in bits 3..0 of the
register. Other bits of the register are read-only and not used by the
driver. Rename `DAS08AO_GAIN_CONTROL` to `DAS08_GAIN_REG` and add a
comment. Remove `DAS08AO_GAIN_STATUS` 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 <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Fri, 5 Jun 2015 17:30:22 +0000 (18:30 +0100)]
staging: comedi: das08: add DAS08JR_AO_UPDATE_REG
"JR" boards with analog output channels have a jumper that controls
whether analog output channels are updated simultaneously or
individually. When set to update individually, individual channels are
updated when the high byte register is written. When set to update
simultaneously, channels are not updated until the digital inputs
register is read. The driver doesn't know how the jumper is set and is
not interested in the simultaneous output feature, so it updates a
channel by writing the low byte, then the high byte, then reading the
digital inputs register. To make the 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 <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Fri, 5 Jun 2015 17:30:21 +0000 (18:30 +0100)]
staging: comedi: das08: rename DAS08JR_AO_LSB() and DAS08JR_AO_MSB()
The `DAS08JR_AO_LSB(x)` macro returns the offset to the analog output
low byte register for channel x (0 or 1) for "JR" boards with analog
output support. The `DAS08JR_AO_MSB(x)` macro returns the offset to the
corresponding high byte register. Rename the macros to
`DAS08JR_AO_LSB_REG(x)` and `DAS08JR_AO_MSB_REG(x)` respectively, and
add some comments.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Fri, 5 Jun 2015 17:30:20 +0000 (18:30 +0100)]
staging: comedi: das08: rename and split DAS08JR_DIO
The `DAS08JR_DIO` macro contains the offset to the read-only digital
input register and write-only digital output register on the "JR"
boards. Replace the macro with two new macros (with the same numeric
value) named `DAS08JR_DI_REG` for the digital input register and
`DAS08JR_DO_REG` for the digital output register, and add some comments.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Fri, 5 Jun 2015 17:30:19 +0000 (18:30 +0100)]
staging: comedi: das08: rename DAS08_OP() and DAS08_DO_MASK
The `DAS08_DO_MASK` macro is a bitmask for the control register
corresponding to the digital output channels (except on "JR" boards).
Rename it to `DAS08_CONTROL_DO_MASK` and add a comment.
The `DAS08_OP(x)` macro takes a bitvector of the desired digital output
channel states and 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 <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>