Devendra Naga [Sun, 26 Aug 2012 07:12:50 +0000 (12:42 +0530)]
staging: slicoss: release firmware before returning
we request_firmware in slic_card_download_gbrcv and we return out
with out calling release_firmware, where we compare against a
firmware lengths of certain device ids.
Devendra Naga [Sun, 26 Aug 2012 07:06:56 +0000 (12:36 +0530)]
staging: slicoss: return early before calling request_firmware with empty firmware filename
when the device id doesn't match in slic_card_download_gbrcv the filename is "",
i.e an empty name, and we try calling request_firmware with that name,
actually we can just fail out at default case before even calling request_firmware
Devendra Naga [Sat, 25 Aug 2012 17:40:47 +0000 (23:10 +0530)]
staging: sbe-2t3e3: fix sparse warnings
warnings:
drivers/staging/sbe-2t3e3/netdev.c:24:5: warning: symbol 't3e3_ioctl' was not declared. Should it be static?
drivers/staging/sbe-2t3e3/netdev.c:85:5: warning: symbol 't3e3_open' was not declared. Should it be static?
drivers/staging/sbe-2t3e3/netdev.c:100:5: warning: symbol 't3e3_close' was not declared. Should it be static?
Wei Yongjun [Thu, 23 Aug 2012 06:40:28 +0000 (14:40 +0800)]
staging: r8712u: use is_zero_ether_addr() instead of memcmp()
Using is_zero_ether_addr() instead of directly use
memcmp(addr, "\x00\x00\x00\x00\x00\x00", ETH_ALEN)
to determine if the ethernet address is all zeros.
spatch with a semantic match is used to found this problem.
(http://coccinelle.lip6.fr/)
Wei Yongjun [Tue, 21 Aug 2012 08:39:04 +0000 (16:39 +0800)]
Staging: rtl8192u: using random_ether_addr() to generate random MAC
Using random_ether_addr() to generate a random Ethernet
address (MAC) that is not multicast and has the local
assigned bit set. Not need to duplicating its implementation.
spatch with a semantic match is used to found this problem.
(http://coccinelle.lip6.fr/)
Wei Yongjun [Tue, 21 Aug 2012 08:38:45 +0000 (16:38 +0800)]
staging: rtl8192e: using random_ether_addr() to generate random MAC
Using random_ether_addr() to generate a random Ethernet
address (MAC) that is not multicast and has the local
assigned bit set. Not need to duplicating its implementation.
spatch with a semantic match is used to found this problem.
(http://coccinelle.lip6.fr/)
Wei Yongjun [Tue, 21 Aug 2012 08:36:28 +0000 (16:36 +0800)]
staging: rtl8187se: using random_ether_addr() to generate random MAC
Using random_ether_addr() to generate a random Ethernet
address (MAC) that is not multicast and has the local
assigned bit set. Not need to duplicating its implementation.
spatch with a semantic match is used to found this problem.
(http://coccinelle.lip6.fr/)
Samuel Thibault [Sun, 26 Aug 2012 21:35:17 +0000 (23:35 +0200)]
speakup: lower default software speech rate
Speech synthesis beginners need a low speech rate, and trained people
want a high speech rate. A medium speech rate is thus actually not a
good default for neither. Since trained people will typically know how
to change the rate, better default for a low speech rate, which
beginners can grasp and learn how to increase it afterwards
This was agreed with users on the speakup mailing list.
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Marc Dietrich [Sun, 19 Aug 2012 17:03:08 +0000 (19:03 +0200)]
staging: nvec: do not depend on MACH_PAZ00
With the removal of board files on the tegra arch, drivers can now only
be instantiated via device tree. Consequently, all MACH_<board> config
variables are removed. As a temporary solution always enable building
for the (up to now) only supported paz00 board until nvec is full ported
to device tree.
Signed-off-by: Marc Dietrich <marvin24@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Marc Dietrich [Sun, 19 Aug 2012 17:03:06 +0000 (19:03 +0200)]
staging: nvec: fix clock setup
commit 30b68231 "ARM: tegra: clock: add i2c fast clock entry in clock table"
added a new clock for the i2c controllers, so clock requests are no longer
conclusive. Fix this by specifying "div-clk" explicitly.
Signed-off-by: Marc Dietrich <marvin24@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Devendra Naga [Sat, 18 Aug 2012 18:54:11 +0000 (00:24 +0530)]
staging: wlags49_h2: remove return statements at the end of all void functions
this patch removes the return statement at the end of all void functions,
since the function returning void no need to have a return at the end of the
function.
Devendra Naga [Sat, 18 Aug 2012 18:54:10 +0000 (00:24 +0530)]
staging: wlagn49_h2: fix the checkpatch warning about the space after the open paranthesis
the following fix is done in the wl_wds_netif_carrier_off function:
wl_netdev.c:1764: ERROR: space prohibited after that open parenthesis '('
wl_netdev.c:1764: ERROR: space prohibited before that close parenthesis ')'
wl_netdev.c:1768: ERROR: space prohibited after that open parenthesis '('
wl_netdev.c:1768: ERROR: space prohibited before that close parenthesis ')'
wl_netdev.c:1768: ERROR: space required before the open parenthesis '('
wl_netdev.c:1769: ERROR: space prohibited after that open parenthesis '('
wl_netdev.c:1769: ERROR: space prohibited before that close parenthesis ')'
wl_netdev.c:1769: ERROR: space required before the open parenthesis '('
wl_netdev.c:1770: ERROR: space prohibited after that open parenthesis '('
wl_netdev.c:1770: ERROR: space prohibited before that close parenthesis ')'
wl_netdev.c:1770: ERROR: space required before the open parenthesis '('
wl_netdev.c:1771: ERROR: space prohibited after that open parenthesis '('
wl_netdev.c:1771: ERROR: space prohibited before that close parenthesis ')'
Toshiaki Yamane [Wed, 29 Aug 2012 13:45:15 +0000 (22:45 +0900)]
staging/rts_pstor: remove braces {} in rtsx_chip.c
fixed below checkpatch warnings.
-WARNING: braces {} are not necessary for single statement blocks
-WARNING: braces {} are not necessary for any arm of this statement
Toshiaki Yamane [Thu, 30 Aug 2012 13:45:11 +0000 (22:45 +0900)]
staging/rts_pstor: remove braces {} in rtsx_transport.c
fixed below checkpatch warnings.
-WARNING: braces {} are not necessary for single statement blocks
-WARNING: braces {} are not necessary for any arm of this statement
Toshiaki Yamane [Fri, 31 Aug 2012 12:23:29 +0000 (21:23 +0900)]
staging/rts_pstor: remove braces {} in rtsx_card.c
fixed below checkpatch warnings.
-WARNING: braces {} are not necessary for single statement blocks
-WARNING: braces {} are not necessary for any arm of this statement
Emil Goode [Fri, 17 Aug 2012 16:53:26 +0000 (18:53 +0200)]
staging: drm/omap: Add error handling
This patch adds fail checks for kmalloc and kzalloc calls
and also adds a error path that frees allocated pages by
introducing a call to _drm_gem_put_pages.
Signed-off-by: Emil Goode <emilgoode@gmail.com> Signed-off-by: Rob Clark <rob@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Merge tag 'iio-for-v3.7b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into work-next
Second set of IIO rework and new drivers for the 3.7 cycle.
Firstly we have the second half of a series reworking support for
the various sigma delta ADCs from Analog. The first half was fixes
that have already merged in the v3.6 cycle. Other than some
little cleanups this mainly consists of a unifying library module
that the various drivers can then use. Another new driver is
using this undergoing revisions and the code reduction already
seen from this is considerable. A nice piece of work.
Secondly we have a good number of tidying up patches from various
sources doing things like adding include guards and removing
unintended header ordering requirements. Also a mass annotation
of missing __devinit/exit. Peter Meerwald has been getting around
with cleanup of lis3l02dq, documentation fixes, white space clenaups
and a small issue with my spelling ;)
Thirdly we have some improvements to our kfifo usage that have
been around for a while but are now suddenly in demand from a
number of users.
Forth we have some clk_prepare_enable and clk_prepare_disable
cleanups.
Fifth is the addition of i2c dacs to the ad5446 driver
Finally we have some email address updates. I'll do the
MAINTAINERS one separately.
So a general mixed bag but nothing terribly controversial
or 'exciting'.
Ian Abbott [Fri, 31 Aug 2012 19:41:49 +0000 (20:41 +0100)]
staging: comedi: das08: abbreviate IS_ENABLED()
The `IS_ENABLED(CONFIG_COMEDI_DAS08_ISA)` and
`IS_ENABLED(CONFIG_COMEDI_DAS08_PCI)` macro calls are a bit long-winded.
Define a couple of macros `DO_ISA` and `DO_PCI` as abbreviations for
them.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Fri, 31 Aug 2012 19:41:48 +0000 (20:41 +0100)]
staging: comedi: das08: Add helper functions to check bus type
Add inline helper function `is_isa_board(board)` to check if the driver
supports ISA boards and this is an ISA board, and `is_pci_board(board)`
to check if the driver supports PCI boards and this is a PCI board.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Fri, 31 Aug 2012 19:41:45 +0000 (20:41 +0100)]
staging: comedi: das08: Remove manual configuration of PCI boards
Remove the code that allows PCI boards to be manually attached by the
`COMEDI_DEVCONFIG` ioctl (or the `comedi_config` application).
Supported PCI boards will be attached automatically at probe time via
`comedi_pci_auto_config()` and the `attach_pci` hook in the `struct
comedi_driver`.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Fri, 31 Aug 2012 19:41:44 +0000 (20:41 +0100)]
staging: comedi: das08: Support read-back of AO subdevice
Stash the last value written to each AO channel in private data and
support the INSN_READ instruction to read it back. Don't bother setting
the SDF_READABLE subdevice flag though as the hardware isn't really
readable - we're just faking it.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Fri, 31 Aug 2012 19:41:43 +0000 (20:41 +0100)]
staging: comedi: das08: Initialize AO channels
Initialize the AO subdevice channels to mid-range data value so they are
in a known state. This allows us to support reading back the current
value in a later patch.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Fri, 31 Aug 2012 19:41:42 +0000 (20:41 +0100)]
staging: comedi: das08: Rearrange AO write functions
Combine the AO write functions for 'JR' boards and other boards into a
single function and factor out the data writing from the comedi
instruction handling so it can be called from elsewhere in a later
patch.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Fri, 31 Aug 2012 19:41:41 +0000 (20:41 +0100)]
staging: comedi: das08: Unmark some __maybe_unused functions
The `das08jr_di_rbits()`, `das08jr_do_wbits()`, `das08jr_ao_winsn()` and
`das08ao_ao_winsn()` static functions are currently marked as
`__maybe_unused` as they were formerly only referred to by possibly
conditionally compiled out code. This is no longer the case (they are
referred to by `das08_common_attach()`) so their `__maybe_unused` tags
can be removed.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Fri, 31 Aug 2012 19:41:39 +0000 (20:41 +0100)]
staging: comedi: das08: Remove i8254_iobase from private data
The I/O port base address for the counter subdevice doesn't need to be
stored in the private data. It can be calculated on the fly using the
offset in the static board data.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Move `das08_cs_boards[]` from "das08.c" to "das08_cs.c" and make it
static const. It no longer refers to anything in "das08.c" and no
longer needs to be exported.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Fri, 31 Aug 2012 19:41:35 +0000 (20:41 +0100)]
staging: comedi: das08: Avoid zero initializers in board structure
Don't bother initializing the `i8255_offset` and/or `i8254_offset`
members of `struct das08_board_struct` in `das08_boards[]` and
`das08_cs_boards[]` if they are zero as they are implicitly initialized
to zero anyway, and zero means the corresponding subdevices are absent.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Fri, 31 Aug 2012 19:41:34 +0000 (20:41 +0100)]
staging: comedi: das08: Remove function pointers from board structure
Remove the `ai`, `ao`, `di` and `do` pointers from `struct
das08_board_struct`. These were initialized in `das08_boards[]` and
`das08_cs_boards[]` to point to comedi instruction handler functions for
the subdevice, but there are only two sets of functions depending on
whether the `is_jr` member is true or false, and some of the functions
will be NULL if the corresponding `ai_nbits`, `ao_nbits`, `di_nchan` and
`do_nchan` members are zero. Determine which handler functions to use
in das08_common_attach().
One element of `das08_boards[]` had `ao` set to NULL and `ao_nbits` set
to 12. Set `ao_nbits` to 0 in this case to let das08_common_attach()
know this board has no AO subdevice.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Fri, 31 Aug 2012 19:41:33 +0000 (20:41 +0100)]
staging: comedi: das08: Mark 'JR' boards in board data
Add a bool member `is_jr` to `struct das08_board_struct` and initialize
it to `true` in those elements of `das08_boards[]` corresponding to the
'JR' board models. This will be used by a following patch that removes
the `ai`, `ao`, `di` and `do` members from `struct das08_board_struct`.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Fri, 31 Aug 2012 19:41:32 +0000 (20:41 +0100)]
staging: comedi: das08: Add number of DI channels in board structure
Add member `di_nchan` to `struct das08_board_struct` to set the number
of digital input channels explicitly. Currently, the code determines
the number of channels to 3 or 8 depending on what function the `di`
member points to, which is not very elegant.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Fri, 31 Aug 2012 19:41:31 +0000 (20:41 +0100)]
staging: comedi: das08: Remove pc104 bustype value
Remove the `pc104` value from `enum das08_bustype` and replace
occurrences of it in the code and data with the `isa` value. The code
treats them as equivalent anyway with expressions like
`(thisboard->bustype == isa || thisboard->bustype == pc104)`.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Fri, 31 Aug 2012 19:41:30 +0000 (20:41 +0100)]
staging: comedi: das08: Correct AO output for das08jr-16-ao
Don't zero out bits 15..12 of the data value in `das08jr_ao_winsn()` as
that knobbles the upper three-quarters of the output range for the
'das08jr-16-ao' board.
Ian Abbott [Fri, 31 Aug 2012 19:41:29 +0000 (20:41 +0100)]
staging: comedi: das08: Correct AI encoding for das08jr-16-ao
The element of `das08_boards[]` for the 'das08jr-16-ao' board has the
`ai_encoding` member set to `das08_encode12`. It should be set to
`das08_encode16` same as the 'das08jr/16' board. After all, this board
has 16-bit AI resolution.
The description of the A/D LSB register at offset 0 seems incorrect in
the user manual "cio-das08jr-16-ao.pdf" as it implies that the AI
resolution is only 12 bits. The diagrams of the A/D LSB and MSB
registers show 15 data bits and a sign bit, which matches what the
software expects for the `das08_encode16` AI encoding method.
Ian Abbott [Fri, 24 Aug 2012 16:26:26 +0000 (17:26 +0100)]
staging: comedi: serial2002: Set range for digital inputs and outputs
I got an update from the original author of this driver (Anders
Blomdell) to set the range table for digital input and digital output
subdevices. Apply it.
Cc: Anders Blomdell <anders.blomdell@control.lth.se> Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Mon, 3 Sep 2012 15:39:43 +0000 (16:39 +0100)]
staging: comedi: das08: Fix PCI ref count
When attaching a PCI device manually via the comedi driver `attach` hook
(`das08_attach()`) (called by the comedi core for the `COMEDI_DEVCONFIG`
ioctl), its reference count is incremented in the `for_each_pci_dev`
loop (in `das08_find_pci()`). It is decremented when the `detach` hook
(`das08_detach()`) is called to detach the device. However, when the
PCI device is attached automatically via the `attach_pci` hook
(`das08_attach_pci()`, called at probe time via
`comedi_pci_auto_config()`) it's reference count is not incremented so
there will be an unmatched decrement when detaching the device.
Increment the PCI device reference count in `das08_attach_pci()` to
correct the mismatch.
Once support for manual configuration has been removed from this driver,
the calls to `pci_dev_get()` and `pci_dev_put()` can be removed.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Mon, 3 Sep 2012 15:39:42 +0000 (16:39 +0100)]
staging: comedi: amplc_pci230: Fix PCI ref count
When attaching a PCI device manually via the comedi driver `attach` hook
(`pci230_attach()`) (called by the comedi core for the `COMEDI_DEVCONFIG`
ioctl), its reference count is incremented in the `for_each_pci_dev`
loop (in `pci230_find_pci_dev()`). It is decremented when the `detach`
hook (`pci230_detach()`) is called to detach the device. However, when
the PCI device is attached automatically via the `attach_pci` hook
(`pci230_attach_pci()`, called at probe time via
`comedi_pci_auto_config()`) it's reference count is not incremented so
there will be an unmatched decrement when detaching the device.
Increment the PCI device reference count in `pci230_attach_pci()` to
correct the mismatch.
Once support for manual configuration has been removed from this driver,
the calls to `pci_dev_get()` and `pci_dev_put()` can be removed.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Mon, 3 Sep 2012 15:39:41 +0000 (16:39 +0100)]
staging: comedi: amplc_pc263: Fix PCI ref count
When attaching a PCI device manually via the comedi driver `attach` hook
(`pc263_attach()`) (called by the comedi core for the `COMEDI_DEVCONFIG`
ioctl), its reference count is incremented in the `for_each_pci_dev`
loop (in `pc263_find_pci_dev()`). It is decremented when the `detach`
hook (`pc263_detach()`) is called to detach the device. However, when
the PCI device is attached automatically via the `attach_pci` hook
(`pc263_attach_pci()`, called at probe time via
`comedi_pci_auto_config()`) it's reference count is not incremented so
there will be an unmatched decrement when detaching the device.
Increment the PCI device reference count in `pc263_attach_pci()` to
correct the mismatch.
Once support for manual configuration has been removed from this driver,
the calls to `pci_dev_get()` and `pci_dev_put()` can be removed.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Mon, 3 Sep 2012 15:39:40 +0000 (16:39 +0100)]
staging: comedi: amplc_pc236: Fix PCI ref count
When attaching a PCI device manually via the comedi driver `attach` hook
(`pc236_attach()`) (called by the comedi core for the `COMEDI_DEVCONFIG`
ioctl), its reference count is incremented in the `for_each_pci_dev`
loop (in `pc236_find_pci_dev()`). It is decremented when the `detach`
hook (`pc236_detach()`) is called to detach the device. However, when
the PCI device is attached automatically via the `attach_pci` hook
(`pc236_attach_pci()`, called at probe time via
`comedi_pci_auto_config()`) it's reference count is not incremented so
there will be an unmatched decrement when detaching the device.
Increment the PCI device reference count in `pc236_attach_pci()` to
correct the mismatch.
Once support for manual configuration has been removed from this driver,
the calls to `pci_dev_get()` and `pci_dev_put()` can be removed.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>