linux-2.6-microblaze.git
11 years agostaging: drm/imx: fix number of IPU IRQs
Philipp Zabel [Fri, 21 Jun 2013 08:27:38 +0000 (10:27 +0200)]
staging: drm/imx: fix number of IPU IRQs

There are 15 32-bit registers altogether.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agozram: remove zram_sysfs file (v2)
Sergey Senozhatsky [Sat, 22 Jun 2013 00:21:18 +0000 (03:21 +0300)]
zram: remove zram_sysfs file (v2)

Move zram sysfs code to zram drv and remove zram_sysfs.c
file. This gives ability to make static a number of previously
exported zram functions, used from zram sysfs, e.g. internal zram
zram_meta_alloc/free(). We also can drop zram_drv wrapper
functions, used from zram sysfs:
e.g. zram_reset_device()/__zram_reset_device() pair.

v2: as suggested by Greg K-H, move MODULE description to the
bottom of the file.

Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: nvec: move device tree parsing to its own function
Marc Dietrich [Fri, 21 Jun 2013 08:28:55 +0000 (10:28 +0200)]
staging: nvec: move device tree parsing to its own function

This moves device tree parsing to its own function so more stuff can
be cleanly added in the future.

Signed-off-by: Leon Romanovsky <leon@leon.nu>
Signed-off-by: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: nvec: remove instantiating via platform device
Marc Dietrich [Fri, 21 Jun 2013 08:28:54 +0000 (10:28 +0200)]
staging: nvec: remove instantiating via platform device

Tegra has been converted to support device tree only. Remove support
for instantiating via platform device.

Signed-off-by: Leon Romanovsky <leon@leon.nu>
Signed-off-by: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoStaging: vt6655: aes_ccmp: fixed a brace coding style
John B. Wyatt IV [Thu, 20 Jun 2013 06:56:45 +0000 (23:56 -0700)]
Staging: vt6655: aes_ccmp: fixed a brace coding style

Fixed a coding style issue.

Signed-off-by: John B. Wyatt IV <sageofredondo@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: vt6655: info leak in ioctl
Dan Carpenter [Mon, 24 Jun 2013 16:12:09 +0000 (19:12 +0300)]
staging: vt6655: info leak in ioctl

The SCmdLinkStatus struct has a couple holes.  There is one between
->bLink and ->wBSSType, and another between ->abySSID and ->uChannel.

I've added a memset() to initialize the struct to zero.  Since we don't
need to clear abySSID any more so I've removed that memset.  It was
wrong anyway: abySSID has "SSID_MAXLEN + 2" (34) bytes, not
"WLAN_SSID_MAXLEN + 1" (33).

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: dwc2: fix thinko in dwc2_hc_set_even_odd_frame()
Paul Zimmerman [Mon, 24 Jun 2013 18:34:23 +0000 (11:34 -0700)]
staging: dwc2: fix thinko in dwc2_hc_set_even_odd_frame()

I screwed up the sense of this if() statement while porting our
vendor driver to create the dwc2 driver. This caused frame overrun
errors on periodic transfers when there were other transfers
active in the same (micro)frame.

With this fix, the dwc2 driver now works on the Raspberry Pi
platform even with the USB Ethernet controller enabled, where
before that would cause all USB devices to stop working.

Thanks to Ray Jui and Jerry Lin at Broadcom for tracking this down.

Reported-by: Ray Jui <rjui@broadcom.com>
Signed-off-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: netlogic: Fix typo in staging/netlogic
Masanari Iida [Sun, 23 Jun 2013 14:57:21 +0000 (23:57 +0900)]
staging: netlogic: Fix typo in staging/netlogic

Correct spelling typo in printk.

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: android: Fix typo in staging/android
Masanari Iida [Sun, 23 Jun 2013 14:47:15 +0000 (23:47 +0900)]
staging: android: Fix typo in staging/android

Fix "with with" in debug message.

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: frontier: Fix typo in staging/frontier
Masanari Iida [Sun, 23 Jun 2013 14:36:56 +0000 (23:36 +0900)]
staging: frontier: Fix typo in staging/frontier

Collect "be be" in dev_err messages.

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: line6: avoid __sync_fetch_and_{and,or}
Arnd Bergmann [Fri, 21 Jun 2013 19:55:35 +0000 (21:55 +0200)]
staging: line6: avoid __sync_fetch_and_{and,or}

__sync_fetch_and_and and __sync_fetch_and_or are functions that are provided
by gcc and depending on the target architecture may be implemented in libgcc,
which is not always available in the kernel. This leads to a build failure
on ARMv5:

drivers/built-in.o: In function `line6_pcm_release':
:(.text+0x3bfe80): undefined reference to `__sync_fetch_and_and_4'
drivers/built-in.o: In function `line6_pcm_acquire':
:(.text+0x3bff30): undefined reference to `__sync_fetch_and_or_4'

To work around this, we can use the kernel-provided cmpxchg macro.

Build-tested only.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Markus Grabner <grabner@icg.tugraz.at>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: pcmuio: fix namespace for all private functions
H Hartley Sweeten [Tue, 18 Jun 2013 20:27:19 +0000 (13:27 -0700)]
staging: comedi: pcmuio: fix namespace for all private functions

