Ian Abbott [Wed, 24 Oct 2012 15:47:53 +0000 (16:47 +0100)]
staging: comedi: amplc_dio200: add helpers to get board layout
Add inline helper function `dio200_board_layout(board)` to get a pointer
to the board layout data for a board. Add inline helper function
`dio200_dev_layout(dev)` to get a pointer to the board layout data for a
comedi device (this function is currently unused but will be used by a
later change).
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Now that the tag name `dio200_layout` is available, rename `struct
dio200_layout_struct` to `struct dio200_layout` as the `_struct` suffix
is a bit redundant and I plan to use this type in other places in the
module.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Wed, 24 Oct 2012 15:47:50 +0000 (16:47 +0100)]
staging: comedi: amplc_dio200: pass device to clock/gate config
Rename the clock and gate configuration functions for the '8254' counter
subdevices and pass in the pointers to the comedi device and comedi
subdevice. This is just preparing the way for later changes.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Wed, 24 Oct 2012 15:47:48 +0000 (16:47 +0100)]
staging: comedi: amplc_dio200: no need to set hw_dev
The call to `comedi_set_hw_dev()` from `dio200_pci_common_attach()` is
now unnecessary since `dio200_pci_common_attach()` is now only called
from this driver's `attach_pci` hook `dio200_attach_pci()` and the
comedi core now calls `comedi_set_hw_dev()` before calling that. Remove
the unnecessary call.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Wed, 24 Oct 2012 15:47:47 +0000 (16:47 +0100)]
staging: comedi: amplc_dio200: no need to manipulate PCI ref count
Now that this driver no longer supports "manual" attachment of PCI
devices in its `attach` hook (`dio200_attach()`), it no longer has code
that searches for a suitable PCI device and increments its reference
count. Since the driver no longer has any reason for incrementing and
decrementing the PCI device's reference count, 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 [Wed, 24 Oct 2012 15:47:46 +0000 (16:47 +0100)]
staging: comedi: amplc_dio200: 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>
YAMANE Toshiaki [Wed, 24 Oct 2012 12:06:17 +0000 (21:06 +0900)]
staging/comedi: Use pr_ or dev_ printks in drivers/unioxx5.c
fixed below checkpatch warnings.
- WARNING: Prefer netdev_err(netdev, ... then dev_err(dev, ... then pr_err(... to printk(KERN_ERR ...
- WARNING: Prefer netdev_info(netdev, ... then dev_info(dev, ... then pr_info(... to printk(KERN_INFO ...
YAMANE Toshiaki [Wed, 24 Oct 2012 06:14:46 +0000 (15:14 +0900)]
staging/comedi: Use pr_ or dev_ printks in drivers/usbduxfast.c
fixed below checkpatch warnings.
- WARNING: Prefer netdev_err(netdev, ... then dev_err(dev, ... then pr_err(... to printk(KERN_ERR ...
- WARNING: Prefer netdev_info(netdev, ... then dev_info(dev, ... then pr_info(... to printk(KERN_INFO ...
YAMANE Toshiaki [Wed, 24 Oct 2012 02:52:58 +0000 (11:52 +0900)]
staging/sbe-2t3e3: Use netdev_ or dev_ or pr_ printks in module.c
fixed below checkpatch warning.
- WARNING: Prefer netdev_err(netdev, ... then dev_err(dev, ... then pr_err(... to printk(KERN_ERR ...
- WARNING: Prefer netdev_warn(netdev, ... then dev_warn(dev, ... then pr_warn(... to printk(KERN_WARNING ...
This function handles all the insn_config instructions for the
digital i/o subdevice. These functions are supposed to return
the number of instruction parameters used (insn->n) or an -errno.
Fix the switch() so that the correct result is returned for all
INSN_CONFIG_* cases.
To clarify the code, add a local variable for the 'bit' used with
the instructions used to configure and query the input/output setting
of a channel.
For aesthetic reasons, add a whitespace between each case to improve
readability.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This BUG_ON can never happen. The 'chan' value comes from the comedi
core in the insn->chanspec and will always be in range for the subdevice
number of channels (s->n_chan = NUM_PFI_CHANNELS).
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: ni_660x: remove inline function board()
This function is used to get the dev->board_ptr from the
comedi_device. Remove the function and use a local variable
to hold the pointer where used. Use the comedi_board() helper
to get the pointer.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This inline function has a very generic name and it's only a
wrapper around a simple kzalloc(). Since the inline function
does not save any lines-of-code, instead of renaming it just
remove it and do the kzalloc() directly.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This config item has not carried much meaning for a while now and is
almost always enabled by default. As agreed during the Linux kernel
summit, remove it.
CC: Henk de Groot <pe1dnn@amsat.org> CC: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ceri James [Tue, 23 Oct 2012 12:51:56 +0000 (13:51 +0100)]
Staging: bcm: LeakyBucket.c: Checkpatch fixes
This fixes the following checkpatch issues:
WARNING: line over 80 characters
+ BCM_DEBUG_PRINT(Adapter,DBG_TYPE_TX, TOKEN_COUNTS, DBG_LVL_ALL, "=====>\n");
ERROR: space required after that ',' (ctx:VxV)
+ BCM_DEBUG_PRINT(Adapter,DBG_TYPE_TX, TOKEN_COUNTS, DBG_LVL_ALL, "=====>\n");
^
WARNING: line over 80 characters
+ BCM_DEBUG_PRINT(Adapter,DBG_TYPE_TX, TOKEN_COUNTS, DBG_LVL_ALL, "Adapter found NULL!\n");
ERROR: space required after that ',' (ctx:VxV)
+ BCM_DEBUG_PRINT(Adapter,DBG_TYPE_TX, TOKEN_COUNTS, DBG_LVL_ALL, "Adapter found NULL!\n");
^
Signed-off-by: Ceri James <jamesceri@googlemail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Mark Einon [Tue, 23 Oct 2012 22:34:15 +0000 (23:34 +0100)]
staging: et131x: Fix i386 build warnings from use of dma_addr_t
dma_addr_t can be of size 64 or 32bits, depending on the architecture.
This fixes these build warnings for ARCH=i386, and also tested on x86_64:
drivers/staging/et131x/et131x.c: In function ‘et131x_rx_dma_memory_alloc’:
drivers/staging/et131x/et131x.c:2356:11: warning: passing argument 2 of ‘et131x_align_allocated_memory’ from incompatible pointer type [enabled by default]
drivers/staging/et131x/et131x.c:2260:13: note: expected ‘u64 *’ but argument is of type ‘dma_addr_t *’
drivers/staging/et131x/et131x.c:2378:11: warning: passing argument 2 of ‘et131x_align_allocated_memory’ from incompatible pointer type [enabled by default]
drivers/staging/et131x/et131x.c:2260:13: note: expected ‘u64 *’ but argument is of type ‘dma_addr_t *’
drivers/staging/et131x/et131x.c: In function ‘free_send_packet’:
drivers/staging/et131x/et131x.c:3540:5: warning: left shift count >= width of type [enabled by default]
The driver checks that the device can handle 64bit DMA addressing in
et131x_pci_setup(), but then assumes that the top dword of a tx dma
address is always zero when creating a dma mapping in nic_send_packet().
Fix the mapping to use the higher dword of the dma_addr_t returned by
dma_map_single() and skb_frag_dma_map().
Also remove incorrect comments stating that dma_map_single() only returns
a 32 bit address.
Signed-off-by: Mark Einon <mark.einon@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Mark Einon [Wed, 17 Oct 2012 21:15:11 +0000 (22:15 +0100)]
staging: et131x: Use skb_headlen() where appropriate
(skb->len - skb->data_len) is used in several places in the et131x
driver code. Converted all instances of this to use skb_headlen()
which is more readable.
Signed-off-by: Mark Einon <mark.einon@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Roger Tseng [Fri, 19 Oct 2012 09:43:34 +0000 (17:43 +0800)]
staging: rts5139: fixed issues when config to built-in object
Fixed two issues when CONFIG_RTS5139=y :
- Makefile doesn't take $(CONFIG_RTS5139). It always uses obj-m and built as
a loadable module.
- Rename some symbols with prefix 'rts51x_' to prevent symbol name collisions
with drivers/staging/rts_pstor when both are configured to be built-in
objects.
drivers/staging/rts5139/built-in.o: In function `xd_cleanup_work':
(.text+0x1435d): multiple definition of `xd_cleanup_work'
drivers/staging/rts_pstor/built-in.o:(.text+0x2b96a): first defined here
drivers/staging/rts5139/built-in.o: In function `release_xd_card':
(.text+0x14393): multiple definition of `release_xd_card'
drivers/staging/rts_pstor/built-in.o:(.text+0x2c491): first defined here
drivers/staging/rts5139/built-in.o: In function `set_sense_data':
(.text+0x1e02): multiple definition of `set_sense_data'
drivers/staging/rts_pstor/built-in.o:(.text+0xa79f): first defined here
drivers/staging/rts5139/built-in.o: In function `ms_delay_write':
...
Signed-off-by: Roger Tseng <rogerable@realtek.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Staging: ipack/carriers: fix missing include linux/slab.h
Kernel build failed for parisc architecture:
drivers/staging/ipack/carriers/tpci200.c: In function 'tpci200_free_irq':
drivers/staging/ipack/carriers/tpci200.c:190:2: error: implicit declaration of
function 'kfree' [-Werror=implicit-function-declaration]
drivers/staging/ipack/carriers/tpci200.c: In function 'tpci200_request_irq':
drivers/staging/ipack/carriers/tpci200.c:217:2: error: implicit declaration of
function 'kzalloc' [-Werror=implicit-function-declaration]
Jesper Juhl [Thu, 18 Oct 2012 19:43:55 +0000 (21:43 +0200)]
Staging: silicom: Fix up version.h includes
drivers/staging/silicom/bypasslib/bplibk.h actually uses stuff from
version.h so it should include the header.
drivers/staging/silicom/bp_proc.c and
drivers/staging/silicom/bypasslib/bypass.c currently include the
header but use nothing from it so they don't need to.
Andy Gross [Wed, 17 Oct 2012 05:30:03 +0000 (00:30 -0500)]
drm/omap: Remove cpu_is_omapXXXX usage in DMM
Removed usage of the cpu_is_omapXXXX in the DMM driver. This is no
longer necessary as we can key off of the omap_dmm pointer that is
only non-NULL if the device has been probed successfully.
Signed-off-by: Andy Gross <andy.gross@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stefan Hajnoczi [Mon, 15 Oct 2012 18:52:27 +0000 (20:52 +0200)]
staging: line6: drop unused line6_index and line6_id arrays
The line6 driver does not support 'index' and 'id' module parameters so
there is no need to keep arrays for these values. Do what other sound
drivers do and use the scalar constants instead of dummy arrays.
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: ccg: rename ccg init and exit functions to conventional names
Previous names of init and exit functions "init" and "cleanup" are
unconventional and are not friendly for source navigation with tags.
New names "ccg_init" and "ccg_exit" are conveninal and source navigation
friendly.
Rob Clark [Fri, 12 Oct 2012 23:58:02 +0000 (18:58 -0500)]
drm/omap: fix issue w/ fb attached to multiple CRTCs
When the fb is detached from one CRTC/plane, paddr was set back to
zero. But really we don't want to do this because the fb could still
be attached to other CRTC/plane(s). This originally worked like this
to catch cases of freeing a pinned fb (but with the refcnt'ing this
should no longer be needed). Also, there is checking in the GEM code
for freeing a pinned GEM object, so this extra level of checking is
redundant.
Signed-off-by: Rob Clark <rob@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Andy Gross [Fri, 12 Oct 2012 16:18:11 +0000 (11:18 -0500)]
drm/omap: Fix release of refill engine
During asynchronous refills, we don't wait for the refill to
finish. However, we cannot release the engine back to the idle
list until it has actually completed the refill operation. The
engine release will now be done in the IRQ handler, but only
for asynchronous refill operations.
Synchronous refills will continue to release the engine after they
unblock from waiting on the refill.
v2: Fixed review comments on async variable and bool type
Signed-off-by: Andy Gross <andy.gross@ti.com> Signed-off-by: Rob Clark <rob@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Andy Gross [Fri, 12 Oct 2012 04:06:43 +0000 (23:06 -0500)]
drm/omap: Remove shadow lut usage
Removing extraneous shadow lut maintenance. There is no need for
this to be in place until power management is added to the driver,
and this extra copy degrades performance for no gain.
Signed-off-by: Andy Gross <andy.gross@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Alan Cox [Thu, 11 Oct 2012 16:21:03 +0000 (17:21 +0100)]
staging: dgrp: fix some warnings
Just squashing these to get them out of the analysis queue.
nd_ps_desc is an array not a pointer so comparing it with NULL is silly (be
nice if gcc shouted about this). And there are some slightly pointless
comparisons too.
Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Merge tag 'iio-for-3.8a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next
First round of new IIO drivers and cleanups for the 3.8 cycle.
Here we have
* New driver ad5449 with the introduction of a new IIO return type
to simplify power of 2 dividers (extremely common case).
* Some coccinelle warning fixing patches (dull but worthwhile as
make for easier automated testing and cut down on false positives).
* Some trivial bits of formatting cleanup and spelling corrections.
* Use kcalloc in a few places for semantic reasons.
* Stop lis3l02dq driver (soon to be dropped I hope) using now non
existent irq_to_gpio.
* Some dead code/unused variable removal
* Convert a few drivers to generic core provided functions instead
of their own versions.
So all in all a nice new driver and a lot of worthy but dull cleanup.
Bernard Blackham [Sun, 21 Oct 2012 19:45:00 +0000 (06:45 +1100)]
staging: usbip: Don't leak struct file.
usbip takes a reference on a struct file which is passed in via
sysfs. Previously, this reference was never cleaned up, although
the socket it referred to was.
This patch drops the corresponding reference (found with the
socket's ->file backpointer) instead of just closing the socket.
Signed-off-by: Bernard Blackham <b-linuxgit@largestprime.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bart Westgeest [Wed, 10 Oct 2012 17:34:25 +0000 (13:34 -0400)]
staging: usbip: replaced pointer arithmetic, and strongly type function return.
Replaced pointer arithmetic by using array indexing, and changed
function return type for usbip_alloc_iso_desc_pdu from 'void*' to
'struct usbip_iso_packet_descriptor'.