staging: comedi: addi_eeprom: make v_EepromWaitBusy() static
This function is only used in this file. Move it to remove the need
for the forward declaration.
Also, remove the comment about an error in the data book. It's not
really an error just someones misunderstanding about doing a byte
read of a dword register.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: addi-data: remove the addi-data #include ifdef'ery
Move the addi-data specific #include's from addi_common.h to the
individual driver files.
The apci-1710, apci-3200, and apci-3300 drivers still have floating
point code in them and are currently disabled in the Kconfig and
Makefile. For now, move the fpu_{begin,end} functions from addi_common.c
to the main driver file so we can get rid of the #ifdef'ery.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: addi-data: move the main #include's to the drivers
The addi-data drivers are all built by the main driver files including
addi-data/addi_common.c. That file then includes other files depending
on what driver is being compiled. This is makes the code quite messy
and hard to follow.
Start cleaning it up by removing the unneeded #include's in addi_common.c
and moving the some of the comedi #include's into the individual driver
files.
This is the first step in getting rid of the #ifdef'ery in addi_common.c.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: rtd520: remove 'aiMaxGain' from boardinfo
This value is only used in the attach to determine which range
table the analog input subdevice uses. Remove this variable and
just pass the range table pointer in 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>
staging: comedi: rtd520: remove 'aiChans' and 'aiBits' from boardinfo
All the boards supported by this driver have the same number of analog
input channels and resolution. Remove the boardinfo for this and just
open-code the values in 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>
These are all development debug messages. A lot of them are in
the interrupt routine and probably shouldn't be there. Some of
the others are actually commented out.
Just remove all of 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>
Kevin McKinney [Tue, 30 Oct 2012 03:08:54 +0000 (23:08 -0400)]
Staging: bcm: Remove typedef for stLocalSFChangeIndicationAlt and call directly.
This patch removes typedef for
stLocalSFChangeIndicationAlt, changes the
name of the struct to bcm_change_indication,
and removes a comment. In addition, any
calls to typedef stLocalSFChangeIndicationAlt
are changed to call the struct directly.
Signed-off-by: Kevin McKinney <klmckinney1@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
YAMANE Toshiaki [Mon, 29 Oct 2012 11:05:57 +0000 (20:05 +0900)]
staging/gdm72xx: Use dev_ printks in usb_boot.c
fixed below checkpatch warnings.
- WARNING: Prefer netdev_err(netdev, ... then dev_err(dev, ... then pr_err(... to printk(KERN_ERR ...
- WARNING: Prefer netdev_info(netdev, ... then dev_info(dev, ... then pr_info(... to printk(KERN_INFO ...
YAMANE Toshiaki [Mon, 29 Oct 2012 11:05:43 +0000 (20:05 +0900)]
staging/gdm72xx: Use dev_ printks in gdm_usb.c
fixed below checkpatch warnings.
- WARNING: Prefer netdev_err(netdev, ... then dev_err(dev, ... then pr_err(... to printk(KERN_ERR ...
- WARNING: Prefer netdev_info(netdev, ... then dev_info(dev, ... then pr_info(... to printk(KERN_INFO ...
YAMANE Toshiaki [Mon, 29 Oct 2012 11:05:30 +0000 (20:05 +0900)]
staging/gdm72xx: Use dev_ printks in sdio_boot.c
fixed below checkpatch warnings.
- WARNING: Prefer netdev_err(netdev, ... then dev_err(dev, ... then pr_err(... to printk(KERN_ERR ...
- WARNING: Prefer netdev_info(netdev, ... then dev_info(dev, ... then pr_info(... to printk(KERN_INFO ...
YAMANE Toshiaki [Mon, 29 Oct 2012 11:05:16 +0000 (20:05 +0900)]
staging/gdm72xx: Use dev_ printks in gdm_sdio.c
fixed below checkpatch warnings.
- WARNING: Prefer netdev_err(netdev, ... then dev_err(dev, ... then pr_err(... to printk(KERN_ERR ...
- WARNING: Prefer netdev_info(netdev, ... then dev_info(dev, ... then pr_info(... to printk(KERN_INFO ...
YAMANE Toshiaki [Mon, 29 Oct 2012 11:04:42 +0000 (20:04 +0900)]
staging/gdm72xx: Use netdev_ or pr_ printks in gdm_qos.c
fixed below checkpatch warnings.
- WARNING: Prefer netdev_err(netdev, ... then dev_err(dev, ... then pr_err(... to printk(KERN_ERR ...
- WARNING: Prefer netdev_info(netdev, ... then dev_info(dev, ... then pr_info(... to printk(KERN_INFO ...
- WARNING: Prefer netdev_dbg(netdev, ... then dev_dbg(dev, ... then pr_debug(... to printk(KERN_DEBUG ...
YAMANE Toshiaki [Mon, 29 Oct 2012 11:03:47 +0000 (20:03 +0900)]
staging/gdm72xx: Use netdev_ or pr_ printks in gdm_wimax.c
fixed below checkpatch warnings.
- WARNING: Prefer netdev_err(netdev, ... then dev_err(dev, ... then pr_err(... to printk(KERN_ERR ...
- WARNING: Prefer netdev_emerg(netdev, ... then dev_emerg(dev, ... then pr_emerg(... to printk(KERN_EMERG ...
- WARNING: Prefer netdev_info(netdev, ... then dev_info(dev, ... then pr_info(... to printk(KERN_INFO ...
Ian Abbott [Sat, 27 Oct 2012 20:44:16 +0000 (21:44 +0100)]
staging: comedi: add comedi to usb interface helper
Add inline helper function `comedi_to_usb_interface()` to get the
pointer to `struct usb_interface` associated with the comedi device.
This pointer is set by the call to `comedi_usb_auto_config()`.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Sat, 27 Oct 2012 20:44:15 +0000 (21:44 +0100)]
staging: comedi: support auto_attach() for PCI and USB
Allow `comedi_pci_auto_config()` and `comedi_usb_auto_config()` to use
the new `auto_attach()` hook in the low-level driver's `struct
comedi_driver` if it is set and the `attach_pci()` or `attach_usb()`
hook (for PCI or USB respectively) is `NULL`.
Eventually, the `auto_attach()` hook will be the only way of
auto-configuring hardware devices as comedi devices and the bus-type
specific `attach_pci()` and `attach_usb()` hooks will be removed.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Add (and export) generic auto-config function `comedi_auto_config()` to
allow hardware devices on arbitrary bus types (e.g. platform devices,
spi devices, etc.) to be auto-configured as comedi devices. This uses a
new `auto_attach()` hook in the `struct comedi_driver`. This new hook
will eventually replace the bus-specific `attach_pci()` and
`attach_usb()` hooks in the low-level comedi drivers.
When the `auto_attach()` hook is called in the low-level driver, the
`hw_dev` member of the `struct comedi_device` will have already been set
to the hardware device passed to `comedi_auto_config()`. The low-level
driver can convert this to some bus-device wrapper structure pointer,
possibly with the help of the `context` parameter that is passed
unchanged from the `comedi_auto_config()` call.
Also export the existing `comedi_auto_unconfig()` function as the
matching call to `comedi_auto_config()`.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Sat, 27 Oct 2012 20:44:13 +0000 (21:44 +0100)]
staging: comedi: rename old auto-config functions
Rename `comedi_auto_config()` to `comedi_old_auto_config()`, and
`comedi_auto_config_wrapper()` to `comedi_old_auto_config_wrapper()`.
These functions are deprecated and will be removed once the few
remaining low-level comedi drivers that use them have been updated.
(The low-level drivers in question support auto-configuration of
detected comedi devices, but still use the `attach()` hook in their
`struct comedi_driver` to do so.)
This internal change frees up the name `comedi_auto_config` for future
use.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Sat, 27 Oct 2012 20:44:12 +0000 (21:44 +0100)]
staging: comedi: change type of auto-config context
Change the type of the context parameter passed to
`comedi_auto_config_helper()` from `void *` to `unsigned long`. It's
currently just an internal change and all current internal usages pass
pointers in the context, but future uses of this function may pass
integer values or pointer values at the whim of a lower-level comedi
driver and the `unsigned long` type expresses this better as it is
commonly used in the Linux kernel to hold such values.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Peter Huewe [Mon, 29 Oct 2012 21:33:20 +0000 (22:33 +0100)]
staging/rtl8187se: Fix compile warning 'is static but declared in .. which is not static'
When compiling this driver I get these compile warnings:
ieee80211.h:1227:2: warning: '______f' is static but declared in inline
function 'ieee80211_is_empty_essid' which is not static [enabled by
default]
ieee80211.h:1233:3: warning: '______f' is static but declared in inline
function 'ieee80211_is_empty_essid' which is not static [enabled by
default]
ieee80211.h:1248:2: warning: '______f' is static but declared in inline
function 'ieee80211_is_valid_mode' which is not static [enabled by
default]
ieee80211.h:1253:2: warning: '______f' is static but declared in inline
function 'ieee80211_is_valid_mode' which is not static [enabled by
default]
ieee80211.h:1258:2: warning: '______f' is static but declared in inline
function 'ieee80211_is_valid_mode' which is not static [enabled by
default]
ieee80211.h:1272:3: warning: '______f' is static but declared in inline
function 'ieee80211_get_hdrlen' which is not static [enabled by default]
ieee80211.h:1274:3: warning: '______f' is static but declared in inline
function 'ieee80211_get_hdrlen' which is not static [enabled by default]
These functions are declared as extern inline but not 'overloaded'
anywhere so we can declare them static inline and get rid of the
warnings.
Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Peter Huewe [Mon, 29 Oct 2012 21:18:05 +0000 (22:18 +0100)]
staging/rtl8192e: Fix compile warning 'is static but declared in .. which is not static'
When compiling this driver I get these compile warnings:
rtllib.h:2573:2: warning: '______f' is static but declared in inline
function 'rtllib_is_empty_essid' which is not static [enabled by
default]
rtllib.h:2579:3: warning: '______f' is static but declared in inline
function 'rtllib_is_empty_essid' which is not static [enabled by
default]
rtllib.h:2594:2: warning: '______f' is static but declared in inline
function 'rtllib_is_valid_mode' which is not static [enabled by default]
rtllib.h:2599:2: warning: '______f' is static but declared in inline
function 'rtllib_is_valid_mode' which is not static [enabled by default]
rtllib.h:2604:2: warning: '______f' is static but declared in inline
function 'rtllib_is_valid_mode' which is not static [enabled by default]
rtllib.h:2618:3: warning: '______f' is static but declared in inline
function 'rtllib_get_hdrlen' which is not static [enabled by default]
rtllib.h:2620:3: warning: '______f' is static but declared in inline
function 'rtllib_get_hdrlen' which is not static [enabled by default]
These functions are declared as extern inline but not 'overloaded'
anywhere so we can declare them static inline and get rid of the
warnings.
Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Devendra Naga [Sat, 27 Oct 2012 17:23:47 +0000 (13:23 -0400)]
staging: sep: return -EFAULT on copy_from_user failure
copy_from_user() returns the number of bytes remaining to be copied,
and it fails if user pointer is invalid, so return -EFAULT
so that the user gets a FAULT.