Rename a couple private functions so they have the same namespace
as the driver.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: pcmuio: return 0 for successful attach
H Hartley Sweeten [Tue, 18 Jun 2013 20:26:59 +0000 (13:26 -0700)]
staging: comedi: pcmuio: return 0 for successful attach

Returning 0 for success is more common.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: pcmuio: remove dev_dbg() noise during attach
H Hartley Sweeten [Tue, 18 Jun 2013 20:26:42 +0000 (13:26 -0700)]
staging: comedi: pcmuio: remove dev_dbg() noise during attach

This is just added noise. Remove it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: pcmuio: use preferred form for passing the size of a struct
H Hartley Sweeten [Tue, 18 Jun 2013 20:26:24 +0000 (13:26 -0700)]
staging: comedi: pcmuio: use preferred form for passing the size of a struct

As suggested by the CodingStyle.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: pcmuio: cleanup remaining #define's
H Hartley Sweeten [Tue, 18 Jun 2013 20:26:05 +0000 (13:26 -0700)]
staging: comedi: pcmuio: cleanup remaining #define's

Remove all the unused #define's and add namespace to the ones that
are used.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: pcmuio: cleanup DIO subdevice (*insn_{bits,config})
H Hartley Sweeten [Tue, 18 Jun 2013 20:25:47 +0000 (13:25 -0700)]
staging: comedi: pcmuio: cleanup DIO subdevice (*insn_{bits,config})

Use the pcmuio_{read,write}() helpers to read/write all 24 channels
instead of handling the digital I/O as three separate ports. This
simplifies both functions with minimal overhead.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: pcmuio: introduce pcmuio_read()
H Hartley Sweeten [Tue, 18 Jun 2013 20:25:15 +0000 (13:25 -0700)]
staging: comedi: pcmuio: introduce pcmuio_read()

Introduce a helper function to handle reading a 24-bit value from the
three 8-bit registers associated with a "port" or "page".

Simplify the for() loop in pcmuio_handle_asic_interrupt() that finds
which channels have triggered the interrupt.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: pcmuio: simplify interrupt subdevice init
H Hartley Sweeten [Tue, 18 Jun 2013 20:24:56 +0000 (13:24 -0700)]
staging: comedi: pcmuio: simplify interrupt subdevice init

Only subdevices 0 and 2 support interrupts. Simplify the attach
a bit.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: pcmuio: remove 'iobases' from subdevice private data
H Hartley Sweeten [Tue, 18 Jun 2013 20:24:36 +0000 (13:24 -0700)]
staging: comedi: pcmuio: remove 'iobases' from subdevice private data

The 'asic' and 'port' associated with a given subdevice can easily be
found based on the subdevice 'index'. With that information we can
then calculate the correct iobase and register offset needed to read/
write the 8-bit ports.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: pcmuio: remove 'iobase' from private data
H Hartley Sweeten [Tue, 18 Jun 2013 20:24:05 +0000 (13:24 -0700)]
staging: comedi: pcmuio: remove 'iobase' from private data

It's simple enough to calculate the iobase when needed. Remove this
member from the private data.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: pcmuio: simplify 'n_subdevs' and 's->n_chan'
H Hartley Sweeten [Tue, 18 Jun 2013 20:23:46 +0000 (13:23 -0700)]
staging: comedi: pcmuio: simplify 'n_subdevs' and 's->n_chan'

The number of subdevices needed by the driver is based on the
'num_asics' reported by the boardinfo and each subdevice always
has 24 channels. Simplify the attach a bit.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: pcmuio: remove unused boardinfo
H Hartley Sweeten [Tue, 18 Jun 2013 20:23:21 +0000 (13:23 -0700)]
staging: comedi: pcmuio: remove unused boardinfo

These members of the boardinfo are not used by the driver. Remove
them.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: pcmuio: kzalloc'ed data does not need cleared
H Hartley Sweeten [Tue, 18 Jun 2013 20:23:02 +0000 (13:23 -0700)]
staging: comedi: pcmuio: kzalloc'ed data does not need cleared

The 'subpriv' pointer is kzalloc'ed during the attach.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: pcmuio: remove 'asic_chan'
H Hartley Sweeten [Tue, 18 Jun 2013 20:22:42 +0000 (13:22 -0700)]
staging: comedi: pcmuio: remove 'asic_chan'

This member of the subdevice private data is always initialize to
'0' due to the 'thisasic_chanct' always being zero when it is set
during the attach. Simplify the driver a bit by removing it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: pcmuio: remove 'num_asic_chans'
H Hartley Sweeten [Tue, 18 Jun 2013 20:22:25 +0000 (13:22 -0700)]
staging: comedi: pcmuio: remove 'num_asic_chans'

This member of the subdevice private data is always initialize to
s->n_chan if the subdevice supports interrupts and is only used
in functions that can be called by the interrupt subdevice.

