It's possible for the kcalloc in comedi_alloc_subdevices to fail.
Only set the dev->n_subdevices variable if the allocation is
successful.
Since the core sets dev->n_subdevices, remove all the places in the
drivers where this variable was getting set.
Signed-off-by: H Hartley Sweeten <[email protected]>
Cc: Ian Abbott <[email protected]>
Cc: Frank Mori Hess <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
It's possible for a couple of the comedi drivers to incorrectly call
comedi_alloc_subdevices with num_subdevices = 0. Add a sanity check
before doing the kcalloc.
Signed-off-by: H Hartley Sweeten <[email protected]>
Cc: Ian Abbott <[email protected]>
Cc: Frank Mori Hess <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
The n_subdevices variable of struct comedi_device is an int type.
Change the type of the comedi_alloc_subdevices 'num_subdevices' from
an unsigned int to an int to match it.
Signed-off-by: H Hartley Sweeten <[email protected]>
Cc: Ian Abbott <[email protected]>
Cc: Frank Mori Hess <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This patch simplifies the previous patch (commit
dd13c86b0d) for fixing the spinlock
recursion issue on several call sites of gdm_usb_send_complete.
Signed-off-by: Ben Chan <[email protected]>
Cc: Sage Ahn <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Move the inline alloc_subdevices() function from comedidev.h
to drivers.c and rename it to comedi_alloc_subdevices(). The
function is large enough to warrant being an exported symbol
rather than being an inline in every driver.
Signed-off-by: H Hartley Sweeten <[email protected]>
Cc: Ian Abbott <[email protected]>
Cc: Frank Mori Hess <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
The ad7298 drivers buffer implementation uses the IIO kfifo buffer, so it needs
to select IIO_KFIFO_BUF. Otherwise (if no other driver selects the symbol) the
following linker error will occur:
drivers/built-in.o: In function `ad7298_register_ring_funcs_and_init':
(.text+0x245cf2): undefined reference to `iio_kfifo_allocate'
drivers/built-in.o: In function `ad7298_register_ring_funcs_and_init':
(.text+0x245d7d): undefined reference to `iio_kfifo_free'
drivers/built-in.o: In function `ad7298_ring_cleanup':
(.text+0x245dcd): undefined reference to `iio_kfifo_free'
Signed-off-by: Lars-Peter Clausen <[email protected]>
Reported-by: Randy Dunlap <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
As we have already got rid of sysfs files in the tpci200 driver, it is needed
to delete that mention in the TODO file.
Signed-off-by: Samuel Iglesias Gonsalvez <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
As there is no pr_* function used here, pr_fmt is not needed.
Signed-off-by: Samuel Iglesias Gonsalvez <[email protected]>
Acked-by: Dan Carpenter <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Rename sm7xx driver to sm7xxfb. Fix Kconfig and Makefile to fit the new
change.
Changes are coherent with the rest of stable framebuffer drivers. TODO
updated.
Signed-off-by: Javier M. Mellid <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This patch updates/adds comments in order to clarify devices and Lynx
families supported for this driver.
Signed-off-by: Javier M. Mellid <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This patch simplifies code. It erases redundant code under little endian
compilations.
Signed-off-by: Javier M. Mellid <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
The original code is equivalent to:
wrqu->retry.flags = 0x1000 & 0x0002;
so it just sets .flags to zero. We should be ORing the values together
like r8192_wx_get_retry() does in drivers/staging/rtl8192u/r8192U_wx.c.
Signed-off-by: Dan Carpenter <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This patch fixes a spinlock recursion bug on several call sites of
gdm_usb_send_complete by not calling spin_lock_irqsave on
urb->context->tx_cxt->lock when the lock has already been acquired.
Signed-off-by: Ben Chan <[email protected]>
Cc: Sage Ahn <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This patch changes the return statement on two
conditions where memory could not be acquired.
It returns -ENOMEM instead of -1.
Signed-off-by: Kevin McKinney <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This patch uses udelay instead of msleep for delays
because msleep can sleep up to 20ms for any value
less than 20.
Signed-off-by: Kevin McKinney <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This patch fixes the following error reported
by checkpatch.pl in nvm.c: "ERROR: return is
not a function, parentheses are not required".
Signed-off-by: Kevin McKinney <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This patch correctly formats all comments as reported
by checkpatch.pl.
Signed-off-by: Kevin McKinney <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This patch cuddles braces as reported
by checkpatch.pl.
Signed-off-by: Kevin McKinney <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This patch resolves all whitespace issues as reported
by checkpatch.pl.
Signed-off-by: Kevin McKinney <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
this patch fixes the coding style problems found by using checkpatch.pl
drivers/staging/wlan-ng/prism2fw.c:175: ERROR: "foo * bar" should be "foo *bar"
drivers/staging/wlan-ng/prism2fw.c:210: WARNING: line over 80 characters
drivers/staging/wlan-ng/prism2fw.c:596: WARNING: line over 80 characters
drivers/staging/wlan-ng/prism2fw.c:658: ERROR: "foo * bar" should be "foo *bar"
Signed-off-by: Devendra Naga <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
there are warnings that are reported by checkpatch.pl
fixed the following problems
drivers/staging/wlan-ng/cfg80211.c:130: WARNING: line over 80 characters
drivers/staging/wlan-ng/cfg80211.c:366: WARNING: line over 80 characters
drivers/staging/wlan-ng/cfg80211.c:543: WARNING: line over 80 characters
drivers/staging/wlan-ng/cfg80211.c:665: WARNING: line over 80 characters
drivers/staging/wlan-ng/cfg80211.c:692: WARNING: line over 80 characters
drivers/staging/wlan-ng/cfg80211.c:735: WARNING: line over 80 characters
Signed-off-by: Devendra Naga <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit fixes coding style and deprecation issues which
includes long lines, braces with single statments in if condition
and deprecated min() function.
Signed-off-by: Adnan Ali <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit fixes deprecated function kernel_thread by replacing
it with kthread_run.
Signed-off-by: Adnan Ali <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit fixes coding style issues related to string splite
across multiple lines.
Signed-off-by: Adnan Ali <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit fixes coding style issues related to string split
across the lines and space before tab at start of line.
Signed-off-by: Adnan Ali <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Previously a 6 byte array (buf) was erroneously cast to a 8 byte long
(event_bits) on 64-bit architectures which caused a stack corruption.
Signed-off-by: Bart Westgeest <[email protected]>
Cc: stable <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Check for MODULE is not needed. In a static compilation the parameters
definition is valid and module_exit() does nothing.
Signed-off-by: Miguel Gómez <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
The source code defines a macro NULLFUNC
#define NULLFUNC 0
and uses it as a generic null function pointer constant. This is
superfluous. Just use NULL instead.
Signed-off-by: Ian Abbott <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
The source code defines a macro NULLFUNC
#define NULLFUNC 0
and uses it as a generic null function pointer constant. This is
superfluous. Just use NULL instead.
Signed-off-by: Ian Abbott <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This side of the if else statement returned with the lock held and IRQs
disabled.
Signed-off-by: Dan Carpenter <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This quiets a couple sparse warnings about:
warning: dubious: !x & y
Also, remove the unnecessary parentheses around the variables.
Signed-off-by: H Hartley Sweeten <[email protected]>
Cc: Ian Abbott <[email protected]>
Cc: Mori Hess <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Move the comedi_unlocked_ioctl function in order to remove most of
the forward declarations in this file.
Signed-off-by: H Hartley Sweeten <[email protected]>
Cc: Ian Abbott <[email protected]>
Cc: Mori Hess <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>