Commit Graph

14468 Commits (8e3a71e56c8c48862015ecf1ae0b9362dc28a453)

Author SHA1 Message Date
H Hartley Sweeten 33214ce1eb staging: comedi: daqboard2000: use attach_pci callback
Convert this PCI driver to use the comedi PCI auto config attach
mechanism by adding an 'attach_pci' callback function. Since the
driver does not require any external configuration options. and
the legacy 'attach' callback is now optional, remove it.

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>
2012-09-19 09:41:43 +01:00
H Hartley Sweeten 63ad597e2d staging: comedi: daqboard2000: use request_firmware()
This driver requires loading a firmware file for the cpld. This
is currently being done by passing the firmware data using the
COMEDI_DEVCONFIG ioctl through the attach() hook in the driver.
This does not work for auto-configured PCI devices due to the
firmware loading options not being set in the comedi_devconfig
parameter passed to the driver.

Change the driver so it gets the firmware using request_firmware()
and ignore any firmware options passed in the comedi_devconfig.

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>
2012-09-19 09:41:43 +01:00
H Hartley Sweeten ad375f7758 staging: comedi: daqboard2000: remove this_board and devpriv macros
These macros rely on a local variable having a specific name.

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>
2012-09-19 09:41:43 +01:00
H Hartley Sweeten f657b14aec staging: comedi: daqboard2000: remove struct daqboard2000_hw
In this driver the PCI bar 2 resource is being ioremap'ed to a
void * in the private data. This void * is then being cast to a
struct daqboard2000_hw * that defines all the registers used by
the driver.

This is causing a number of sparse warnings similar to:

  warning: incorrect type in argument 1 (different address space)
     expected void const volatile [noderef] <asn:2>*addr
     got void *

Change the type in the private data to void __iomem * to correctly
store the ioremap'ed address.

Remove struct daqboard2000_hw and change the contents to #define's
for the register memory map.

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>
2012-09-19 09:41:43 +01:00
H Hartley Sweeten 95bc359f98 staging: comedi: comedi_fops: cast the cmd->chanlist to the correct address space
Rename 'chanlist_saver' to 'user_chanlist' to avoid confusion that
it's actually a __user *.

The chanlist pointer in comedi_cmd is still a user space pointer when
the comedi_cmd is copied with copy_from_user() in do_cmd_ioctl() and
do_cmdtest_ioctl(). This pointer needs to be cast when it is saved in
user_chanlist in order to preserve its address space.

The copy_from_user() call to copy the chanlist to the kernel space
comedi_command requires the second parameter to be a __user pointer.
Use the correctly cast user_chanlist instead of cmd->chanlist.

Before the comedi_cmd is copied back to user space, the saved
user_chanlist pointer is restored. Cast the user_chanlist again so
that the address space matches the comedi_cmd.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Acked-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-19 09:36:45 +01:00
H Hartley Sweeten f8348677b1 staging: comedi: comedi_fops: rename user_cmd in do_cmdtest_ioctl
This local variable is used to hold the comedi_cmd that is passed
to the kernel as the argument to the COMEDI_CMDTEST ioctl. Its filled
in with a copy_from_user() call. The name 'user_cmd' is a bit
confusing since it's actually kernel data.

Rename the local variable to 'cmd' to avoid the confusion.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Acked-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-19 09:36:45 +01:00
H Hartley Sweeten 88bc0574ba staging: comedi: comedi_fops: rename user_cmd in do_cmd_ioctl
This local variable is used to hold the comedi_cmd that is passed
to the kernel as the argument to the COMEDI_CMD ioctl. Its filled
in with a copy_from_user() call. The name 'user_cmd' is a bit
confusing since it's actually kernel data.

Rename the local variable to 'cmd' to avoid the confusion.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Acked-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-19 09:36:44 +01:00
H Hartley Sweeten cbe01f723e staging: comedi: comedi_fops: rename the __user *cmd param in do_cmd_ioctl
This parameter is actually the unsigned long arg passed in the ioctl.
comedi_unlocked_ioctl() casts it as a (struct comedi_cmd __user *)
when calling do_cmd_ioctl(). Rename the variable to keep this clear.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Acked-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-19 09:36:44 +01:00
H Hartley Sweeten 9be56c6432 staging: comedi: comedi.h: remove __user tag from chanlist
The 'chanlist' is passed to the kernel from user space with the
COMEDI_CMD and COMEDI_CMDTEST ioctls. The do_cmd_ioctl() and
do_cmdtest_ioctl() functions in comedi_fops.c copy this data
to/from user space to kernel space correctly.

Unfortunately, this data is copied back into a struct comedi_cmd
so when the cmd is passed down to the drivers they still see the
pointer as __user data. This results is a number of sparse errors
such as:

  warning: dereference of noderef expression

  warning: incorrect type in argument 2 (different address spaces)
     expected void const *<noident>
     got unsigned int [noderef] <asn:1>*chanlist

  warning: incorrect type in argument 3 (different address spaces)
     expected unsigned int *chanlist
     got unsigned int [noderef] <asn:1>*chanlist

  warning: incorrect type in assignment (different address spaces)
     expected unsigned int *ai_chanlist
     got unsigned int [noderef] <asn:1>*chanlist

The two functions in comedi_fops are the only ones that need the
__user tag. Remove the tag so that all the drivers see the chanlist
pointer in the correct address space.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Acked-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-19 09:36:44 +01:00
H Hartley Sweeten 25b73c783d staging: comedi: comedi.h: remove the extra indents
The extra indents in this file cause git diff to not know the
section where changes are being made. This results in diff outputs
like:

@@ -365,7 +365,10 @@

instead of the more informational:

@@ -365,6 +365,7 @@ struct comedi_cmd {

Remove all the extra indents.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Acked-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-19 09:29:51 +01:00
Emil Goode 5d5d7c3b93 staging: wlan-ng: Fix dereference before NULL check
Smatch is warning about a dereference before we check for NULL.
This patch moves the dereference to after the NULL check.

Smatch warning:
drivers/staging/wlan-ng/cfg80211.c:345 prism2_scan() warn:
	variable dereferenced before check 'request' (see line 332)

Signed-off-by: Emil Goode <emilgoode@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-19 09:28:14 +01:00
Fengguang Wu 3d9562a6ed staging: ozwpan: compare pointer to NULL rather than 0
Generated by: scripts/coccinelle/null/badzero.cocci

Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-19 09:28:14 +01:00
Kevin McKinney 65bf58cef1 Staging: bcm: Properly format braces in cntrl_SignalingInterface.h
This patch cuddles braces as reported
by checkpatch.pl.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-19 09:26:00 +01:00
Kevin McKinney 957d7cdcf3 Staging: bcm: Properly format comments in cntrl_SignalingInterface.h
This patch properly formats comments
as reported by checkpatch.pl.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-19 09:26:00 +01:00
Kevin McKinney 8f413fe6c5 Staging: bcm: Fix all white space issues in cntrl_SignalingInterface.h
This patch fixes all white space issues
as reported by checkpatch.pl.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-19 09:26:00 +01:00
Daniel Cotey 687bcca02c Staging: silicom: bp_mod.c: checkpatch cleanups: C99 comments
remove code or change to traditional comments

Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-19 09:24:10 +01:00
Daniel Cotey 7935c80c13 Staging: silicom: bp_mod.c: checkpatch cleanup: fix returns
Fix up all the returns to cannonical form, and an ifdef removal

Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-19 09:24:10 +01:00
Greg Kroah-Hartman fee58d4821 USB: Serial: serqt_usb2.c: remove debug module parameter
Now that all usb-serial modules are only using dev_dbg()
the debug module parameter does not do anything at all, so
remove it to reduce any confusion if someone were to try to
use it.

CC: Rusty Russell <rusty@rustcorp.com.au>
CC: Alan Stern <stern@rowland.harvard.edu>
CC: Mauro Carvalho Chehab <mchehab@redhat.com>
CC: "Justin P. Mattock" <justinmattock@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-18 10:15:09 +01:00
Greg Kroah-Hartman e8656b02ef USB: serial: serqt_usb2: remove dbg() usage
dbg() was a very old USB-serial-specific macro.
This patch removes it from being used in the
driver and uses dev_dbg() instead.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-18 01:35:12 -07:00
Greg Kroah-Hartman ba753e4180 Staging: remove CONFIG_EXPERIMENTAL dependancies
As discussed at the kernel summit this year, CONFIG_EXPERIMENTAL means
nothing, so let's get rid of it.

Cc: Kees Cook <keescook@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 23:02:36 -07:00
Greg Kroah-Hartman 74f5671442 Staging: ced1401: fix copy_from/to_user warning messages
Properly check the return value of copy_from/to_user() and handle any
errors that might happen.

This removes a bunch of compiler warnings.

Cc: Alois Schlögl <alois.schloegl@ist.ac.at>
Cc: Greg P. Smith <greg@ced.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 21:25:28 -07:00
Greg Kroah-Hartman cd915200af Staging ced1401: cleanup coding style issues.
A basic Lindent run on the .c files, clean up the .h file by hand.

Cc: Alois Schlögl <alois.schloegl@ist.ac.at>
Cc: Greg P. Smith <greg@ced.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 21:14:20 -07:00
Greg Kroah-Hartman 2d96650139 Staging: ced1401: add driver to the build
This adds the ced1401 driver to the build system.

Yes, there are a lot of warning messages, but it does compile, so it
should be good to get going.

Cc: Alois Schlögl <alois.schloegl@ist.ac.at>
Cc: Greg P. Smith <greg@ced.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 20:30:02 -07:00
Greg Kroah-Hartman c7fbfc825f Staging: ced1401: add TODO file
This adds a first cut of a TODO file to get this driver out of the
staging directory.

Cc: Alois Schlögl <alois.schloegl@ist.ac.at>
Cc: Greg P. Smith <greg@ced.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 19:46:05 -07:00
Greg Kroah-Hartman 6ede1edea3 Staging: ced1401: usb1401: fix build errors.
This fixes up the usb1401.c file to remove the usage of err() (which is
gone), and the two-argument kmap_atomic() call, and the compat_ioctl
pointer warning.

The code now builds properly, there are lots of warnings still, but it's
a start.

Cc: Alois Schlögl <alois.schloegl@ist.ac.at>
Cc: Greg P. Smith <greg@ced.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 19:45:53 -07:00
Alois Schlögl 2eae6bdc12 Staging: add ced1401 USB driver
This was imported from the
http://pub.ist.ac.at/~schloegl/src/ced1401/.git git repo at the request
of Alois.  The driver originally came from Cambridge Electronic Design
Ltd and was authored by Greg P Smith and others, but Alois did the
maintance work to get it into a semi-building state and pushed to get it
into the main kernel tree here.

Cc: Alois Schlögl <alois.schloegl@ist.ac.at>
Cc: Greg P. Smith <greg@ced.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 19:45:28 -07:00
H Hartley Sweeten 57991b6bfc staging: comedi: jr3_pci: quiet "Using plain interger as NULL pointer" noise
Quiet some sparse warnings about:

warning: Using plain integer as NULL 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>
2012-09-17 15:03:52 -07:00
H Hartley Sweeten 920e2ffbe2 staging: comedi: pcmuio: pointers should be cleared with NULL
Pointer variables should be cleared with NULL on 0. This quiets
some sparse warnings about:

warning: Using plain integer as NULL 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>
2012-09-17 15:03:52 -07:00
H Hartley Sweeten 765c3c64f7 staging: comedi: pcmmio: remove kernel messages about IRQ
These messages are just added noise.

They also cause some sparse warnings due to MAX_ASICS evaluating
as 1. This causes the local variable 'irq' to be 'unsigned int irq[1]',
which makes the 'irq[1]' access invalid.

Just remove the messages.

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>
2012-09-17 15:03:51 -07:00
H Hartley Sweeten 2ad1d2e1ad staging: comedi: mite: local symbols should not be exported
The function mite_fifo_size() is only referenced in this file. Make
it static.

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>
2012-09-17 15:03:51 -07:00
H Hartley Sweeten 3243785c39 staging: comedi: ni_mio_cs: local symbols should not be exported
The symbol ni_mio_cs_driver is only referenced in this file. Make
it static.

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>
2012-09-17 15:03:51 -07:00
H Hartley Sweeten 0dcee6fec8 staging: comedi: ni_labpc_cs: local symbols should not be exported
The symbol labpc_cs_driver and the functions labpc_init_module()
and labpc_exit_module() are only referenced in this file. Make
them static.

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>
2012-09-17 15:03:51 -07:00
H Hartley Sweeten 3786d4fb4d staging: comedi: ni_daq_dio24: local symbols should not be exported
The symbol dio24_cs_driver is only referenced in this file. Make
it static.

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>
2012-09-17 15:03:50 -07:00
H Hartley Sweeten 08ebfcd205 staging: comedi: ni_pcidio: local functions should not be exported
The function ni_pcidio_event() is only referenced in this file.
Make it static.

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>
2012-09-17 15:03:50 -07:00
H Hartley Sweeten ce48a91139 staging: comedi: ni_660x: local functions should not be exported
The function ni_660x_release_mite_channel() is only referenced in
this file. Make it static.

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>
2012-09-17 15:03:50 -07:00
H Hartley Sweeten 2ca9bc2e69 staging: comedi: jr3_pci: local functions should not be exported
The function read_idm_word() is only referenced in this file.
Make it static.

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>
2012-09-17 15:03:50 -07:00
H Hartley Sweeten 135f8a5e03 staging: comedi: jr3_pci.h: remove vect_bits_t and warning_bits_t
Leave the enum's but remove their names. The names are not used
anywhere in the driver.

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>
2012-09-17 15:03:50 -07:00
H Hartley Sweeten 29aba76306 staging: comedi: ni_mio_common: make internal functions static
The functions ni_release_gpct_mite_channel() and ni_prime_channelgain_list()
are only referenced in this file. Make it static.

The function ni_release_gpct_mite_channel() is also only called
when PCIDMA is enabled. Move the #ifdef to quite a sparse warning
about the function not being used.

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>
2012-09-17 15:03:49 -07:00
H Hartley Sweeten 3e76c95107 staging: comedi: comedi_fops: make internal function static
The function do_become_nonbusy() is only referenced in this file.
Make it static.

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>
2012-09-17 15:03:49 -07:00
Javier M. Mellid 87765b9771 staging: sm7xxfb: remove smtc_VRAMBaseAddress
This patch erases smtc_VRAMBaseAddress variable.

Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 14:57:53 -07:00
Javier M. Mellid 3f28ed1741 staging: sm7xxfb: rename pFramebufferPhysical to mmio_base
This patch renames pFramebufferPhysical name to mmio_base.

Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 14:57:53 -07:00
Javier M. Mellid 3da53b1416 staging: sm7xxfb: rename some smtcfb_info fields
This patch improves naming style and comments on smtcfb_info fields.

Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 14:57:53 -07:00
Javier M. Mellid 5d0c77026b staging: sm7xxfb: annotate iomem pointers
This patch annotates iomem pointers.

Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 14:57:52 -07:00
Javier M. Mellid 20d471c447 staging: sm7xxfb: cleanup on smtc_alloc_fb_info
This patch improves code legibility after last changes.

Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 14:57:52 -07:00
Javier M. Mellid 9f6fe04326 staging: sm7xxfb: clean smtcfb_fix's id initialization
Setting up smtcfb_fix's id happens through smtc_alloc_fb_info. It adds
complexity and unnecesary code.

Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 14:57:52 -07:00
Javier M. Mellid d459a03b90 staging: sm7xxfb: clean fb_fix_screeninfo and fb_var_screeninfo initialization
Part of fb_fix_screeninfo and fb_var_screeninfo initialization happens
in smtc_alloc_fb_info. It duplicates code while hiding the real
functionality of smtc_alloc_fb_info. This patch groups initialization
together.

Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 14:57:52 -07:00
Justin P. Mattock 6d3616bb19 staging: "wlags49_h25" Fix typos.
Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 14:50:33 -07:00
Lauri Hintsala 2b5d20db81 staging: csr: wait for the exec in usermodehelper
The order of wait values has been changed by commit 9d944ef32e.
Fix the wait parameter and start to use a define instead of
"magic number".

Signed-off-by: Lauri Hintsala <lauri.hintsala@bluegiga.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 14:50:33 -07:00
Randy Dunlap 8ab92cbdb3 staging: fix csr printk format warning
Fix printk format warning on i386/X86_32 by using 't' for ptrdiff_t.
Also builds cleanly on x86_64.

drivers/staging/csr/csr_wifi_hip_udi.c: In function 'unifi_print_status':
drivers/staging/csr/csr_wifi_hip_udi.c:151:27: warning: format '%ld' expects type 'long int', but argument 5 has type 'int'

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 14:50:33 -07:00
Greg Kroah-Hartman 8508317c96 IIO new drivers, features and rework for the 3.7 cycle, 4th set.
Here we have
 
 1) a set cleaning up and moving the ad7476 driver out of staging.
 Support for a number of additional parts is also added to that driver.
 
 2) cleanups from various people for the in kernel interface code as that
 is getting more an more real use and hence people are picking up on
 minor issues that made it through review.  Also a related useful set
 of utility functions to avoid duplicate code for converting IIO
 representations to other forms.
 
 3) a new fractional type for our read_raw / write_raw functions.
   This allows avoiding loss of accuracy via the in kernel interfaces in some
   cases as well as being rather convenient for a lot of range -> scale
   conversions.
 
 4) New AD5755 DAC driver.
 
 5) Some Blackfin timer trigger improvements including hardware pulse control
 for device triggering.
 
 6) Support for the ad7091r in the ad7476 driver.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.19 (GNU/Linux)
 
 iQIcBAABAgAGBQJQV5WKAAoJEFSFNJnE9BaIbksQAIcpGldo+clgHtLyNYdY0dsz
 CO3Ypj9CExWGLeSnUgFUf1RrevCFSaOCblxscV9S0Ms5vVCrlvg8SLX8Nm+DHS9e
 zROJMzo7mjfvoplOzuN2jXGn/T1SPPcsMBnpzJeeILVJm2G/LkUbIUU2KbCd8nBI
 xO6cehKGwg6kBz+Az8ZJXOamfr7S2THIMVDucAKNjF4Cg3lLfmKKgDqEXT2oR6xc
 yzaOnu3ObJuHi0GF6hcRFn5Q4J5MN/Lnw7M2BRQd6SazR4uLRI+17Hq7pDnXvMgJ
 QYCUUJx2uCg+5bmfYeLfgcFXUMGg6wF5Q7UO/94IiI/r5PKiNHwKwFrYMM30cZcs
 A/aRZm/YndnwpL2NUahqi/14Hoj0DnwsVSmCF2IGIzy7687xpuL4FZVuTuYc9uvX
 xlfc52stQ14xgtcsO5hpAMnTtqNiFHJHD9cCrzszGRQvqXOxMolgMOokEM02XRK9
 AUGdZjeSpE6rc6FFFgdkmElpRFLHBpiKjmq82zuMMz3kbpkQWmw5IrJNXBH65KRM
 sJUSHXZ/sXBRooDgGJej+Kg1DJzKQFxD3jB21wt0Zic3HvE73zHP0grtR5z5TnH6
 ABeMTDNkK04yGlPggJUtiT/ocdtlcvT4HzH1nKIHxLNOgYfVJabmfP1barArOc5W
 P3rBUFAbfQDTsL3aqkfu
 =BlMh
 -----END PGP SIGNATURE-----

Merge tag 'iio-for-v3.7d' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next

IIO new drivers, features and rework for the 3.7 cycle, 4th set.

Here we have

1) a set cleaning up and moving the ad7476 driver out of staging.
Support for a number of additional parts is also added to that driver.

2) cleanups from various people for the in kernel interface code as that
is getting more an more real use and hence people are picking up on
minor issues that made it through review.  Also a related useful set
of utility functions to avoid duplicate code for converting IIO
representations to other forms.

3) a new fractional type for our read_raw / write_raw functions.
  This allows avoiding loss of accuracy via the in kernel interfaces in some
  cases as well as being rather convenient for a lot of range -> scale
  conversions.

4) New AD5755 DAC driver.

5) Some Blackfin timer trigger improvements including hardware pulse control
for device triggering.

6) Support for the ad7091r in the ad7476 driver.
2012-09-17 14:42:54 -07:00
Lars-Peter Clausen 587a51241c staging:iio:trigger:bfintmr Add output support
Some converters require an external signal to start the conversion. This patch
adds support to the bfintmr trigger driver to generate such a signal.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2012-09-17 22:10:00 +01:00
Lars-Peter Clausen 2aecc5b95c staging:iio:trigger:bfintmr: Only enable timer when necessary
This patch hooks up the set_trigger_state callback for the blackfin timer
trigger driver and only enables the timer when a trigger consumer requests it to
be enabled. There really is no reason to keep the timer running and generate
interrupts if nobody is listening to them.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2012-09-17 22:10:00 +01:00
Lars-Peter Clausen 37812d2e10 staging:iio:trigger:bfintmr: Avoid divide by zero
If the timer frequency has not been configured yet get_gptimer_period() will
return 0. Handle this case instead of blindly dividing by the returned value.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2012-09-17 22:09:59 +01:00
Lars-Peter Clausen a0e545e0e7 staging:iio:hwmon bridge: Use iio_read_channel_processed
Use the iio_read_channel_processed function to read the sample value in the
proper unit instead of using iio_read_channel_raw and iio_read_channel_scale and
doing the unit conversion manually.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2012-09-17 21:49:49 +01:00
Macpaul Lin 3afcb91c41 staging/gdm72xx: usb_boot: replace firmware upgrade API in em_download
Replace firmware upgrade API in em_download_image().