Simplyfy the driver a bit  by removing it and just using s->n_chan.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: pcmuio: remove 'first_chan'
H Hartley Sweeten [Tue, 18 Jun 2013 20:22:07 +0000 (13:22 -0700)]
staging: comedi: pcmuio: remove 'first_chan'

This member of the subdevice private data is always initialize to
'0' due to the 'byte_no' always being zero when it is set during
the attach. Simplify the driver a bit by removing it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: pcmuio: remove unused private data variables
H Hartley Sweeten [Tue, 18 Jun 2013 20:21:50 +0000 (13:21 -0700)]
staging: comedi: pcmuio: remove unused private data variables

These members of the private data are either not referenced or are set
but never used by the driver. Remove them.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: pcmuio: introduce pcmuio_write()
H Hartley Sweeten [Tue, 18 Jun 2013 20:21:30 +0000 (13:21 -0700)]
staging: comedi: pcmuio: introduce pcmuio_write()

Introduce a helper function to handle writing a 24-bit value to the
three 8-bit registers associated with a "port" or "page".

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: pcmuio: tidy up switch_page()
H Hartley Sweeten [Tue, 18 Jun 2013 20:21:13 +0000 (13:21 -0700)]
staging: comedi: pcmuio: tidy up switch_page()

All the I/O ports are left unlocked in the driver so the 'pagelock'
in the private data is not necessary. The paranoia sanity checks
are also unnecessary, Remove them.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: pcmuio: tidy up the register map defines
H Hartley Sweeten [Tue, 18 Jun 2013 20:20:51 +0000 (13:20 -0700)]
staging: comedi: pcmuio: tidy up the register map defines

Add namespace to the register map defines. Gather them together
and tidy them up a bit.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: pcmuio: remove unused {lock,unlock}_port()
H Hartley Sweeten [Tue, 18 Jun 2013 20:20:29 +0000 (13:20 -0700)]
staging: comedi: pcmuio: remove unused {lock,unlock}_port()

These functions are #ifdef'ed out and not needed in the driver.
Just remove them.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: have comedi_set_spriv() allocate the memory
H Hartley Sweeten [Wed, 19 Jun 2013 22:24:36 +0000 (15:24 -0700)]
staging: comedi: have comedi_set_spriv() allocate the memory

As suggested by Ian Abbott, comedi_set_spriv() can only be used to
set the subdevice->private pointer to something that can be kfree()'d.
Rename the function to comedi_alloc_spriv() and have it kzalloc() the
memory as well as set the private pointer. This saves a function call
in the drivers and avoids the possibility of incorrectly calling
comedi_set_spriv() for some pointer that is not meant to be kfree()'d.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: addi-data: remove unused 'i_NbrTTLChannel' boardinfo
H Hartley Sweeten [Tue, 18 Jun 2013 19:15:45 +0000 (12:15 -0700)]
staging: comedi: addi-data: remove unused 'i_NbrTTLChannel' boardinfo

None of the addi-data drivers that still use the "common" code have
ttl digital i/o. Remove the unnecessary boardinfo as well as the
subdevice initialization code.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: addi-data: remove unused 'i_Dma' present flag
H Hartley Sweeten [Tue, 18 Jun 2013 19:15:21 +0000 (12:15 -0700)]
staging: comedi: addi-data: remove unused 'i_Dma' present flag

None of the addi-data drivers that still use the "common" code support
dma. Remove the unnecessaary boardinfo and private data flags.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: addi-data: remove unused vars from boardinfo
H Hartley Sweeten [Tue, 18 Jun 2013 19:14:55 +0000 (12:14 -0700)]
staging: comedi: addi-data: remove unused vars from boardinfo

Due to the on-going cleanup of the addi-data drivers, the boardinfo
used in the "common" code has a number of variables that are not
used. Remove the cruft.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: addi-data: remove unused defines in addi_common.h
H Hartley Sweeten [Tue, 18 Jun 2013 19:14:36 +0000 (12:14 -0700)]
staging: comedi: addi-data: remove unused defines in addi_common.h

Due to the on-going cleanup of the addi-data drivers, there are a
number of unused defines in addi_common.h. Remove the cruft.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: addi-data: simplify the PCI bar reading
H Hartley Sweeten [Tue, 18 Jun 2013 19:14:17 +0000 (12:14 -0700)]
staging: comedi: addi-data: simplify the PCI bar reading

All of the remaining addi-data drivers that use the "common" code
either do not have an eeprom or the PCI controller chip is not a
PLX PCI 9054. Knowing this we can simplify the common code that
reads the PCI bars to get the iobase addresses.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: addi-data: remove unused vars from private data
H Hartley Sweeten [Tue, 18 Jun 2013 19:13:49 +0000 (12:13 -0700)]
staging: comedi: addi-data: remove unused vars from private data

Due to the on-going cleanup of the addi-data drivers, the private
data used in the "common" code has a number of variables that
either are not used at all or or set but never used.

Remove all of them from the private data and the unnecessary use
in the drivers.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: rtl8192u: fix comments in r819xU_phy.c
Xenia Ragiadakou [Wed, 19 Jun 2013 01:58:07 +0000 (04:58 +0300)]
staging: rtl8192u: fix comments in r819xU_phy.c

This patch fixes the comments in r819xU_phy.c by:
- replacing "// ..." with "/* .... */"
- removing unnecessary comments, the dates and names of
  developers from comments
- fixing some inconsistent comments
- fixing some typos
- fixing alignment issues

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: rtl8192u: fix spaces around ',' in r819xU_phy.c
Xenia Ragiadakou [Wed, 19 Jun 2013 01:58:06 +0000 (04:58 +0300)]
staging: rtl8192u: fix spaces around ',' in r819xU_phy.c

This patch fixes the whitespace around ',' to meet the
linux kernel coding style.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: rtl8192u: remove variable 'Ret' in r819xU_phy.c
Xenia Ragiadakou [Wed, 19 Jun 2013 01:58:05 +0000 (04:58 +0300)]
staging: rtl8192u: remove variable 'Ret' in r819xU_phy.c

This patch removes variable 'Ret' from rtl8192_QueryBBReg()
since its value is returned immediately after it is
assigned. The name 'Ret', anyway, does not give any
insight and the function description comment is sufficiently
informative regarding the returned value.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoStaging: netlogic: fix missing free_netdev() on error in xlr_net_probe()
Wei Yongjun [Wed, 19 Jun 2013 02:29:59 +0000 (10:29 +0800)]
Staging: netlogic: fix missing free_netdev() on error in xlr_net_probe()

Fix missing free_netdev() before return from function xlr_net_probe()
in the devm_ioremap_resource() error handling case.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoStaging: silicom: move more assignments out of if conditions
Chad Williamson [Tue, 18 Jun 2013 03:32:05 +0000 (22:32 -0500)]
Staging: silicom: move more assignments out of if conditions

Remove more assignments from if-statement conditions in bpctl_mod.c,
resolving checkpatch.pl errors. Those that remain need more attention
than I'm presently prepared to give them.

Signed-off-by: Chad Williamson <chad@dahc.us>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoStaging: silicom: move assignments out of if conditions
Chad Williamson [Tue, 18 Jun 2013 03:32:04 +0000 (22:32 -0500)]
Staging: silicom: move assignments out of if conditions

Remove a bunch of assignments from if-statement conditions in
bpctl_mod.c, resolving checkpatch.pl errors. (This isn't all of
them, but the patch is getting rather long...)

Signed-off-by: Chad Williamson <chad@dahc.us>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoStaging: silicom: remove unnecessary braces in bpctl_mod.c
Chad Williamson [Tue, 18 Jun 2013 03:32:02 +0000 (22:32 -0500)]
Staging: silicom: remove unnecessary braces in bpctl_mod.c

Remove unnecessary braces in bpctl_mod.c, resolving checkpatch.pl
warnings.

Signed-off-by: Chad Williamson <chad@dahc.us>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: rtl8192u: rename general variables in r819xU_phy.c
Xenia Ragiadakou [Tue, 18 Jun 2013 02:29:41 +0000 (05:29 +0300)]
staging: rtl8192u: rename general variables in r819xU_phy.c

This patch renames the following variables:
- dwRegAddr and RegAddr into reg_addr
- dwData and Data       into data
- BitShift              into bitshift
- Offset                into offset
- NewOffset             into new_offset
- Bandwidth             into bandwidth

The renaming was done to remove camel case and
unnecessary 'dw' prefix from the above variable names.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: rtl8192u: rename *BitMask variables in r819xU_phy.c
Xenia Ragiadakou [Tue, 18 Jun 2013 02:29:40 +0000 (05:29 +0300)]
staging: rtl8192u: rename *BitMask variables in r819xU_phy.c

This patch renames BitMask and dwBitMask variables into
bitmask to remove camel case.
dwBitMask in the given context can be renamed into simply
bitmask since its number of bits (dw->32) can be deduced
by its type which is u32.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: rtl8192u: replace *Value variables in r819xU_phy.c
Xenia Ragiadakou [Tue, 18 Jun 2013 02:29:39 +0000 (05:29 +0300)]
staging: rtl8192u: replace *Value variables in r819xU_phy.c

This patch renames the variables OriginalValue, NewValue,
Original_Value, New_Value and retValue to reg, and
the variables bRegValue and dwRegValue to reg_u8 and
reg_u32, respectively. This is done primarily in
order to reduce the variable name length and consequently
line length.

Also, it replaces the pair of Original and New variables
with one variable.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: rtl8192u: fix spaces around relational operators in r819xU_phy.c
Xenia Ragiadakou [Tue, 18 Jun 2013 02:29:38 +0000 (05:29 +0300)]
staging: rtl8192u: fix spaces around relational operators in r819xU_phy.c

This patch fixes the whitespace around relational operators
to meet the linux kernel coding style.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: rtl8192u: fix spaces around ';' in r819xU_phy.c
Xenia Ragiadakou [Tue, 18 Jun 2013 02:29:37 +0000 (05:29 +0300)]
staging: rtl8192u: fix spaces around ';' in r819xU_phy.c