Signed-off-by: Macpaul Lin <macpaul@gmail.com>
Cc: Paul Stewart <pstew@chromium.org>
Cc: Ben Chan <benchan@chromium.org>
Cc: Sage Ahn <syahn@gctsemi.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 05:56:17 -07:00
Toshiaki Yamane d084610bb1 staging/rts_pstor: Use pr_ or dev_ printks in rtsx.c
fixed some checkpatch warnings.
-WARNING: Prefer pr_info(... to printk(KERN_INFO, ...
-WARNING: Prefer pr_err(... to printk(KERN_ERR, ...
-WARNING: quoted string split across lines

And added pr_fmt.

Signed-off-by: Toshiaki Yamane <yamanetoshi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 05:42:34 -07:00
Daniel Cotey 7c014321fd Staging: silicom: checkpatch.pl cleanup: pretty pointers
last of the unstylistic pointers cleaned up

Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 05:37:59 -07:00
Daniel Cotey 9f7a6f33e0 Staging: silicom: checkpatch.pl cleanup: pretty pointers
pointer style cleanup

Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 05:37:58 -07:00
Daniel Cotey 0920af72a7 Staging: silicom: checkpatch.pl cleanup: pretty pointers
more checkpatch cleanups of pointers.

Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 05:37:58 -07:00
Daniel Cotey 81908e8be4 Staging: silicom: checkpatch.pl cleanup: pretty pointers
More pointer style cleanup

Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 05:37:58 -07:00
Daniel Cotey 1bd5374dde Staging: silicom: checkpatch.pl cleanup: pretty pointers
More notation fixes

Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 05:37:58 -07:00
Daniel Cotey 01448bbb05 Staging: silicom: checkpatch.pl cleanup: pretty pointers
first chunk, straighten up the pointer notation

Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 05:37:58 -07:00
Daniel Cotey 86bc9ebb4d Staging: silicom: checkpatch cleanup: fix includes
checkpatch fixups

Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 05:37:57 -07:00
Daniel Cotey 25dd851204 Staging: silicom: checkpatch cleanup: header file whitespace
Finish trailing spaces in libbp_sd.h

Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 05:37:57 -07:00
Daniel Cotey f8402b6311 Staging: silicom: checkpatch cleanup: header file whitespace
Whack all the line ending spaces so checkpatch.pl is happy.

Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 05:37:57 -07:00
Daniel Cotey 65af0ae35a Staging: silicom: bypass.h: checkpatch whitespace
Remove trailing spaces, second chunk

Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 05:37:57 -07:00
Daniel Cotey b2774ed427 Staging: silicom: bypass.h: checkpatch whitespace
Remove trailing spaces, first chunk

Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 05:37:57 -07:00
Daniel Cotey 30f62902e3 Staging: silicom: bp_mod.h: checkpatch tab and space cleanup
twelfth chunk of bp_mod.h's cleanup

Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 05:37:56 -07:00
Daniel Cotey d5b4f42f8f Staging: silicom: bp_mod.h: checkpatch tab and space cleanup
eleventh chunk of bp_mod.h's cleanup

Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 05:37:56 -07:00
Daniel Cotey 97ef0a461b Staging: silicom: bp_mod.h: checkpatch tab and space cleanup
tenth chunk of bp_mod.h's cleanup

Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 05:37:56 -07:00
Daniel Cotey fab85699f3 Staging: silicom: bp_mod.h: checkpatch tab and space cleanup
ninth chunk of bp_mod.h's cleanup

Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 05:37:56 -07:00
Daniel Cotey 9088c8a993 Staging: silicom: bp_mod.h: checkpatch tab and space cleanup
eighth chunk of bp_mod.h's cleanup

Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 05:37:56 -07:00
Daniel Cotey 22f3504684 Staging: silicom: bp_mod.h: checkpatch tab and space cleanup
seventh chunk of bp_mod.h's cleanup

Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 05:37:55 -07:00
Daniel Cotey 0118f42af2 Staging: silicom: bp_mod.h: checkpatch tab and space cleanup
sixth chunk of bp_mod.h's cleanup

Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 05:37:55 -07:00
Daniel Cotey 2ea2ea4dab Staging: silicom: bp_mod.h: checkpatch tab and space cleanup
fifth chunk of bp_mod.h's cleanup

Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 05:37:55 -07:00
Daniel Cotey 0fe8f5d7a5 Staging: silicom: bp_mod.h: checkpatch tab and space cleanup
fourth chunk of bp_mod.h's cleanup

Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 05:37:55 -07:00
Daniel Cotey c2cf19334b Staging: silicom: bp_mod.h: checkpatch tab and space cleanup
third chunk of bp_mod.h's cleanup

Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 05:37:55 -07:00
Daniel Cotey 7cdaac387c Staging: silicom: bp_mod.h: checkpatch tab and space cleanup
second chunk of bp_mod.h's cleanup

Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 05:37:54 -07:00
Daniel Cotey 490deb7927 Staging: silicom: bp_mod.h: checkpatch tab and space cleanup
first chunk of bp_mod.h's cleanup

Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 05:37:54 -07:00
Ben Hutchings 40fe4f8967 staging: speakup_soft: Fix reading of init string
softsynth_read() reads a character at a time from the init string;
when it finds the null terminator it sets the initialized flag but
then repeats the last character.

Additionally, if the read() buffer is not big enough for the init
string, the next read() will start reading from the beginning again.
So the caller may never progress to reading anything else.

Replace the simple initialized flag with the current position in
the init string, carried over between calls.  Switch to reading
real data once this reaches the null terminator.

(This assumes that the length of the init string can't change, which
seems to be the case.  Really, the string and position belong together
in a per-file private struct.)

Tested-by: Samuel Thibault <sthibault@debian.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 05:32:50 -07:00
Devendra Naga 0c4a9f6e0a staging: silicom: fix a comparing proc_dir_entry pointer against 0
we should be using the NULL macro, not 0 to compare against
a pointer value, and also remove braces around the single
if conditional after the create_proc_entry

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 05:31:33 -07:00
Devendra Naga ad139634c5 staging: ft1000: replace c99 comments with c88
replace some of the c99 comments to the structures with c88 comment style
no code change is done here.

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 05:31:32 -07:00
Dan Carpenter 82e6bb0398 Staging: silicom: use kstrtoint_from_user()
The main problem with the hand rolled code was that there weren't any
range checks so you could corrupt memory by writing too much data to
the proc file.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 05:22:09 -07:00
Dan Carpenter e4c536b72f Staging: silicom: add some range checks to proc functions
If you tried to cat more than 255 characters (the last character is for
the terminator) to these proc files then it would corrupt kernel memory.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 05:22:09 -07:00
Ian Abbott a09b027882 staging: comedi: mite: use module_init()/module_exit()
Rename the standard `init_module()` and `cleanup_module()` functions and
make them static.  Use `module_init()` and `module_exit()` to mark the
renamed functions as the module init and exit functions.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 05:09:10 -07:00
Ian Abbott 551e2c3cf7 staging: comedi: mite: remove list of devices
All the drivers that use the "mite" module now allocate a `struct
mite_struct` dynamically instead of searching the `mite_devices` list
populated during initialization of the "mite" module.

Remove the list of devices and the function that prints available NI
devices on the list (`mite_list_devices()`).  The list node and `used`
members in `struct mite_struct` are now redundant, so remove them.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 05:09:10 -07:00
Ian Abbott a5cf79e3ac staging: comedi: ni_pcimio: use mite_alloc()
Allocate `struct mite_device` dynamically instead of searching for
one on the `mite_devices` list constructed by the "mite" module.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 05:09:10 -07:00
Ian Abbott f822a6a1a1 staging: comedi: ni_pcidio: use mite_alloc()
Allocate `struct mite_device` dynamically instead of searching for
one on the `mite_devices` list constructed by the "mite" module.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 05:09:09 -07:00
Ian Abbott e4ff75b58a staging: comedi: ni_labpc: use mite_alloc()
Allocate `struct mite_device` dynamically instead of searching for
one on the `mite_devices` list constructed by the "mite" module.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 05:09:09 -07:00
Ian Abbott 604d66ce56 staging: comedi: ni_670x: remove spurious free_irq() call
This driver's comedi `detach` handler (`ni_670x_detach()`) calls
`free_irq()` but the driver doesn't call `request_irq()` anywhere.
Remove the spurious call.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 05:09:09 -07:00
Ian Abbott 6bc42c2228 staging: comedi: ni_670x: use mite_alloc()
Allocate `struct mite_device` dynamically instead of searching for
one on the `mite_devices` list constructed by the "mite" module.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 05:09:09 -07:00
Ian Abbott 05ac0635a5 staging: comedi: ni_660x: use mite_alloc()
Allocate `struct mite_device` dynamically instead of searching for
one on the `mite_devices` list constructed by the "mite" module.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 05:09:08 -07:00
Ian Abbott 2967d0ae4c staging: comedi: ni_65xx: use mite_alloc()
Allocate `struct mite_device` dynamically instead of searching for
one on the `mite_devices` list constructed by the "mite" module.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 05:09:08 -07:00
Ian Abbott 6dc71205fc staging: comedi: ni_6527: use mite_alloc()
Allocate `struct mite_device` dynamically instead of searching for
one on the `mite_devices` list constructed by the "mite" module.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 05:09:08 -07:00
Ian Abbott ca8eb8d5c8 staging: comedi: mite: add mite_alloc() and mite_free()
Add `mite_alloc()` to allow drivers to allocate and initialize a `struct
mite_struct` dynamically and export it.  Add `mite_free()`, which is
currently just an inline wrapper for `kfree()`.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 05:09:08 -07:00
Ian Abbott d799773f68 staging: comedi: mite: replace printk() calls
Replace the `printk()` calls in this module with `dev_...()` calls where
possible or `pr_...()` calls otherwise.

Rework the normally ifdefed out (by the `DEBUG_MITE` macro)
`mite_dump_regs()` to dump register offsets instead of remapped
addresses.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 05:09:08 -07:00
Ian Abbott d6f015b6ad staging: comedi: mite: use ilog2()
The static inline functions `MITE_IODWBSR_1_WSIZE_bits()` and `CR_RL()`
in "mite.h" work out a base-2 logarithm using a `while` loop.  Change
them to use `ilog2()`.  Also change `CR_RL()` to clamp the maximum value
instead of printing an error.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 05:09:07 -07:00
Ian Abbott 7d24e1ac00 staging: comedi: mite: export mite_alloc_ring() and mite_free_ring()
The `mite_alloc_ring()` and `mite_free_ring()` static inline functions
in "mite.h" are reasonably large.  Transfer them to "mite.c" and export
them.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 05:09:07 -07:00
Ian Abbott ae0318019f staging: comedi: mite: make internal functions static
Declare some non-exported functions in "mite.c" `static` and remove
their declarations from "mite.h".

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 05:09:07 -07:00
Ian Abbott b021367487 staging: comedi: ni_pcimio: Use comedi attach_pci callback
Convert this PCI driver to use the comedi `attach_pci` callback instead
of the `attach` callback for PCI auto-configuration.  There is no need
to support manual attachment of PCI devices supported by this driver, so
remove the `attach` callback altogether.

Note that this driver still uses the list of PCI "mite" devices created
by the "mite" module.  This will be dealt with by a later patch once
dynamic allocation of "mite" structures has been implemented.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 05:09:07 -07:00
Ian Abbott 9c4aef95d2 staging: comedi: ni_pcimio: Add semicolon to module_comedi_pci_driver()
Add a semi-colon after the macro call
`module_comedi_pci_driver(ni_pcimio_driver, ni_pcimio_pci_driver)`.  It
compiles with or without the semicolon but it ought to have it.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 05:09:07 -07:00
Ian Abbott 5b6137d880 staging: comedi: ni_mio_common: don't pass config options to ni_E_init()
`ni_E_init()` doesn't use the second parameter pointing to a `struct
comedi_devconfig` passed from a comedi `attach` handler, so remove the
parameter.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 05:09:06 -07:00
Ian Abbott 21b74c2785 staging: comedi: ni_pcidio: use comedi attach_pci callback
Convert this PCI driver to use the comedi `attach_pci` callback instead
of the `attach` callback for PCI auto-configuration.  There is no need
to support manual attachment of PCI devices supported by this driver, so
remove the `attach` callback altogether.

Note that this driver still uses the list of PCI "mite" devices created
by the "mite" module.  This will be dealt with by a later patch once
dynamic allocation of "mite" structures has been implemented.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 05:09:06 -07:00
Ian Abbott 9fb5c14ceb staging: comedi: ni_pcidio: use request_firmware()
The PCI-6534 needs three firmware files loading to work with the driver.
That is currently done by passing the firmware data using the
`COMEDI_DEVCONFIG` ioctl that uses the comedi `attach()` hook in the
driver.  This doesn't work for auto-configured PCI devices (which also
currently use the `attach()` hook in this driver, but doesn't have the
firmware-loading options set in the `struct comedi_devconfig *`
parameter).

Change the driver to request the firmware files using
`request_firmware()`, ignoring any firmware-loading options set in the
`struct comedi_devconfig`.

The PCI-6534 has a main FPGA which needs to be loaded first, and two
"scarabs".  Scarab A is loaded with firmware to support digital input
mode, and scarab B is loaded with firmware to support digital output
mode.

I don't think the order of loading the scarab firmwares matters as long
as they are loaded with the correct firmware files.  This update loads
scarab B first, whereas the original code loaded scarab A first.  The
firmware files are loaded in the following order:

A) main FPGA: "ni6534a.bin" (FW_PCI_6534_MAIN)
B) scarab B: "niscrb02.bin" (FW_PCI_6534_SCARAB_DO)
C) scarab A: "niscrb01.bin" (FW_PCI_6534_SCARAB_DI)

The required firmware files can be found in the
"comedi-nonfree-firmware" tar-ball at
<http://www.comedi.org/download/comedi-nonfree-firmware-2007.06.22.tar.gz>.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 05:09:06 -07:00
Ian Abbott 6b26ecf047 staging: comedi: ni_pcidio: convert printk() calls
Convert the `printk()` calls in this driver to use the `dev_...()` calls
where possible, or the `pr_...()` calls otherwise.  Combine
non-line-terminated prints into single-line prints.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 05:09:06 -07:00
Ian Abbott 7e2716cdc3 staging: comedi: ni_labpc: use comedi attach_pci callback
Convert this PCI driver to use the comedi `attach_pci` callback instead
of the `attach` callback for PCI auto-configuration.  Remove support for
manual attachment of PCI boards supported by this driver.  The `attach`
callback is still needed to manually attach ISA boards, but print an
error if an attempt is made to manually attach a PCI board.

Note that this driver still uses the list of PCI "mite" devices created
by the "mite" module.  This will be dealt with by a later patch once
dynamic allocation of "mite" structures has been implemented.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 05:09:05 -07:00
Ian Abbott 5e51f0db14 staging: comedi: ni_labpc: move labpc_driver and labpc_pci_table
Move the `labpc_driver` and `labpc_pci_table` variables nearer the
module initialization code near the bottom of the module for aesthetic
reasons and to avoid a forward declaration of `labpc_attach()`.

As a consequence, to avoid having to add a forward declaration of the
`labpc_driver` variable, change code that uses
`labpc_driver.driver_name` to use `DRV_NAME` instead, and change code
that uses `labpc_driver.num_names` to use `ARRAY_SIZE(labpc_boards)`
instead.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 05:09:05 -07:00
Ian Abbott 3faeeecbc8 staging: comedi: ni_labpc: use module_comedi_pci_driver()
Use the macro `module_comedi_pci_driver(comedi_driver, pci_driver)` to
register the module as a Comedi PCI driver if the module supports PCI
devices, otherwise use `module_comedi_driver(comedi_driver)` to register
it as an ordinary Comedi driver.  Rename variables and functions that
have prefix `driver_` for consistency.  Set the `name` member of the
`struct pci_driver` variable in its initializer instead of initializing
it in the module initialization function.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 05:09:05 -07:00
Ian Abbott 1cabcd3164 staging: comedi: ni_labpc: convert printk() to dev_...()
Convert the `printk()` calls in this driver to use the `dev_...()` calls
where possible, or the `pr_...()` calls otherwise.  Remove the ifdefed
out code that prints the EEPROM contents.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 05:09:05 -07:00
Ian Abbott c33e23f776 staging: comedi: ni_670x: use comedi attach_pci callback
Convert this PCI driver to use the comedi `attach_pci` callback instead
of the `attach` callback for PCI auto-configuration.  There is no need
to support manual attachment of PCI devices supported by this driver, so
remove the `attach` callback altogether.

Note that this driver still uses the list of PCI "mite" devices created
by the "mite" module.  This will be dealt with by a later patch once
dynamic allocation of "mite" structures has been implemented.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 05:09:05 -07:00
Ian Abbott b64c0f51cb staging: comedi: ni_660x: use comedi attach_pci callback
Convert this PCI driver to use the comedi `attach_pci` callback instead
of the `attach` callback for PCI auto-configuration.  There is no need
to support manual attachment of PCI devices supported by this driver, so
remove the `attach` callback altogether.

Note that this driver still uses the list of PCI "mite" devices created
by the "mite" module.  This will be dealt with by a later patch once
dynamic allocation of "mite" structures has been implemented.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 05:09:04 -07:00
Ian Abbott b4c9a598a7 staging: comedi: ni_660x: use module_comedi_pci_driver()
Use the macro `module_comedi_pci_driver(comedi_driver, pci_driver)` to
register the module as a Comedi PCI driver.  Rename variables and
functions that have prefix `driver_` for consistency.  Set the `name`
member of the `struct pci_driver` variable in its initializer instead of
initializing it in the module initialization function.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 05:09:04 -07:00
Ian Abbott a8adadee94 staging: comedi: ni_660x: convert printk() to dev_...()
Convert the `printk()` calls in this drivers to use the `dev_...()`
calls instead.  Replace some `printk()` calls in the comedi `attach()`
handler (`ni_660x_attach()`) with a single `dev_info()` at the end.
Remove some `printk()` calls before `BUG()` calls.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 05:09:04 -07:00
Ian Abbott c50e9939ed staging: comedi: ni_65xx: use comedi attach_pci callback
Convert this PCI driver to use the comedi `attach_pci` callback instead
of the `attach` callback for PCI auto-configuration.  There is no need
to support manual attachment of PCI devices supported by this driver, so
remove the `attach` callback altogether.

Note that this driver still uses the list of PCI "mite" devices created
by the "mite" module.  This will be dealt with by a later patch once
dynamic allocation of "mite" structures has been implemented.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 05:09:04 -07:00
Ian Abbott 2927eda609 staging: comedi: ni_65xx: move ni_65xx_driver
Move the `struct comedi_driver ni_65xx_driver` variable further down the
function to be closer to the `module_comedi_pci_driver()` module call
and to avoid having to forward declare `ni_65xx_attach()` and
`ni_65xx_detach()`.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 05:09:04 -07:00
Ian Abbott 7e66129311 staging: comedi: ni_65xx: use module_comedi_pci_driver()
Use the macro `module_comedi_pci_driver(comedi_driver, pci_driver)` to
register the module as a Comedi PCI driver.  Rename variables and
functions that have prefix `driver_` for consistency.  Set the `name`
member of the `struct pci_driver` variable in its initializer instead of
initializing it in the module initialization function.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 05:09:03 -07:00
Ian Abbott 0e5789f57a staging: comedi: ni_65xx: convert printk() to dev_...()
Convert the `printk()` calls in this drivers to use the `dev_...()`
calls instead.  Remove the initial `printk()` call in the comedi
`attach()` handler (`ni_65xx_attach()`) as it's a bit redundant - the
board type and contents of a board ID register are printed later in the
function.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 05:09:03 -07:00
Ian Abbott 372959d246 staging: comedi: ni_6527: use comedi attach_pci callback
Convert this PCI driver to use the comedi `attach_pci` callback instead
of the `attach` callback for PCI auto-configuration.  There is no need
to support manual attachment of PCI devices supported by this driver, so
remove the `attach` callback altogether.

Note that this driver still uses the list of PCI "mite" devices created
by the "mite" module.  This will be dealt with by a later patch once
dynamic allocation of "mite" structures has been implemented.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 05:09:03 -07:00
Ian Abbott fcdd5ecd66 staging: comedi: ni_6527: move ni6527_driver
Move the `struct comedi_driver ni6527_driver` variable further down the
function to be closer to the `module_comedi_pci_driver()` module call
and to avoid having to forward declare `ni6527_attach()` and
`ni6527_detach()`.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 05:09:03 -07:00
Ian Abbott 7ae09413c7 staging: comedi: ni_6527: use module_comedi_pci_driver()
Use the macro `module_comedi_pci_driver(comedi_driver, pci_driver)` to
register the module as a Comedi PCI driver.  Rename variables and
functions that have prefix `driver_` for consistency.  Set the `name`
member of the `struct pci_driver` variable in its initializer instead of
initializing it in the module initialization function.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 05:09:02 -07:00
Ian Abbott 38b951f18e staging: comedi: ni_6527: change driver name string
Change the driver name string used in data structures, kernel messages,
etc. from "ni6527" to "ni_6527" to match the module name.  Use a macro
`DRIVER_NAME` that expands to this string literal.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 05:09:02 -07:00
Ian Abbott ca33f4ce35 staging: comedi: ni_6527: convert printk() to dev_...()
Convert the `printk()` calls in this drivers to use the `dev_...()`
calls instead.  Remove the initial `printk()` call in the comedi
`attach()` handler (`ni6527_attach()`) as it's a bit redundant - the
board type and contents of a board ID register are printed later in the
function.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 05:09:02 -07:00
Greg Kroah-Hartman 2bcb132c69 Merge 3.6-rc6 into usb-next
This resolves the merge problems with:
	drivers/usb/dwc3/gadget.c
	drivers/usb/musb/tusb6010.c
that had been seen in linux-next.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-16 20:42:46 -07:00
Greg Kroah-Hartman 7ac3c93e5d Merge 3.6-rc6 into tty-next
This pulls in the fixes in 3.6-rc6

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-16 17:31:36 -07:00
Greg Kroah-Hartman 6a2a2cdd57 Merge 3.6-rc6 into staging-next
This pulls in the staging tree fixes in 3.6-rc6 into our branch to resolve the
merge issues.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-16 17:17:25 -07:00
Linus Torvalds 73f8be297e This is the remaining MFD fixes for 3.6, with 5 pending fixes:
- A tps65217 build error fix.
 - A lcp_ich regression fix caused by the MFD driver failing to initialize the
   watchdog sub device due to ACPI conflicts.
 - 2 MAX77693 interrupt handling bug fixes.
 - An MFD core fix, adding an IRQ domain argument to the MFD device addition
   API in order to prevent silent and potentially harmful remapping behaviour
   changes for drivers supporting non-DT platforms.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJQVQpwAAoJEIqAPN1PVmxKpnQP/iDPakfGT0m00nxk9VvuXfaA
 SlNxhhM1ZPxlZcBrVFULZ+dCVuUaBYIfwoT4Wwl2yZsmp8uYb62Rd6LGXDnjO+FH
 zKMg3b/KDHq/jicYxqFy4bVq3I850jTLN4Hti6hArn8HM6gxZJQxM810Poxt6M0T
 odud6oHSevGpCoL7GU4O+gmx1wKSDRrw6TZPokJDfXaQcFPJEt0YGGtI2zAO1sV+
 iBPQE/bI3bF5r/kowbh9ro5WybGNyFrwiYtaTzJWntXoPKN1lmr0F2F2NaCEo1xj
 2vJPFSCK3qC9Ft7sPQEBYxrSXzyzgu7G8HGgkcBG5SaSo+W3awe9DEaHfk5E7sdr
 iyc01kh4FmGlMAvHG/zcK3YvchR7GJdRI7BrR+MTQ03ZUv/ZrmTYFAHv5fAzBQ+N
 6ZUoC/1bqPKpfeFPOKYpDeYJVnFBWLYr+t7McTqqg+kpxUuYnQ0HyJVjDh01ZVQT
 AtCjjW7R+Ka44B+xfMOartPZMqZZEHSJ0UjacyEyzMpAAY14eUDMtTqs/jtNp+8Z
 B0bZiA8ZhUmNVH7TZoT/u57FgEW34JnM8oH6jLVN+yjInpuugIvqpZn0TA90GL7V
 Fh2DALMgUN5z/TXduGSsSPg1hvXFPOujaS+4o78e8PWiVQd5XUk/mc8OOS/mrRwj
 +mILnzxJcp8iYrYqESbt
 =nP/y
 -----END PGP SIGNATURE-----

Merge tag 'mfd-for-linus-3.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6

Pull mfd fixes from Samuel Ortiz:
 "This is the remaining MFD fixes for 3.6, with 5 pending fixes:

   - A tps65217 build error fix.
   - A lcp_ich regression fix caused by the MFD driver failing to
     initialize the watchdog sub device due to ACPI conflicts.
   - 2 MAX77693 interrupt handling bug fixes.
   - An MFD core fix, adding an IRQ domain argument to the MFD device
     addition API in order to prevent silent and potentially harmful
     remapping behaviour changes for drivers supporting non-DT
     platforms."

* tag 'mfd-for-linus-3.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6:
  mfd: MAX77693: Fix NULL pointer error when initializing irqs
  mfd: MAX77693: Fix interrupt handling bug
  mfd: core: Push irqdomain mapping out into devices
  mfd: lpc_ich: Fix a 3.5 kernel regression for iTCO_wdt driver
  mfd: Move tps65217 regulator plat data handling to regulator
2012-09-16 13:22:21 -07:00
Mark Brown 0848c94fb4 mfd: core: Push irqdomain mapping out into devices
Currently the MFD core supports remapping MFD cell interrupts using an
irqdomain but only if the MFD is being instantiated using device tree
and only if the device tree bindings use the pattern of registering IPs
in the device tree with compatible properties.  This will be actively
harmful for drivers which support non-DT platforms and use this pattern
for their DT bindings as it will mean that the core will silently change
remapping behaviour and it is also limiting for drivers which don't do
DT with this particular pattern.  There is also a potential fragility if
there are interrupts not associated with MFD cells and all the cells are
omitted from the device tree for some reason.

Instead change the code to take an IRQ domain as an optional argument,
allowing drivers to take the decision about the parent domain for their
interrupts.  The one current user of this feature is ab8500-core, it has
the domain lookup pushed out into the driver.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-09-15 23:22:04 +02:00
David S. Miller b48b63a1f6 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts:
	net/netfilter/nfnetlink_log.c
	net/netfilter/xt_LOG.c

Rather easy conflict resolution, the 'net' tree had bug fixes to make
sure we checked if a socket is a time-wait one or not and elide the
logging code if so.

Whereas on the 'net-next' side we are calculating the UID and GID from
the creds using different interfaces due to the user namespace changes
from Eric Biederman.

Signed-off-by: David S. Miller <davem@davemloft.net>
2012-09-15 11:43:53 -04:00
anish kumar ca7d1b32d2 iio: Documentation change for inkern interface.
This commit- 314be14bb renamed the _st_ functions to loose the bit
that was meant for staging version but forgot to change
the documentation which still have _st_ sprinkled in some of the
places.

Signed-off-by: anish kumar <anish198519851985@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2012-09-15 10:02:16 +01:00
Lars-Peter Clausen 968f3d5ba0 iio: Move ad7476 driver out of staging
The ad7476 driver is a driver for simple single channel ADCs. The driver does
not export any experimental or custom ABI files nor do the static code check
tools report any issues, so move the driver out of staging.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2012-09-15 10:02:14 +01:00
Lars-Peter Clausen 610a407cdc staging:iio:ad7476: Use be16_to_cpup instead of open-coding it
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2012-09-15 10:02:14 +01:00
Lars-Peter Clausen 7a28fe3c93 staging:iio:ad7476: Squash driver into a single file.
After the recent cleanups the buffer support is just a single 23 line function.
This does not really justify a file on its own, so move it to the main driver
file. And with only one source file left the header file containing the device
state struct becomes superflousious so move the content of the header
file to the main driver source file as well.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2012-09-15 10:02:13 +01:00
Lars-Peter Clausen cb093e444f staging:iio:ad7476: Rework reference voltage handling
Slightly rework the reference voltage handling for the ad7476 driver. Now the only
way to specify a external reference voltage is to use the regulator API,
previously it was possible to use either platform_data or the regulator API. The
new way is more consistent with what other drivers do.

Also do not ignore errors when requesting the regulator, since this will cope
very poorly with e.g. deferred probing.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2012-09-15 10:02:03 +01:00
Rob Herring c3058c27fb staging: ste_rmi4: remove gpio.h include
gpio.h is not needed and is going to be removed.

Reported-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
2012-09-14 09:21:56 -05:00
Tushar Behera 8e360ec823 Staging: bcm: Fix udelay related compilation error
commit 6788d7dab6 ("Staging: bcm: Use udelay instead of msleep for
delays in nvm.c") replaces msleep with udelay values. udelay values
of more than 1000 should be replaced by mdelay instead.

This fixes following build error.
ERROR: "__bad_udelay" [drivers/staging/bcm/bcm_wimax.ko] undefined!
make[1]: *** [__modpost] Error 1
make: *** [modules] Error 2

Cc: Kevin McKinney <klmckinney1@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-13 21:46:29 -07:00
Aaro Koskinen d42bb0fbd9 staging: xgifb: delete bogus video RAM configuration
The driver reconfigures DRAM size register to 8M (regardless what the
actual size was) once the init has been completed, overwriting the
correct value written during the early init. As a result if the driver
is unloaded and reloaded, the user will be limited to 8M video memory
and may lose some of the available video modes.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-13 20:41:57 -07:00
Aaro Koskinen 98f4eade14 staging: xgifb: setup initial video RAM size for systems without BIOS
On embedded systems without a BIOS, the DRAM sizing register is 0 after
the boot, and the driver thinks we have only 1 MB video memory. On such
cases, use the PCI window size for the initial size. This information
is needed only to create the I/O mapping - the driver will later detect
and configure the memory size correctly. Limit the size to 16 MB as it
should be sufficient for all supported video modes.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-13 20:41:56 -07:00
Macpaul Lin 1839c7ebd9 staging/gdm72xx: usb_boot: replace firmware upgrade API
Replace file I/O of reading firmware usb_boot()
by request_firmware().

Signed-off-by: Macpaul Lin <macpaul@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-13 20:40:17 -07:00
Macpaul Lin 443242d2fe staging/gdm72xx: usb_boot: coding style cleanup
1. Coding style re-formatting (tabs).
2. Remove unused MIN() marco.

Signed-off-by: Macpaul Lin <macpaul@gmail.com>
Cc: Paul Stewart <pstew@chromium.org>
Cc: Ben Chan <benchan@chromium.org>
Cc: Sage Ahn <syahn@gctsemi.com>
Cc: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-13 20:40:10 -07:00
Kevin McKinney ae1cbea5f9 Staging: bcm: Convert INT to int in Transmit.c
This patch converts INT to int in Transmit.c

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-13 20:35:40 -07:00
Kevin McKinney b9e25f81c5 Staging: bcm: Properly format comments in Transmit.c
This patch properly formats comments
as reported by checkpatch.pl.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-13 20:35:40 -07:00
Kevin McKinney d5873d3817 Staging: bcm: Remove initialization from if statement in Transmit.c
This patch Remove initialization from
if statement in Transmit.c as reported
by checkpatch.pl.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-13 20:35:40 -07:00
Kevin McKinney 97e0a509d9 Staging: bcm: Properly format braces in Transmit.c
This patch cuddles braces as reported
by checkpatch.pl.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-13 20:32:47 -07:00
Kevin McKinney 22976bc354 Staging: bcm: Fix all white space issues in Transmit.c
This patch fixes all white space issues
as reported by checkpatch.pl.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-13 20:31:46 -07:00
Devendra Naga 5d6f5054e8 staging:wlan-ng: remove the remaining return at the end of void function
this removes the remaining return which the function actually
wants to return, for that it used goto failed and failed lable
have the return statement at the end of function, which is all
unnecessary, remove this and make the function return at the
places where it does the goto failed

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-13 20:22:25 -07:00
Devendra Naga 2b970b2d30 staging:wlan-ng: remove all the return statements at the end of functions
this file is having all unnecessary return statements at the end of functions
which return void, remove all of them.

some of the functions still uses the return for having the goto end,
which the label end defined at the end of the function which returns
void, this will be cleaned up in next change

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-13 20:22:25 -07:00
Devendra Naga 675be12f45 staging:wlan-ng: clean hfa384x_usbctlx_submit
else is not required as such we can do with just with a single if

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-13 20:22:24 -07:00
Devendra Naga 3f45932720 staging:wlan-ng: make wlan_unsetup void
this is because this function does a deinit job and most of the
deinit functions are expected to return void. Also this function
doesn't fail anywhere..

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-13 20:22:24 -07:00
Samuel Iglesias Gonsalvez d04600679b Staging: ipack/devices/ipoctal: simplify ipoctal_write_tty()
Remove count_wr and the assigment of nb_bytes = 0 in that function as is
useless. Now it returns the count of the characters actually sent.

There is other nb_bytes = 0 deleted that has a duplicate a few lines before.

Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-13 20:21:38 -07:00
Samuel Iglesias Gonsalvez 4514108c5b Staging: ipack/devices/ipoctal: acknowledge BREAK condition.
Clear the BREAK flag from the ISR register. Doing that, we avoid to read
the same condition for the next character received.

Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-13 20:21:38 -07:00
Jens Taprogge c6e2dfaa52 staging: ipack: remove irq field in struct ipack_device.
The field irq currently is identical to the slot number.  It does not seem to
have any real use.  The number is written to hardware in ipoctal but it seems
the value that is written does not matter.

Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org>
Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-13 20:21:38 -07:00
Jens Taprogge ea991147ec Staging: ipack: move the responsibility to clear interrupts to the IPack devices.
Now the IPack device acknowledges its own IRQ.

Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org>
Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-13 20:21:38 -07:00
Jens Taprogge e4af9497b6 Staging: ipack: Add IPACK_INT_SPACE memory space.
This will allow us to correctly access the IPack INT space.

Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org>
Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-13 20:21:38 -07:00
Devendra Naga 7505817603 staging:ccg: cleanup a bit of binding
the ccg_bind_function uses ret variable and a logic around the
ccg_bind_enabled_functions to return a value other than 0 if
bind function fail, other wise returns 0, this can be achieved
with just a return ccg_bind_enabled_functions(dev, c);

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-13 20:20:28 -07:00
Devendra Naga 99d4b1a6cb staging:ccg: fix a class_destroy when kmalloc fails after the class_create
we do class_create and call kmalloc to allocate dev pointer,
and if kmalloc fail we forget destoying class

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-13 20:20:28 -07:00
Davidlohr Bueso 43bf2f4bfe staging: keucr: remove String func prototypes
Commit 1b9f644dfe already got rid of
StringCopy and StringCmp, so remove the left over prototypes.

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-13 20:20:27 -07:00
Ben Chan 129575f2a8 staging: gdm72xx: simplify alloc_tx_struct and alloc_rx_struct
This patch simplifies alloc_tx_struct and alloc_rx_struct in gdm_sdio.c
and gdm_usb.c by replacing kmalloc+memset with kzalloc and reorganizing
the code.

Signed-off-by: Ben Chan <benchan@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-13 20:15:41 -07:00
H Hartley Sweeten b37c1aeed8 staging: comedi: 8255_pci: move ni_pcidio 8255 board support
The 8255 based boards in the ni_pcidio driver are all simple
memory mapped 8255 boards that don't require the dma support
provided by the mite driver.

Move the support for these boards from the ni_pcidio driver to
the generic 8255_pci driver.

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>
2012-09-13 20:13:03 -07:00
H Hartley Sweeten 77f17d3714 staging: comedi: 8255_pci: support memory mapped i/o boards
Some of the PCI based 8255 boards that can be supported by this driver
use memory mapped i/o. Add the code needed to support these boards.

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>
2012-09-13 20:13:03 -07:00
H Hartley Sweeten 6b79db383f staging: comedi: 8255_pci: add vendor id to boardinfo
This driver supports PCI boards from multiple vendors. It's
possible for boards from different vendors to have the same
device id.

Add the vendor id to the boardinfo so pci_8255_find_boardinfo()
matches the pci_dev to the correct boardinfo.

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>
2012-09-13 20:12:30 -07:00
H Hartley Sweeten 606b04707e staging: comedi: 8255_pci: add support for the PCI-DIO96H board
Add support for the Measurement Computing PCI-DIO96H board to the
generic 8255_pci driver.

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>
2012-09-13 20:11:14 -07:00
H Hartley Sweeten df1a3f8796 staging: comedi: remove cb_pcidio driver
Move the support for the boards in the cb_pcidio driver to
the generic 8255_pci driver and remove the cb_pcidio driver.

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>
2012-09-13 20:11:14 -07:00
H Hartley Sweeten f7c2286826 staging: comedi: 8255_pci: fix namespace due to rename of driver
Due to the rename of this file, change all the adl_pci7296_* to
pci_8255_* so that everything has namespace associated with this
driver.

Also, fix the comedi description comment based on the rename of
the file. Remove the extra comment about the driver attach.

Modify the PCI_DEVICE_ID_* defines in preparation of moving
additional vendor/device ids into this driver.

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>
2012-09-13 20:11:13 -07:00
H Hartley Sweeten 41518de2e1 staging: comedi: rename adl_pci7296 driver
This driver will be used for all generic PCI based 8255 digital
i/o boards. Rename the driver accordingly..

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>
2012-09-13 20:11:13 -07:00
Lars-Peter Clausen 93e33d7030 staging:iio:ad7476: Avoid alloc/free for each sample in buffered mode
The ad7476 driver has only support for 1 channel ADCs. So the upper limit for
the buffer size is the size of one sample plus the size of the timestamp.
Preallocate a buffer large enough to hold this to avoid having to allocate and
free a new buffer for each sample being captured.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2012-09-13 20:25:49 +01:00
Lars-Peter Clausen fcc7800b65 staging:iio:ad7476: Remove duplicated chip info entries
Some of the parts supported by this driver are software compatible. The
difference between them is only in the operating voltage range. So we do not
need extra chip info entries for them.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2012-09-13 20:25:25 +01:00
Bjorn Helgaas 78890b5989 Merge commit 'v3.6-rc5' into next
* commit 'v3.6-rc5': (1098 commits)
  Linux 3.6-rc5
  HID: tpkbd: work even if the new Lenovo Keyboard driver is not configured
  Remove user-triggerable BUG from mpol_to_str
  xen/pciback: Fix proper FLR steps.
  uml: fix compile error in deliver_alarm()
  dj: memory scribble in logi_dj
  Fix order of arguments to compat_put_time[spec|val]
  xen: Use correct masking in xen_swiotlb_alloc_coherent.
  xen: fix logical error in tlb flushing
  xen/p2m: Fix one-off error in checking the P2M tree directory.
  powerpc: Don't use __put_user() in patch_instruction
  powerpc: Make sure IPI handlers see data written by IPI senders
  powerpc: Restore correct DSCR in context switch
  powerpc: Fix DSCR inheritance in copy_thread()
  powerpc: Keep thread.dscr and thread.dscr_inherit in sync
  powerpc: Update DSCR on all CPUs when writing sysfs dscr_default
  powerpc/powernv: Always go into nap mode when CPU is offline
  powerpc: Give hypervisor decrementer interrupts their own handler
  powerpc/vphn: Fix arch_update_cpu_topology() return value
  ARM: gemini: fix the gemini build
  ...

Conflicts:
	drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
	drivers/rapidio/devices/tsi721.c
2012-09-13 08:41:01 -06:00
Tony Lindgren ec2c0825ca ARM: OMAP2+: Remove hardcoded IRQs and enable SPARSE_IRQ
Remove hardcoded IRQs in irqs.h and related files as these
are no longer needed.

Reviewed-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2012-09-12 18:06:30 -07:00
Lars-Peter Clausen cb75f2335c staging:iio:ad7476: Fix off by one error for channel shift
The datasheet is a bit confusing about this. It says that a dataword has 4
leading zeros, but the first zero is already put on the bus when CS is pulled
low and the second zero is put on the bus on the first leading edge of SCLK, so
when the first bit is sampled on the first trailing edge it will sample what the
datasheet refers to as the second leading zero. Subsequently we only see 3
leading zeros in the 16 bit dataword and the result we get is shifted to the
left by one bit. Fix this by adjusting the channel shift by 1.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2012-09-12 18:32:07 +01:00
Jens Taprogge 7dd73b866e staging: ipack/bridges/tpci200: Use endianess-aware types where applicable.
Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org>
Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-12 09:56:02 -07:00
Jens Taprogge 6f89221683 Staging: ipack/devices/ipoctal: Unmap memory on device removal.
Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org>
Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-12 09:56:02 -07:00
Samuel Iglesias Gonsalvez cacd55c1b7 Staging: ipack: update TODO file
With the latest patches, the TODO file was outdated.

Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-12 09:56:02 -07:00
Samuel Iglesias Gonsalvez ab0a71f06d Staging: ipack/devices/ipoctal: read more than one character from RX FIFO.
The RX FIFO has a size of 3 characters. Check if when we are picking the
oldest one, we have more to read.

Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-12 09:56:02 -07:00
Jens Taprogge 9c1d784afc Staging: ipack/devices/ipoctal: Get rid of ipoctal_list.
Use tty_dev->dev's drdata to associate struct ipocal_channel to the
respective tty_struct.

Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org>
Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-12 09:56:02 -07:00
Jens Taprogge 3f3a592798 Staging: ipack/devices/ipoctal: Use KBUILD_MODNAME instead of hardcoded string.
Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org>
Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-12 09:56:02 -07:00
Jens Taprogge 2afb41d9d3 Staging: ipack/devices/ipoctal: Check tty_register_device return value.
Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org>
Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-12 09:56:02 -07:00
Jens Taprogge 1adda49706 Staging: ipack/devices/ipoctal: Clean up device removal.
Make use of dev_set_drvdata() and dev_get_drvdata() to store and obtain
a pointer to the ipoctal struct corresponding to a struct dev.
Previously we relied on a private list of devices.

Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org>
Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-12 09:56:01 -07:00
Jens Taprogge faa75c406e Staging: ipack: Let interrupts return irqreturn_t.
Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org>
Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-12 09:56:01 -07:00
Jens Taprogge 40733ed763 Staging: ipack/bridges/tpci200: move tpci200_free_irq() and tpci200_request_irq()
Now, all the interrupt related functions are next to each other.

Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org>
Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-12 09:56:01 -07:00
Jens Taprogge 877adc406c Staging: ipack/bridges/tpci200: More cleanups.
Rename __tpci_request_irq() to tpci_enable_irq() and __tpci_free_irq()
to tpci_disable_irq().  Change their second argument, move them above
tpci200_interrupt(), and use tpci_disable_irq() in the latter

Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org>
Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-12 09:56:01 -07:00
Jens Taprogge ab0deffcb9 Staging: ipack/bridges/tpci200: Cleanup in tpci200_slot_irq() and tpci200_interrupt()
Minor cleanup.  No functional changes.

Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org>
Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-12 09:56:01 -07:00
Jens Taprogge 88ff8480d3 Staging: ipack/bridges/tpci200: Clean up interrupt handling.
Previously the return value from tpci200_interrupt was not quite correct
if a slot had caused an interrupt but no handler was instellalled:
IRQ_NONE was returned.  However in this case we react to the interrupt
by disabling the IPack device interrupt.

Basically there are two cases the code now distinguishes:
 - The tpci200 has raised an interrupt.  We handle it and return
   IRQ_HANDLED.
 - Our device did not raise an interrupt. We return IRQ_NONE.

Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org>
Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-12 09:56:01 -07:00
Jens Taprogge 487e0a608d Staging: ipack/bridges/tpci200: Protect device registers with spinlock.
Some of the device registers are accessed from both interrupt and
non-interrupt context.  To ensure proper read-modify-write modification
of these registers we can not use the  "global" tpci200 mutex.  Instead
a spin-lock is used.

Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org>
Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-12 09:56:01 -07:00
Jens Taprogge b8d61d49b2 Staging: ipack/bridges/tpci200: RCU protect slot_irq pointers.
In tpci200_request_irq as well as tpci200_free_irq we set and unset the
pointer to struct slot_irq.  This pointer is accessed in
tpci200_interrupt.  To ensure that the pointer is not freed after it has
been fetched in tpci200_interrupt() it is now protected through RCU.

Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org>
Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-12 09:54:16 -07:00
Jens Taprogge 699a89f1e2 Staging: ipack/devices/ipoctal: remove superfluous function.
ipoctal_write_tty and ipoctal_write are merged.

Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org>
Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-12 09:54:16 -07:00
Jens Taprogge 87cfb95500 Staging: ipack/devices/ipoctal: Split interrupt service routine.
Split the IRQ service routing in TX part and RX part.

Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org>
Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-12 09:54:16 -07:00
Jens Taprogge 4e4732aca9 Staging: ipack/devices/ipoctal: Store isr masks in ipoctal_channel
This way interrupt handling becomes independent of the channel number.

Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org>
Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-12 09:54:15 -07:00
Jens Taprogge ef79de0314 Staging: ipack/devices/ipoctal: put ipoctal_channel into tty->driver_data.
Each tty's driver_data is now pointing to the channel it is talking to.  struct
ipoctal_channel contains all the information the callbacks require to do their
work.

Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org>
Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-12 09:54:15 -07:00
Jens Taprogge 459e6d7c93 Staging: ipack/devices/ipoctal: Directly use ioread/iowrite function.
Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org>
Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-12 09:54:15 -07:00
Jens Taprogge 70a32811e5 Staging: ipack/devices/ipoctal: split ipoctal_channel from ipoctal.
By moving everything channel related into a separate struct we will be
able to clean up a lot of code.  In the end tty->driver_data will no
longer need to point to ipoctal but instead can point to the respective
channel.

Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org>
Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-12 09:54:15 -07:00
Jens Taprogge af2140ce28 Staging: ipack/bridges/tpci200: Clean up interrupt handler.
This also removes a possible bug in the unhandles_ints part when
slots[i] is not set.

Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org>
Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-12 09:54:15 -07:00
Jens Taprogge 9b27adbced Staging: ipack/bridges/tpci200: Remove side effects of tpci200_{request,free}_irq.
Use the __tpci200_{set,clear}_mask routines to access control
register.  Do not overwrite flags unrelated to interrupt handling.

Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org>
Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-12 09:54:15 -07:00
Jens Taprogge 0118681b2b Staging: ipack/bridges/tpci200: add helpers for writing control regs.
Convert tpci200_set_clockrate and tpci200_interrupt.

Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org>
Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-12 09:54:15 -07:00
Macpaul Lin 0d66002556 staging/gdm72xx: gdm_usb coding style clean up
gdm_usb.* coding style clean up.

Signed-off-by: Macpaul Lin <macpaul@gmail.com>
Cc: Paul Stewart <pstew@chromium.org>
Cc: Ben Chan <benchan@chromium.org>
Cc: Sage Ahn <syahn@gctsemi.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-12 09:52:10 -07:00
Aaro Koskinen 6b2a7e0c9b staging: xgifb: prevent video RAM size exceeding PCI window size
Add a sanity check for the video RAM size. It should fit into the
PCI window.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-12 09:47:09 -07:00
Aaro Koskinen a09f347c6c staging: xgifb: validate the mode against video memory size
It's possible to select video mode that exceeds the available video
memory. This is potentially dangerous, fix by adding a check.

The patch fixes system hangs seen occasionally when playing random videos
with mplayer.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-12 09:45:58 -07:00
Dan Carpenter f325129ae9 Staging: silicom: remove S_IWOTH from proc declaration
We don't need these to be world writable or group writable.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Daniel Cotey <puff65537@bansheeslibrary.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-12 09:43:45 -07:00
Peter Senna Tschudin 47ad3428a1 drivers/staging/gdm72xx/gdm_sdio.c: Remove useless kfree
Remove useless kfree() and clean up code related to the removal.

The semantic patch that finds this problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r exists@
position p1,p2;
expression x;
@@

if (x@p1 == NULL) { ... kfree@p2(x); ... return ...; }

@unchanged exists@
position r.p1,r.p2;
expression e <= r.x,x,e1;
iterator I;
statement S;
@@

if (x@p1 == NULL) { ... when != I(x,...) S
                        when != e = e1
                        when != e += e1
                        when != e -= e1
                        when != ++e
                        when != --e
                        when != e++
                        when != e--
                        when != &e
   kfree@p2(x); ... return ...; }

@ok depends on unchanged exists@
position any r.p1;
position r.p2;
expression x;
@@

... when != true x@p1 == NULL
kfree@p2(x);

@depends on !ok && unchanged@
position r.p2;
expression x;
@@

*kfree@p2(x);
// </smpl>

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-12 09:43:45 -07:00
Peter Senna Tschudin 2e464f0068 drivers/staging/rtl8192u/r8192U_core.c: Remove useless kfree
Remove useless kfree() and clean up code related to the removal.

The semantic patch that finds this problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r exists@
position p1,p2;
expression x;
@@

if (x@p1 == NULL) { ... kfree@p2(x); ... return ...; }

@unchanged exists@
position r.p1,r.p2;
expression e <= r.x,x,e1;
iterator I;
statement S;
@@

if (x@p1 == NULL) { ... when != I(x,...) S
                        when != e = e1
                        when != e += e1
                        when != e -= e1
                        when != ++e
                        when != --e
                        when != e++
                        when != e--
                        when != &e
   kfree@p2(x); ... return ...; }

@ok depends on unchanged exists@
position any r.p1;
position r.p2;
expression x;
@@

... when != true x@p1 == NULL
kfree@p2(x);

@depends on !ok && unchanged@
position r.p2;
expression x;
@@

*kfree@p2(x);
// </smpl>

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-12 09:43:45 -07:00
Kevin McKinney e66fc1fba2 Staging: bcm: Create and initialize new device id in InterfaceInit
This patch create and initalizes a new device
id of 0x172 as reported by Rinat Camalov
<richman1000000d@gmail.com>. In addition, a
comment is added to the potential invalid
existing device id.

Reported-by: Rinat Camalov <richman1000000d@gmail.com>
Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-12 09:43:45 -07:00
H Hartley Sweeten 5c1eb3857a staging: comedi: adq12b: remove devpriv macro
This macro relies on a local variable having a specific name.

Also, remove the kfree in the detach. The comedi core handles
the kfree of dev->private.

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>
2012-09-12 09:30:34 -07:00
H Hartley Sweeten 22d4b56f5b staging: comedi: adl_pci9118: use cfc_check_trigger_src
The the cfc_check_trigger_src helper for the "step 1" tests in
pci9118_ai_cmdtest().

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>
2012-09-12 09:30:06 -07:00
H Hartley Sweeten 5e49e5152c staging: comedi: adl_pci9118: remove forward declarations
Move some of the functions to remove the need for the forward
declarations.

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>
2012-09-12 09:30:06 -07:00
H Hartley Sweeten 435c8851ea staging: comedi: adl_pci9118: remove commented out printk debug
These debug messages should be removed from the final driver.

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>
2012-09-12 09:30:06 -07:00
H Hartley Sweeten 80f3023b45 staging: comedi: adl_pci9118: remove the function separation comments
These are just unnecessary whitespace.

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>
2012-09-12 09:30:06 -07:00
H Hartley Sweeten ca82a6e7e3 staging: comedi: adl_pci9118: remove PCI9118_EXTDEBUG and DPRINTK
These macros enable a bunch of function trace messages. These should
not be in the final driver.

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>
2012-09-12 09:30:06 -07:00
H Hartley Sweeten ae34f6aa4e staging: comedi: adl_pci9118: remove devpriv and this_board macros
These macros rely on a local variable having a specific name.

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>
2012-09-12 09:30:06 -07:00
H Hartley Sweeten b7f16de6a4 staging: comedi: adv_pci1710: use cfc_check_trigger_is_unique
Use the helper function cfc_check_trigger_is_unique for the "step 2a"
tests of pci171x_ai_cmdtest().

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>
2012-09-12 09:29:22 -07:00
H Hartley Sweeten 85f3088b84 staging: comedi: adv_pci1710: single source triggers are unique
If a single source trigger passes "step 1" of the do_cmdtest function
they are already unique. There is no need to recheck them.

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>
2012-09-12 09:29:22 -07:00
H Hartley Sweeten 8531fce945 staging: comedi: adv_pci1710: use cfc_check_trigger_src
Use the helper function cfc_check_trigger_src for the "step 1"
tests of pci171x_ai_cmdtest().

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>
2012-09-12 09:29:22 -07:00
H Hartley Sweeten 60a63228c8 staging: comedi: adv_pci1710: remove "dummy" boardinfo entry
The legacy attach used the "dummy" boardinfo entry to allow
matching a boardinfo to a pci card based on the "name" passed
by the comedi core. This driver now uses the PCI auto config
mechanism which always matches to the PCI vendor/device ids.

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>
2012-09-12 09:29:22 -07:00
H Hartley Sweeten 398e6f1230 staging: comedi: adv_pci1710: remove unnecessary 'valid'
The 'valid' variable in the private data is only used in the
detach of the board to determine if the pci1710_reset() function
can be called. That function only requires a valid dev->iobase
to work. Use that for the check instead and remove the unneeded
variable from the private data.

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>
2012-09-12 09:29:22 -07:00
H Hartley Sweeten f62608e3d0 staging: comedi: adv_pci1710: use attach_pci callback
Convert this PCI driver to use the comedi PCI auto config attach
mechanism by adding an 'attach_pci' callback function. Since the
driver does not require any external configuration options, and
the legacy 'attach' callback is now optional, remove it.

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>
2012-09-12 09:29:22 -07:00
H Hartley Sweeten bc4b4aa5f5 staging: comedi: adv_pci1710: remove board attach noise
Remove the kernel message noise during the attach of the board.
Use a simple/clean dev_info at the end of the attach.

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>
2012-09-12 09:29:22 -07:00
Daniel Cotey b84a9ce544 Staging: silicom: checkpatch cleanup: header tabs n spaces
Fix defines to comply with style guidelines

Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-11 14:31:52 -07:00
Daniel Cotey 13d6b7b21a Staging: silicom: minor cleanup: remove unused define
DEVICE_NODE not used

Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-11 14:31:52 -07:00
Daniel Cotey e3845b34e8 Staging: silicom: checkpatch: cleanup macros
Fix msec_delay_bp macro formatting

Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-11 14:31:52 -07:00
H Hartley Sweeten b67cd42460 staging: comedi: adl_pci9111: remove pci_dev_put()
This driver no longer walks the pci bus to find the pci_dev.
The pci_dev_put() is no longer needed.

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>
2012-09-11 14:05:02 -07:00
H Hartley Sweeten 4e4fd689ad staging: comedi: icp_multi: remove the function description comments
These comments are pretty obvious. Remove them.

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>
2012-09-11 14:03:16 -07:00
H Hartley Sweeten 65e9e2dc2c staging: comedi: icp_multi: remove devpriv macro
This macro relies on a local variable having a specific name.

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>
2012-09-11 14:03:16 -07:00
H Hartley Sweeten 194b9e3cf4 staging: comedi: icp_multi: use attach_pci callback
Convert this PCI driver to use the comedi PCI auto config attach
mechanism by adding an 'attach_pci' callback function. Since the
driver does not require any external configuration options, and
the legacy 'attach' callback is now optional, remove it. The
boardinfo is also not needed now so remove it also.

This also allows removing the icp_multi.h header completely.

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>
2012-09-11 14:03:16 -07:00
H Hartley Sweeten 798cdd05e0 staging: comedi: icp_multi: remove board attach noise
Remove the kernel message noise during the attach of the board.
Use a simple/clean dev_info at the end of the attach.

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>
2012-09-11 14:03:16 -07:00
H Hartley Sweeten 12b4a097b6 staging: comedi: icp_multi: the number of subdevices is fixed
This board always has 5 subdevices.

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>
2012-09-11 14:03:16 -07:00
H Hartley Sweeten aa1b2cb3c5 staging: comedi: icp_multi: remove have_irq from boardinfo
The board supported by this driver always supports interrupts.
Remove the boardinfo.

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>
2012-09-11 14:03:16 -07:00
H Hartley Sweeten 22d5ab0201 staging: comedi: icp_multi: remove iorange from boardinfo
This variable is not used in the driver. Remove it.

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>
2012-09-11 14:03:16 -07:00
H Hartley Sweeten 4ba47b8f88 staging: comedi: icp_multi: remove cardtype from boardinfo
This variable is not used in the driver. Remove it.

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>
2012-09-11 14:03:16 -07:00
H Hartley Sweeten d68a8635c5 staging: comedi: icp_multi: remove rangecode from boardinfo
The analog inputs and outputs for this driver use the same table
to set the analog range. Remove the boardinfo for it and just
reference the table directly.

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>
2012-09-11 14:03:16 -07:00
H Hartley Sweeten abdeac3fd6 staging: comedi: icp_multi: remove rangelist_ai from boardinfo
There is only one board type supported by this driver and the
analog input ranges are constant. Remove the boardinfo for it.

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>
2012-09-11 14:03:15 -07:00
H Hartley Sweeten d4fb0f2560 staging: comedi: icp_multi: remove ranglist_ao from boardinfo
This variable is not used by the driver. Remove it.

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>
2012-09-11 14:03:15 -07:00
H Hartley Sweeten efac035ca6 staging: comedi: icp_multi: remove ai_maxdata from boardinfo
The analog inputs of this board always have 12-bit resolution.
Remove the boardinfo and just open-code the value.

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>
2012-09-11 14:01:56 -07:00
H Hartley Sweeten 68b82e0954 staging: comedi: icp_multi: remove ao_maxdata from boardinfo
The analog outputs of this board always have 12-bit resolution.
Remove the boardinfo and just open-code the value.

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>
2012-09-11 14:01:56 -07:00
H Hartley Sweeten 08567ce9b6 staging: comedi: icp_multi: remove n_aichand from boardinfo
The analog inputs for this board always support differential
inputs and the number of channels is half the normal analog
input number.

Remove the n_aichand field from the boardinfo and fix the code
accordingly.

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>
2012-09-11 14:01:56 -07:00
H Hartley Sweeten 281ecb066d staging: comedi: icp_multi: remove n_aichan from boardinfo
There is only one board type supported by this driver and the
number of analog input channels is constant. Remove the
boardinfo for it and just open-code the value.

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>
2012-09-11 14:01:55 -07:00
H Hartley Sweeten fafe91a8b2 staging: comedi: icp_multi: remove n_aochan from boardinfo
There is only one board type supported by this driver and the
number of analog output channels is constant. Remove the
boardinfo for it and just open-code the value.

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>
2012-09-11 14:01:55 -07:00
H Hartley Sweeten 48f3125126 staging: comedi: icp_multi: remove n_dichan from boardinfo
There is only one board type supported by this driver and the
number of digital input channels is constant. Remove the
boardinfo for it and just open-code the value.

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>
2012-09-11 14:01:55 -07:00
H Hartley Sweeten 2aa707058f staging: comedi: icp_multi: remove n_dochan from boardinfo
There is only one board type supported by this driver and the
number of digital output channels is constant. Remove the
boardinfo for it and just open-code the value.

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>
2012-09-11 14:01:55 -07:00
H Hartley Sweeten 5b93da54bf staging: comedi: icp_multi: remove n_ctrs from boardinfo
There is only one board type supported by this driver and the
number of counter channels is constant. Remove the boardinfo
for it and just open-code the value.

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>
2012-09-11 14:01:55 -07:00
H Hartley Sweeten 888866625c staging: comedi: icp_multi: remove ICP_MULTI_EXTDEBUG
This define enables a bunch of function trace messages. These
should be removed in the final driver.

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>
2012-09-11 14:01:55 -07:00
H Hartley Sweeten 554e02c924 staging: comedi: icp_multi: convert to a pci_driver
This driver is for a PCI device not a legacy device.

Convert it from a module_comedi_driver to a module_comedi_pci_driver.
This will allow using the comedi_pci_auto_config mechanism to attach
to the device.

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>
2012-09-11 14:01:55 -07:00
Greg Kroah-Hartman 7135f08e47 usb: gadget: patches for v3.7 merge window
This pull request is large but the biggest part is the first part
 of the cleanup on the gadget framework so we have a saner setup
 to add configfs support for v3.8.
 
 We have also some more conversions to the new udc_start/udc_stop
 which makes us closer from dropping the old interfaces.
 
 USB_GADGET_DUALSPEED and USB_GADGET_SUPERSPEED are finally gone,
 thanks to Michal for his awesome work.
 
 Other than that, we have the usual set of miscellaneous changes
 and cleanups involving improvements to debug messages, removal
 of duplicated includes, moving dereference after NULL test,
 making renesas_hsbhs' irq handler Shared, unused code being dropped,
 prevention of sleep-inside-spinlock bugs and a race condition fix
 on udc-core.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJQTh3DAAoJEIaOsuA1yqRE+DIQAIwDRDojG3WLpMq7RJJQclS6
 4Uk1wkim/DxlJsXDvhGd/Qecr6Gk8HSX6hFBg0u2t9g5csl42kTa7PGCN8XSgAC9
 yekqDbjewkdTy5ar6y06LfFObiq3ubL489AW1p0Sk8t7xPZIwYa18nthLcr955SU
 i0enMctQ4wuO2OParBoEECjui2ZGD6WUnlLBJP5dR1ALgefl77d93H5wzxZsjJMX
 zrYsG5MLLz8SyZGgHL7H9e+ydLeLC9zwl2a6PiLMTg1m3E3/wlb+yzjOe/XFubxZ
 VCrRPvDXsTkCohwGA6rovcLZIxMiBDdjwpYzXMKqfwwePs2DrC9BzxX2n7P0hI/J
 QlroU/4mj4/xoc6Z/JMxBo0cK8PUhVfmlNt1Y77K40mbSGjwOUL9r905fPOcW1cL
 5QjWi7b4XVqp+tCcY7epckN4yivkurXPSFjqoG1DV2RAmY8CXH2uDYp7ZJyxn3BT
 7yMxdGfm4IUgvJbET38Bs7mM9EYn7oFBZMfNOJ4yeYYBZ5wCnx5V0bWmyP9SHoDn
 HUmOD8/NQ91Lafx+qDH86TC0Yi9LMRfyLg0jncVyrF4Mq6R7KPgNHFEjDDUw4OxE
 6mskECsORKnQZ7GNe+0/r9Ke8Qy1dmhtQ1mUaKn3GcRwTFveGB4cXJf9yvCFid5Y
 bOPKKoCFpy7W+ncZ4WDX
 =T3kf
 -----END PGP SIGNATURE-----

Merge tag 'gadget-for-v3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next

usb: gadget: patches for v3.7 merge window

This pull request is large but the biggest part is the first part
of the cleanup on the gadget framework so we have a saner setup
to add configfs support for v3.8.

We have also some more conversions to the new udc_start/udc_stop
which makes us closer from dropping the old interfaces.

USB_GADGET_DUALSPEED and USB_GADGET_SUPERSPEED are finally gone,
thanks to Michal for his awesome work.

Other than that, we have the usual set of miscellaneous changes
and cleanups involving improvements to debug messages, removal
of duplicated includes, moving dereference after NULL test,
making renesas_hsbhs' irq handler Shared, unused code being dropped,
prevention of sleep-inside-spinlock bugs and a race condition fix
on udc-core.
2012-09-11 13:39:49 -07:00
Jens Taprogge 6f2c12ae42 Staging: ipack/bridges/tpci200: Store the irq holder in slot_irq.
This way we do no longer need to keep a dangling pointer to struct
ipack_device in tpci200_slot after the device has been removed.

Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org>
Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-11 12:18:12 -07:00
Samuel Iglesias Gonsálvez 4a589c54ee Staging: ipack: delete .remove_device() callback
As the IP module driver takes care of freeing its resources.

Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-11 12:18:12 -07:00
Samuel Iglesias Gonsálvez daf8007c02 Staging: ipack/bridges/tpci200: remove tpci200_slot_unregister
It is not needed as the IP module should free its IRQ using
tpci200_free_irq callback.

Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-11 12:18:12 -07:00
Samuel Iglesias Gonsálvez 9c0d169e8f Staging: ipack/bridges/tpci200: delete ipack_device_unregister calls when exiting
As the ipack_bus_unregister() takes care of unregistering the devices plugged
in the carrier, it is not needed to do it in the carrier driver.

Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-11 12:18:11 -07:00
Samuel Iglesias Gonsálvez bffe0fd021 Staging: ipack: unregister devices when uninstall the carrier device.
Find the IP modules that are plugged to the carrier and unregister them.

Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-11 12:18:11 -07:00
Samuel Iglesias Gonsálvez 690949e7fa Staging: ipack/devices/ipoctal: free the IRQ.
As the IRQ was requested by the driver, it should free it also.

Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-11 12:18:11 -07:00
Samuel Iglesias Gonsálvez ca8481c23c Staging: ipack/devices/ipoctal: change exiting procedure
The ipoctal devices can be uninstalled from the ipack_driver_unregister()
call as the device model calles the bus's .remove() function for each device
registered by the driver and it will execute the .remove() function of the
ipoctal driver.

Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-11 12:18:11 -07:00
Samuel Iglesias Gonsálvez 7273b88ebf Staging: ipack/bridges/tpci200: fix the uninstall the ipack device
Using the call to the ipack_device_unregister() function to avoid the
strange way it was doing, as the device model will take care of calling
the bus's .remove function when a device is being unregistered.

Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-11 12:18:11 -07:00
Samuel Iglesias Gonsálvez b442bf7384 Staging: ipack/bridges/tpci200: increment the reference counter of the pci_dev
As indicated in the documentation of pci_dev_get.

Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-11 12:18:11 -07:00
Samuel Iglesias Gonsálvez 7987812295 Staging: ipack/bridges/tpci200: reorder the iounmap and pci_release_region
Move iounmap and pci_release_region to tpci200_unregister(), as it is the place
where the clean-up of the device is done.

Also, renamed iounmap() to pci_iounmap() as the mapped region was requested
from PCI bus.

Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-11 12:18:11 -07:00