This patch fixes the whitespace around ';' to meet the
linux kernel coding style.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: rtl8192u: fix spaces around '=' in r819xU_phy.c
Xenia Ragiadakou [Tue, 18 Jun 2013 02:29:36 +0000 (05:29 +0300)]
staging: rtl8192u: fix spaces around '=' in r819xU_phy.c

This patch fixes the whitespace around the assignment
operator to meet linux kernel coding style.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: imx_drm: imx_ldb: fix 18 bit format
Markus Niebel [Tue, 18 Jun 2013 01:23:58 +0000 (09:23 +0800)]
staging: imx_drm: imx_ldb: fix 18 bit format

Since 18 bit is supported as datawidth in device tree it should be
supported in driver. Beside the LDB channel the IPU channel has also
to be configured to use BGR666.

Signed-off-by: Markus Niebel <Markus.Niebel@tqs.de>
Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: drm/imx: Add LDB support
Sascha Hauer [Tue, 18 Jun 2013 01:23:57 +0000 (09:23 +0800)]
staging: drm/imx: Add LDB support

This adds support for the LVDS Display Bridge contained
in i.MX5 and i.MX6 SoCs.

Bit mapping, data width, and video timings are configurable
via device tree. Dual-channel mode is supported for a single
high-resolution source.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging/rtl8192u: remove commented out __list_for_each usage
Dave Jones [Tue, 18 Jun 2013 02:26:40 +0000 (22:26 -0400)]
staging/rtl8192u: remove commented out __list_for_each usage

Also remove another commented out open-coded list manipulation while we're there.

Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging/rtl8187se: Convert __list_for_each use to list_for_each
Dave Jones [Tue, 18 Jun 2013 02:26:46 +0000 (22:26 -0400)]
staging/rtl8187se: Convert __list_for_each use to list_for_each

Also remove commented out list manipulation

Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: octeon-usb: octeon-hcd: eliminate printk()s
Aaro Koskinen [Mon, 17 Jun 2013 23:36:20 +0000 (02:36 +0300)]
staging: octeon-usb: octeon-hcd: eliminate printk()s

Replace one printk() with dev_dbg(), and delete the other.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: octeon-usb: octeon-hcd: delete commented-out code
Aaro Koskinen [Mon, 17 Jun 2013 23:36:18 +0000 (02:36 +0300)]
staging: octeon-usb: octeon-hcd: delete commented-out code

Delete commented-out code.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: octeon-usb: octeon-hcd: reformat long comments
Aaro Koskinen [Mon, 17 Jun 2013 23:36:19 +0000 (02:36 +0300)]
staging: octeon-usb: octeon-hcd: reformat long comments

Fix some comments to fit into 80 colums.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: octeon-usb: octeon-hcd: use dev_dbg
Aaro Koskinen [Mon, 17 Jun 2013 23:36:17 +0000 (02:36 +0300)]
staging: octeon-usb: octeon-hcd: use dev_dbg

Replace DEBUG macros with dev_dbg. Some less useful are completely
deleted.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agosilicom: checkpatch: trailing statements
Lorenz Haspel [Mon, 17 Jun 2013 16:26:25 +0000 (18:26 +0200)]
silicom: checkpatch: trailing statements

fixed checkpatch error:
trailing statements that should be on next line

Signed-off-by: Lorenz Haspel <lorenz@badgers.com>
Signed-off-by: Michael Banken <michael.banken@mathe.stud.uni-erlangen.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agosilicom: checkpatch: fixed whitespace errors
Lorenz Haspel [Mon, 17 Jun 2013 16:26:24 +0000 (18:26 +0200)]
silicom: checkpatch: fixed whitespace errors

started cleanfile
also fixed some other whitespace errors cleanfile didn't find

Signed-off-by: Lorenz Haspel <lorenz@badgers.com>
Signed-off-by: Michael Banken <michael.banken@mathe.stud.uni-erlangen.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: serqt_usb2: lines over 80 characters fixed
Bernd Bassimir [Fri, 14 Jun 2013 14:55:58 +0000 (16:55 +0200)]
staging: serqt_usb2: lines over 80 characters fixed

Changed name of one variable, so that all lines are now below 80
characters.

Signed-off-by: Bernd Bassimir <bassimir.kernel@gmx.de>
Signed-off-by: Nico Doerr <nico.doerr@hawo.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: serqt_usb2: Fixed coding style CamelCases
Bernd Bassimir [Fri, 14 Jun 2013 14:55:57 +0000 (16:55 +0200)]
staging: serqt_usb2: Fixed coding style CamelCases

Changed names of several variables, that contained CamelCases.

Signed-off-by: Bernd Bassimir <bassimir.kernel@gmx.de>
Signed-off-by: Nico Doerr <nico.doerr@hawo.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: rtl8192u: fix function arguments position in r819xU_phy.c
Xenia Ragiadakou [Sat, 15 Jun 2013 04:29:08 +0000 (07:29 +0300)]
staging: rtl8192u: fix function arguments position in r819xU_phy.c

This patch fixes the alignment of function arguments to make
it uniform across the driver trying to keep the line size
below 80 characters.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: rtl8192u: fix spaces around ( and ) in r819xU_phy.c
Xenia Ragiadakou [Sat, 15 Jun 2013 04:29:07 +0000 (07:29 +0300)]
staging: rtl8192u: fix spaces around ( and ) in r819xU_phy.c

This patch removes whitespace after ')' and before ')'
following the linux kernel coding style conventions.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: rtl8192u: remove commented-out code in r819xU_phy.c
Xenia Ragiadakou [Sat, 15 Jun 2013 04:29:06 +0000 (07:29 +0300)]
staging: rtl8192u: remove commented-out code in r819xU_phy.c

This patch removes commented-out code to improve code
readability.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: rtl8192u: fix spaces around for and while in r819xU_phy.c
Xenia Ragiadakou [Sat, 15 Jun 2013 04:29:05 +0000 (07:29 +0300)]
staging: rtl8192u: fix spaces around for and while in r819xU_phy.c

This patch fixes whitespace around 'for' and 'while'
following the linux kernel coding style conventions.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: rtl8192u: fix spaces around 'if' in r819xU_phy.c
Xenia Ragiadakou [Sat, 15 Jun 2013 04:29:04 +0000 (07:29 +0300)]
staging: rtl8192u: fix spaces around 'if' in r819xU_phy.c

This patch fixes whitepace around 'if' following the linux
kernel coding style convention.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: rtl8192u: fix return statements in r819xU_phy.c
Xenia Ragiadakou [Sat, 15 Jun 2013 04:29:03 +0000 (07:29 +0300)]
staging: rtl8192u: fix return statements in r819xU_phy.c

This patch fixes the following checkpatch error:
ERROR: return is not a function, parentheses are not required

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: rtl8192u: fix braces in r819xU_phy.c
Xenia Ragiadakou [Sat, 15 Jun 2013 04:29:02 +0000 (07:29 +0300)]
staging: rtl8192u: fix braces in r819xU_phy.c

This patch fixes the brace position and the whitespace
around braces.

That corrects the following checkpatch errors:
ERROR: that open brace { should be on the previous line
ERROR: else should follow close brace '}'
ERROR: space required after that close brace '}'

Also, it removes completely an if(0) statement,
instead of correcting its braces.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: rtl8192u: fix bitshift calculation in r819xU_phy.c
Xenia Ragiadakou [Sat, 15 Jun 2013 04:29:01 +0000 (07:29 +0300)]
staging: rtl8192u: fix bitshift calculation in r819xU_phy.c

This patch uses the ffs linux built-in routine in the
computation of the bitshift to take advantage of
architecture specific instructions that implement this
computation more efficiently.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: vt6656: mac.c MACvDisableKeyEntry remove dead code wOffset
Malcolm Priestley [Mon, 17 Jun 2013 21:34:39 +0000 (22:34 +0100)]
staging: vt6656: mac.c MACvDisableKeyEntry remove dead code wOffset

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: vt6656: mac.c Remove commented out dead code
Malcolm Priestley [Mon, 17 Jun 2013 21:31:00 +0000 (22:31 +0100)]
staging: vt6656: mac.c Remove commented out dead code

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: vt6656: mac.c pbyData Remove magic number array size
Malcolm Priestley [Mon, 17 Jun 2013 21:19:54 +0000 (22:19 +0100)]
staging: vt6656: mac.c pbyData Remove magic number array size

Array size always equals ARRAY_SIZE of pbyData

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: octeon-usb: octeon-hcd: make internal variable static
Aaro Koskinen [Wed, 12 Jun 2013 22:00:38 +0000 (01:00 +0300)]
staging: octeon-usb: octeon-hcd: make internal variable static

Make an internal variable static.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: octeon-usb: octeon-hcd: fix some includes
Aaro Koskinen [Wed, 12 Jun 2013 22:00:35 +0000 (01:00 +0300)]
staging: octeon-usb: octeon-hcd: fix some includes

Avoid including from "asm/".

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: octeon-usb: octeon-hcd: add missing braces
Aaro Koskinen [Wed, 12 Jun 2013 22:00:33 +0000 (01:00 +0300)]
staging: octeon-usb: octeon-hcd: add missing braces

One else branch was missing braces.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: octeon-usb: octeon-hcd: use tabs for code indent
Aaro Koskinen [Wed, 12 Jun 2013 22:00:31 +0000 (01:00 +0300)]
staging: octeon-usb: octeon-hcd: use tabs for code indent

Replace spaces with tabs where possible.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: csr: Fix obvious logic error in staging/csr
Tobias Polzer [Thu, 13 Jun 2013 21:00:35 +0000 (23:00 +0200)]
staging: csr: Fix obvious logic error in staging/csr

In uf_process_ma_packet_req() (staging/csr/unifi_pdu_processing.c), the
test for
(staInfo->timSet != CSR_WIFI_TIM_RESET) || (staInfo->timSet !=
CSR_WIFI_TIM_RESETTING)
obviously makes no sense and causes GCC to emit a warning if
-Wlogical-op is enabled.
As suggested in the referenced bug report, || was replaced by &&.

References: https://bugzilla.kernel.org/show_bug.cgi?id=46571
Reported-By: David Binderman <dcb314@hotmail.com>
Signed-off-by: Tobias Polzer <tobias.polzer@fau.de>
Signed-off-by: Dominik Paulus <dominik.paulus@fau.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: csr: fix the reset of skb mac header
Li RongQing [Thu, 13 Jun 2013 12:12:14 +0000 (20:12 +0800)]
staging: csr: fix the reset of skb mac header

mac_header can be offset if NET_SKBUFF_DATA_USES_OFFSET is set, so
we should call skb_reset_mac_header to reset mac_header.

Signed-off-by: Li RongQing <roy.qing.li@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: ozwpan: remove event tracing code.
Rupesh Gujare [Wed, 12 Jun 2013 13:00:52 +0000 (14:00 +0100)]
staging: ozwpan: remove event tracing code.

Removes event tracing code as it can be replaced
by in-kernel tracing infrastructure.

Signed-off-by: Rupesh Gujare <rupesh.gujare@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: keucr: removed unnecessary variables and comments
Laura Lawniczak [Sun, 9 Jun 2013 21:11:30 +0000 (23:11 +0200)]
staging: keucr: removed unnecessary variables and comments

blen and bn were only used in commented code fragments.
since comments should be informative and not for storing old
code, both, commented code and variables, were removed.

Signed-off-by: Laura Lawniczak <laura.lawniczak@googlemail.com>
Signed-off-by: Johannes Schilling <of82ecuq@cip.cs.fau.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: addi_apci_3xxx: only allocate needed subdevices
H Hartley Sweeten [Wed, 12 Jun 2013 23:23:14 +0000 (16:23 -0700)]
staging: comedi: addi_apci_3xxx: only allocate needed subdevices

The number of subdevices needed by a given board supported by this
driver can cary from 2 (for the apci3500) to a maximum of 5. Currently
this driver always allocates 7 subdevices and sets the subdevice type
to COMEDI_SUBD_UNUSED for the ones that are not needed.

Calculate the actual number of needed subdevices from the boardinfo
and only allocate and setup the ones that are used.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: addi_apci_3xxx: fix the analog input subdevice
H Hartley Sweeten [Wed, 12 Jun 2013 23:22:53 +0000 (16:22 -0700)]
staging: comedi: addi_apci_3xxx: fix the analog input subdevice

The analog input subdevice support functions in hwdrv_apci3xxx.c
do not follow the comedi API.

The (*insn_config) function overrides the INSN_CONFIG_DIO_INPUT
instruction as an internal APCI3XXX_CONFIGURATION instruction. The
APCI3XXX_CONFIGURATION instruction requires 4 data parameters but
the comedi core sanity checks the INSN_CONFIG_DIO_INPUT instruction
which only has 1 data parameter. Because of this the (*insn_config)
function can never be called.

The (*insn_read) function is supposed to do "one-shot" or "software-
triggered" reads and return the data. The function in hwdrv_apci3xxx.c
does do this but it also is used to optionally start a "hardware-
triggered" conversion. Hardware-triggered conversions should be done
with the comedi_async command functions.

Delete the hwrdv_apci3xxx.c file and fix the analog input subdevice
in the driver by:

1) add a new (*insn_read) function for "one-shot" reads
2) implement the (*do_cmdtest) and (*do_cmd) functions for
   "hardware-triggered" asyncronous reads
3) fix the interrupt handler to return the read data via the
   comedi_async buffer

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: addi_apci_3xxx: stub in analog input command support
H Hartley Sweeten [Wed, 12 Jun 2013 23:22:33 +0000 (16:22 -0700)]
staging: comedi: addi_apci_3xxx: stub in analog input command support

The analog input subdevice in this driver is broken. The attach of
this driver requests the irq and sets the dev->read_subdev to the
analog input subdevice but it does not setup the subdevice to support
commands.

Stub in the command support functions so we can fix the subdevice.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: addi_apci_3xxx: tidy up analog input subdevice init
H Hartley Sweeten [Wed, 12 Jun 2013 23:22:14 +0000 (16:22 -0700)]
staging: comedi: addi_apci_3xxx: tidy up analog input subdevice init

For aesthetic reasnons, add some whitespace to the analog input
subdevice initialization.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: addi_apci_3xxx: remove 'b_SingleDiff' private data
H Hartley Sweeten [Wed, 12 Jun 2013 23:21:53 +0000 (16:21 -0700)]
staging: comedi: addi_apci_3xxx: remove 'b_SingleDiff' private data

The analog reference desired for the acquisition is stored in the
insn->chanspec that is passed to the (*insn_read) function. There is
no need to use a private data variable to hold the desired analog
reference that is set in the (*insn_config).

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: addi_apci_3xxx: remove 'i_NbrAiChannelDiff' boardinfo
H Hartley Sweeten [Wed, 12 Jun 2013 23:21:33 +0000 (16:21 -0700)]
staging: comedi: addi_apci_3xxx: remove 'i_NbrAiChannelDiff' boardinfo

The number of differential analog input channels is always half the
number of single-ended channels, 'ai_n_chan', or all the channels
if the board does not support single-ended channels. We can use the
'ai_subdev_flags' boardinfo to determine if the board does not support
single-ended channels.

To simplify the boardinfo, remove the 'i_NbrAiChannelDiff' and just
use 'ai_n_chan' to specify the number of channels.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: addi_apci_3xxx: rename 'i_NbrAiChannel'
H Hartley Sweeten [Wed, 12 Jun 2013 23:21:12 +0000 (16:21 -0700)]
staging: comedi: addi_apci_3xxx: rename 'i_NbrAiChannel'

Rename this CamelCase boardinfo variable.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: addi_apci_3xxx: rename 'ui_MinAcquisitiontimeNs'
H Hartley Sweeten [Wed, 12 Jun 2013 23:20:54 +0000 (16:20 -0700)]
staging: comedi: addi_apci_3xxx: rename 'ui_MinAcquisitiontimeNs'

Rename this CamelCase boardinfo variable.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: addi_apci_3xxx: clarify 'b_AvailableConvertUnit'
H Hartley Sweeten [Wed, 12 Jun 2013 23:20:32 +0000 (16:20 -0700)]
staging: comedi: addi_apci_3xxx: clarify 'b_AvailableConvertUnit'

This boardinfo defines the conversion time bases that the analog input
subdevice supports (ns, us, ms).

Add some defines to get rid of the magic numbers and clarify the code.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: addi_apci_3xxx: tidy up i_APCI3XXX_AnalogInputConfigOperatingMode()
H Hartley Sweeten [Wed, 12 Jun 2013 23:20:11 +0000 (16:20 -0700)]
staging: comedi: addi_apci_3xxx: tidy up i_APCI3XXX_AnalogInputConfigOperatingMode()

The analog input subdevice is broken in this driver. To help fix
it, tidy up this (*insn_config) helper function.

Rename the CamelCase function and all the CamelCase local variables.

Refactor the sanity checks to make the function a bit more concise
and remove the printk noise.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: addi_apci_3xxx: tidy up i_APCI3XXX_InsnConfigAnalogInput()
H Hartley Sweeten [Wed, 12 Jun 2013 23:19:50 +0000 (16:19 -0700)]
staging: comedi: addi_apci_3xxx: tidy up i_APCI3XXX_InsnConfigAnalogInput()

The analog input subdevice is broken in this driver. To help fix
it, tidy up this (*insn_config) function.

Rename the CamelCase function.

Move the (insn->n == 4) test from i_APCI3XXX_AnalogInputConfigOperatingMode()
to this function.

Make the function a bit more concise and remove the printk noise.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: addi_apci_3xxx: properly set the analog input subdev_flags
H Hartley Sweeten [Wed, 12 Jun 2013 23:19:30 +0000 (16:19 -0700)]
staging: comedi: addi_apci_3xxx: properly set the analog input subdev_flags

Some of the boards supported by this driver only have differential
analog inputs. Add a new boardinfo, 'ai_subdev_flags', to allow
properly setting the subdev_flags for the analog input subdevice.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: addi_apci_3xxx: rename boardinfo 'i_AiMaxData'
H Hartley Sweeten [Wed, 12 Jun 2013 23:19:10 +0000 (16:19 -0700)]
staging: comedi: addi_apci_3xxx: rename boardinfo 'i_AiMaxData'

Rename this CamelCase boardinfo. Also, change its type to match
the type of comedi_subdevice 'maxdata'.

For aesthetic reasons, change the values to hex since this is more
common for the 'maxdata' values in comedi drivers.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: addi_apci_3xxx: rename boardinfo 'pc_DriverName'
H Hartley Sweeten [Wed, 12 Jun 2013 23:18:51 +0000 (16:18 -0700)]
staging: comedi: addi_apci_3xxx: rename boardinfo 'pc_DriverName'

Rename this CamelCase boardinfo.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: addi_apci_3xxx: remove 'i_AiChannelList' from the boardinfo
H Hartley Sweeten [Wed, 12 Jun 2013 23:18:31 +0000 (16:18 -0700)]
staging: comedi: addi_apci_3xxx: remove 'i_AiChannelList' from the boardinfo

The analog input s->len_chanlist for the boards supported by this driver
should always be the number of channels (s->n_chan). Use that instead
and remove the 'i_AiChannelList' from the boardinfo.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: addi_apci_3xxx: remove 'tsk_Current' from private data
H Hartley Sweeten [Wed, 12 Jun 2013 23:18:11 +0000 (16:18 -0700)]
staging: comedi: addi_apci_3xxx: remove 'tsk_Current' from private data

The interrupt function should be using comedi_event() to let the user
know data is available from the analog input subdevice.

The analog input subdevice is currently broken and nothing sets
tsk_Current anyway so just remove it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: addi_apci_3xxx: rename 'dw_AiBase' in private data
H Hartley Sweeten [Wed, 12 Jun 2013 23:17:49 +0000 (16:17 -0700)]
staging: comedi: addi_apci_3xxx: rename 'dw_AiBase' in private data

This variable holds the ioremap'ed PCI bar 3 used to read/write the
analog input and output registers. Rename it to simply 'mmio'.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>