firefly-linux-kernel-4.4.55.git
11 years agoStaging: bcm: Change UINT to unsigned int in InterfaceAdapter.h
Kevin McKinney [Fri, 2 Nov 2012 03:42:18 +0000 (23:42 -0400)]
Staging: bcm: Change UINT to unsigned int in InterfaceAdapter.h

This patch changes UINT to unsigned int
in InterfaceAdapter.h.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoStaging: bcm: Change UCHAR to unsigned char in InterfaceAdapter.h
Kevin McKinney [Fri, 2 Nov 2012 03:42:17 +0000 (23:42 -0400)]
Staging: bcm: Change UCHAR to unsigned char in InterfaceAdapter.h

This patch changes UCHAR to unsigned char
in InterfaceAdapter.h.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoStaging: bcm: Change PCHAR to char * in InterfaceAdapter.h
Kevin McKinney [Fri, 2 Nov 2012 03:42:16 +0000 (23:42 -0400)]
Staging: bcm: Change PCHAR to char * in InterfaceAdapter.h

This patch changes PCHAR to char *
in InterfaceAdapter.h.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoStaging: bcm: Correctly format braces in InterfaceAdapter.h
Kevin McKinney [Fri, 2 Nov 2012 03:42:15 +0000 (23:42 -0400)]
Staging: bcm: Correctly format braces in InterfaceAdapter.h

This patch correctly formats braces
in InterfaceAdapter.h as reported by checkpatch.pl.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoStaging: bcm: Correctly format comments in InterfaceAdapter.h
Kevin McKinney [Fri, 2 Nov 2012 03:42:14 +0000 (23:42 -0400)]
Staging: bcm: Correctly format comments in InterfaceAdapter.h

This patch correctly formats comments
in InterfaceAdapter.h as reported by checkpatch.pl.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoStaging: bcm: Fix all white space issues in InterfaceAdapter.h
Kevin McKinney [Fri, 2 Nov 2012 03:42:13 +0000 (23:42 -0400)]
Staging: bcm: Fix all white space issues in InterfaceAdapter.h

This patch fixes all white space issues
in InterfaceAdapter.h as reported by checkpatch.pl.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging/comedi: Use dev_ printks in ni_tiocmd.c
YAMANE Toshiaki [Fri, 2 Nov 2012 04:55:48 +0000 (13:55 +0900)]
staging/comedi: Use dev_ printks in ni_tiocmd.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_notice(netdev, ... then dev_notice(dev, ... then pr_notice(...  to printk(KERN_NOTICE ...

Signed-off-by: YAMANE Toshiaki <yamanetoshi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: wlan-ng: hfa384x_usb.c: fixed a coding style issue
Kumar Amit Mehta [Fri, 2 Nov 2012 09:19:45 +0000 (02:19 -0700)]
staging: wlan-ng: hfa384x_usb.c: fixed a coding style issue

checkpatch.pl throws error message for the current code. This patch fixes
coding style issue.

Signed-off-by: Kumar Amit Mehta <gmate.amit@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: et131x: Align ring_index and fbr[] indicies
Mark Einon [Thu, 1 Nov 2012 22:56:43 +0000 (22:56 +0000)]
staging: et131x: Align ring_index and fbr[] indicies

A ring_index value of 0 is being used to reference the free buffer ring
fbr[1] and ring_index=1 is used to reference fbr[0]. Avoid this
confusing referencing by swapping the indicies so that ring_index=0
refers to fbr[0] and vice versa.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: et131x: Remove unused buffer[1,2] variables.
Mark Einon [Thu, 1 Nov 2012 22:56:42 +0000 (22:56 +0000)]
staging: et131x: Remove unused buffer[1,2] variables.

The fbr_lookup struct variables buffer1 and buffer2 are only assigned
and never used, so remove them.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: addi_apci_3120: cleanup addi_find_boardinfo()
H Hartley Sweeten [Fri, 2 Nov 2012 00:31:10 +0000 (17:31 -0700)]
staging: comedi: addi_apci_3120: cleanup addi_find_boardinfo()

This driver uses the comedi PCI auto attach mechanism and the comedi
core does not use the boardinfo during the attach.

Now that this driver has the attach separated from addi_common.c we
can remove passing the boardinfo in the comedi_driver and cleanup
the code that finds the boardinfo.

Also, rename addi_find_boardinfo() so it has namespace associated
with 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>
11 years agostaging: comedi: addi_apci_3120: remove COMEDI_SUBD_TTLIO define
H Hartley Sweeten [Fri, 2 Nov 2012 00:30:53 +0000 (17:30 -0700)]
staging: comedi: addi_apci_3120: remove COMEDI_SUBD_TTLIO define

This define 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>
11 years agostaging: comedi: addi_apci_3120: cleanup apci3120_detach()
H Hartley Sweeten [Fri, 2 Nov 2012 00:30:37 +0000 (17:30 -0700)]
staging: comedi: addi_apci_3120: cleanup apci3120_detach()

This driver always tried to allocate the dma buffers so they need to
be free'd when the board is detached.

Remove the unneeded tests for the eeprom chip and bring the code
back an indent.

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>
11 years agostaging: comedi: addi_apci_3120: clarify AO subdevice init
H Hartley Sweeten [Fri, 2 Nov 2012 00:30:17 +0000 (17:30 -0700)]
staging: comedi: addi_apci_3120: clarify AO subdevice init

Only the apci3120 board supports an analog output subdevice. The
boardinfo indicates this by setting the 'i_NbrAoChannel' value.

The range table as well as the function used for the insn_write
operation are fixed for the analog outputs. Remove this information
from the boardinfo and use it directly in the subdevice init.

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>
11 years agostaging: comedi: addi_apci_3120: remove 'b_AvailableConvertUnit'
H Hartley Sweeten [Fri, 2 Nov 2012 00:30:02 +0000 (17:30 -0700)]
staging: comedi: addi_apci_3120: remove 'b_AvailableConvertUnit'

This boardinfo value 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>
11 years agostaging: comedi: addi_apci_3120: remove 'ui_MinDelaytimeNs'
H Hartley Sweeten [Fri, 2 Nov 2012 00:29:46 +0000 (17:29 -0700)]
staging: comedi: addi_apci_3120: remove 'ui_MinDelaytimeNs'

Both boards supported by this driver have the same minimum delay time.
Remove the boardinfo for it and just open code the value in
i_APCI3120_CommandTestAnalogInput().

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>
11 years agostaging: comedi: addi_apci_3120: remove 'ui_MinAcquisitiontimeNs'
H Hartley Sweeten [Fri, 2 Nov 2012 00:29:30 +0000 (17:29 -0700)]
staging: comedi: addi_apci_3120: remove 'ui_MinAcquisitiontimeNs'

Both boards supported by this driver have the same minimum acquisition
time.. Remove the boardinfo for it and just open code the value in
i_APCI3120_CommandTestAnalogInput().

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>
11 years agostaging: comedi: addi_apci_3120: remove 'pr_AiRangelist'
H Hartley Sweeten [Fri, 2 Nov 2012 00:29:13 +0000 (17:29 -0700)]
staging: comedi: addi_apci_3120: remove 'pr_AiRangelist'

Both boards supported by this driver have the same analog input
ranges. Remove the boardinfo for it and just init the subdevice
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>
11 years agostaging: comedi: addi_apci_3120: remove the 'i_IorangeBase*'
H Hartley Sweeten [Fri, 2 Nov 2012 00:28:57 +0000 (17:28 -0700)]
staging: comedi: addi_apci_3120: remove the 'i_IorangeBase*'

These values in the boardinfor were used in the common addi-data
attach code to work out use of the PCI bars. Since this driver
has a localized attach we already know the use of the bars so
this information in the boardinfo is unnecessary.

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>
11 years agostaging: comedi: addi_apci_3120: fix the number of subdevices
H Hartley Sweeten [Fri, 2 Nov 2012 00:28:41 +0000 (17:28 -0700)]
staging: comedi: addi_apci_3120: fix the number of subdevices

The addi-data "common" code always allocates 7 subdevices. This
driver is now separate from that code so we can remove the unused
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>
11 years agostaging: comedi: addi_apci_3120: remove i_ADDI_Reset()
H Hartley Sweeten [Fri, 2 Nov 2012 00:28:24 +0000 (17:28 -0700)]
staging: comedi: addi_apci_3120: remove i_ADDI_Reset()

This driver is now separate from the "common" code used with the
addi-data drivers. There is no need to use i_ADDI_Reset() to call
the correct "reset" function.

Remove the i_ADDI_Reset() function and the 'reset' pointer to the
real function from the boardinfo and just call the function directly
where 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>
11 years agostaging: comedi: addi_apci_3120: clarify AI subdevice init
H Hartley Sweeten [Fri, 2 Nov 2012 00:28:11 +0000 (17:28 -0700)]
staging: comedi: addi_apci_3120: clarify AI subdevice init

The two boards supported by this driver use the same functions for
the comedi operations. Remove this data from the boardinfo to clarify
the subdevice init.

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>
11 years agoThe two boards supported by this driver use the same functions for
H Hartley Sweeten [Fri, 2 Nov 2012 00:27:47 +0000 (17:27 -0700)]
The two boards supported by this driver use the same functions for
the comedi operations. Remove this data from the boardinfo to clarify
the subdevice init.

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>
11 years agostaging: comedi: addi_apci_3120: clarify DO subdevice init
H Hartley Sweeten [Fri, 2 Nov 2012 00:27:33 +0000 (17:27 -0700)]
staging: comedi: addi_apci_3120: clarify DO subdevice init

The two boards supported by this driver use the same functions for
the comedi operations. Remove this data from the boardinfo to clarify
the subdevice init.

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>
11 years agostaging: comedi: addi_apci_3120: clarify timer subdevice init
H Hartley Sweeten [Fri, 2 Nov 2012 00:27:18 +0000 (17:27 -0700)]
staging: comedi: addi_apci_3120: clarify timer subdevice init

The two boards supported by this driver use the same functions for
the comedi operations. Remove this data from the boardinfo to clarify
the subdevice init.

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>
11 years agostaging: comedi: addi_apci_3120: remove test for AI subdevice
H Hartley Sweeten [Fri, 2 Nov 2012 00:27:03 +0000 (17:27 -0700)]
staging: comedi: addi_apci_3120: remove test for AI subdevice

The boards supported by this driver all have analog inputs.
Remove the test 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>
11 years agostaging: comedi: addi_apci_3120: remove test for DI subdevice
H Hartley Sweeten [Fri, 2 Nov 2012 00:26:45 +0000 (17:26 -0700)]
staging: comedi: addi_apci_3120: remove test for DI subdevice

The boards supported by this driver all have digital inputs.
Remove the test 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>
11 years agostaging: comedi: addi_apci_3120: remove test for DO subdevice
H Hartley Sweeten [Fri, 2 Nov 2012 00:26:31 +0000 (17:26 -0700)]
staging: comedi: addi_apci_3120: remove test for DO subdevice

The boards supported by this driver all have digital outputs.
Remove the test 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>
11 years agostaging: comedi: addi_apci_3120: remove test for timer support
H Hartley Sweeten [Fri, 2 Nov 2012 00:26:16 +0000 (17:26 -0700)]
staging: comedi: addi_apci_3120: remove test for timer support

The boards supported by this driver support a timer subdevice.
Remove the tests 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>
11 years agostaging: comedi: addi_apci_3120: remove test for dma support
H Hartley Sweeten [Fri, 2 Nov 2012 00:26:00 +0000 (17:26 -0700)]
staging: comedi: addi_apci_3120: remove test for dma support

The boards supported by this driver support dma. Remove the tests
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>
11 years agostaging: comedi: addi_apci_3120: remove need for s_EeParameters
H Hartley Sweeten [Fri, 2 Nov 2012 00:25:44 +0000 (17:25 -0700)]
staging: comedi: addi_apci_3120: remove need for s_EeParameters

The boards supported by this driver do not have an eeprom. Remove the
need for the devpriv->s_EeParameters values by just using the values
from the boardinfo 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>
11 years agostaging: comedi: addi_apci_3120: board does not have ttl i/o
H Hartley Sweeten [Fri, 2 Nov 2012 00:25:27 +0000 (17:25 -0700)]
staging: comedi: addi_apci_3120: board does not have ttl i/o

The boards supported by this driver do not have ttl i/o. Remove
the unnecessary code to initialize the subdevice.

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>
11 years agostaging: comedi: addi_apci_3120: remove eeprom handling code
H Hartley Sweeten [Fri, 2 Nov 2012 00:25:11 +0000 (17:25 -0700)]
staging: comedi: addi_apci_3120: remove eeprom handling code

The boards supported by this driver do not have an eeprom. Remove
the unnecessary code to handle 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>
11 years agostaging: comedi: addi_common: remove dma setup/free code
H Hartley Sweeten [Fri, 2 Nov 2012 00:24:55 +0000 (17:24 -0700)]
staging: comedi: addi_common: remove dma setup/free code

None of the addi-data drivers that use the "common" code in addi_common.c
support dma. Remove the code that sets up the dma and allocates the buffers
in the attach and the code that frees the buffers in the detach.

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>
11 years agostaging: comedi: addi_apci_3120: separate from addi_common.c
H Hartley Sweeten [Fri, 2 Nov 2012 00:24:38 +0000 (17:24 -0700)]
staging: comedi: addi_apci_3120: separate from addi_common.c

The addi_apci_3120 driver is the only addi-data driver that supports
dma.

Copy the code in addi_common.c to this driver and remove the #include
that caused addi_common.c to be compiled with this driver. This will
allow removing the special handling for allocating and freeing the
dma buffers in the common code.

Rename the attach_pci and detach functions so they have namespace
associated with 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>
11 years agostaging: comedi: addi_apci_3120: remove CONFIG_APCI_3120 define
H Hartley Sweeten [Fri, 2 Nov 2012 00:24:22 +0000 (17:24 -0700)]
staging: comedi: addi_apci_3120: remove CONFIG_APCI_3120 define

Now that the apci3001 and apci3120 boards are merged we can remove
this unnecessary define.

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>
11 years agostaging: comedi: addi_apci_3120: merge in addi_apci_3001 driver
H Hartley Sweeten [Fri, 2 Nov 2012 00:24:06 +0000 (17:24 -0700)]
staging: comedi: addi_apci_3120: merge in addi_apci_3001 driver

The addi_apci_3120 and addi_apci_3001 drivers share the same low-level
board support code (hwdrv_apci3120). Merge the boardinfo and PCI_DEVICE
information from the addi_apci_3001 driver into the addi_apci_3120
driver and delete then delete the addi_apci_3001 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>
11 years agoMerge tag 'iio-for-3.8b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio...
Greg Kroah-Hartman [Fri, 2 Nov 2012 16:27:30 +0000 (09:27 -0700)]
Merge tag 'iio-for-3.8b' of git://git./linux/kernel/git/jic23/iio into staging-next

Second round of new IIO drivers and cleanups for the 3.8 cycle.

Usual mixed bag of cleanups and minor improvements including
one reversion for a patch in the previous series.

* adt7310 and adt7410 drivers merged into one.
* Revert use devm_kcalloc in at91_adc (because it doesn't exist)
* unlocking fix for error path in the ad5449
* isl29018 suspend and resume support.
* improved pseudo floating point parsing for info_mask write
attributes (and hence into write_raw).  Reject some messed up
strings.

11 years agoiio: isl29018: Support suspend and resume.
Bryan Freed [Wed, 24 Oct 2012 23:39:00 +0000 (00:39 +0100)]
iio: isl29018: Support suspend and resume.

The driver leaves the device in power-down state anyway,
so there is nothing to do on suspend.
On resume, we just have to make sure the range and ADC
values are updated in the device since it may have been
powered down in suspend.

Signed-off-by: Bryan Freed <bfreed@chromium.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio: Accept a leading '+' sign when parsing fixed point numbers
Lars-Peter Clausen [Mon, 22 Oct 2012 11:15:00 +0000 (12:15 +0100)]
iio: Accept a leading '+' sign when parsing fixed point numbers

If we encounter a leading '+' sign just skip over it.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio: Reject trailing garbage when parsing fixed point numbers
Lars-Peter Clausen [Mon, 22 Oct 2012 11:15:00 +0000 (12:15 +0100)]
iio: Reject trailing garbage when parsing fixed point numbers

When parsing a fixed point number IIO stops parsing the string once it has
reached the last requested decimal place. This means that the remainder of the
string is silently accepted regardless, of whether it is part of a valid number
or not. This patch modifies the code to scan the whole string and only accept
valid numbers. Since fract_mult is 0 after the last decimal place any digit that
may follows won't affect the result.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio: Do not accept multiple '.' in fixed point numbers
Lars-Peter Clausen [Mon, 22 Oct 2012 11:15:00 +0000 (12:15 +0100)]
iio: Do not accept multiple '.' in fixed point numbers

Currently when parsing a fix-point number we silently skip any additional '.'
found in the string.  E.g. '1.2.3.4' gets parsed as '1.234'. This patch
disallows this and returns an error if more than one '.' is encountered.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agostaging: iio: adc: ad7280a.c: fixed macro coding style
Kumar Amit Mehta [Fri, 2 Nov 2012 07:28:00 +0000 (07:28 +0000)]
staging: iio: adc: ad7280a.c: fixed macro coding style

remove unnecessary semicolon from the macro definition

Signed-off-by: Kumar Amit Mehta <gmate.amit@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
12 years agostaging: comedi: jr3_pci: CodingStyle fixes
Ian Abbott [Thu, 1 Nov 2012 18:34:41 +0000 (18:34 +0000)]
staging: comedi: jr3_pci: CodingStyle fixes

Follow coding style for whitespace, operator placement, use of braces,
etc.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: jr3_pci: update driver description comment
Ian Abbott [Thu, 1 Nov 2012 18:34:40 +0000 (18:34 +0000)]
staging: comedi: jr3_pci: update driver description comment

Reformat the comment used to describe the Comedi driver to use the usual
block comment style.

Update the information reflecting the fact that the driver no longer
supports manual attachment of devices via the `COMEDI_DEVCONFIG` ioctl
and `attach()` method.

Also, in the instructions indicating where to put the firmware file,
mention the expected name of the file since the driver requests the
firmware file by name.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: jr3_pci: remove noisy printk
Ian Abbott [Thu, 1 Nov 2012 18:34:39 +0000 (18:34 +0000)]
staging: comedi: jr3_pci: remove noisy printk

This driver seems to generate a lot of printk output every time the
driver polls the device.  This may have been useful during development
but shouldn't be used in production.  Just get rid of it all.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: jr3_pci: remove devpriv->pci_enabled
Ian Abbott [Thu, 1 Nov 2012 18:34:38 +0000 (18:34 +0000)]
staging: comedi: jr3_pci: remove devpriv->pci_enabled

The `pci_enabled` member of `struct jr3_pci_dev_private` is used to
indicate whether the call to `comedi_pci_enable()` was successful.  The
'detach' routine `jr3_pci_detach()` uses this to decide whether to call
`comedi_pci_disable()`.  The `iobase` member of `struct comedi_device`
is not used by this driver so it can be used for the same purpose.

Remove the `pci_enabled` member and use the spare `dev->iobase` instead.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: jr3_pci: remove devpriv->pci_dev
Ian Abbott [Thu, 1 Nov 2012 18:34:37 +0000 (18:34 +0000)]
staging: comedi: jr3_pci: remove devpriv->pci_dev

The `pci_dev` member of `struct jr3_pci_dev_private` is used to point to
the `struct pci_dev`.  This is redundant as the `struct comedi_device`
already has a pointer to the `struct device` within the `struct pci_dev`
and there is a convenient inline function, `comedi_to_pci_dev(dev)` that
returns a pointer to the `struct pci_dev`.

Remove the redundant `pci_dev` member and use alternate ways to get at
the `struct pci_dev`.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: jr3_pci: rename card variable
Ian Abbott [Thu, 1 Nov 2012 18:34:36 +0000 (18:34 +0000)]
staging: comedi: jr3_pci: rename card variable

The local variable `card` in `jr3_pci_auto_attach()` is used to point to
the PCI device `struct pci_dev`.  Rename it to `pcidev`.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: jr3_pci: use auto_attach method
Ian Abbott [Thu, 1 Nov 2012 18:34:35 +0000 (18:34 +0000)]
staging: comedi: jr3_pci: use auto_attach method

This driver does not need to support manual attachment of supported PCI
devices.  Replace the `attach()` hook (`jr3_pci_attach()`) with an
`auto_attach()` hook (`jr3_pci_auto_attach()`).  This will be called via
`comedi_pci_auto_config()` at PCI probe time.

This driver no longer increments the PCI reference count during
attachment, so remove the call to `pci_dev_put()` when detaching the
device.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: addi_apci_1710: add the missing MODULE_* information
H Hartley Sweeten [Thu, 1 Nov 2012 18:11:14 +0000 (11:11 -0700)]
staging: comedi: addi_apci_1710: add the missing MODULE_* information

This driver is missing the MODULE_* information. Add the standard
comedi info.

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>
12 years agostaging: comedi: addi_apci_1710: remove COMEDI_SUBD_TTLIO define
H Hartley Sweeten [Thu, 1 Nov 2012 18:10:51 +0000 (11:10 -0700)]
staging: comedi: addi_apci_1710: remove COMEDI_SUBD_TTLIO define

This define exists in hwdrv_APCI1710.c, where it's actually used.
Remove the duplicate define.

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>
12 years agostaging: comedi: addi_apci_1710: remove the 'i_IorangeBase*'
H Hartley Sweeten [Thu, 1 Nov 2012 18:10:35 +0000 (11:10 -0700)]
staging: comedi: addi_apci_1710: remove the 'i_IorangeBase*'

These values in the boardinfor were used in the common addi-data
attach code to work out use of the PCI bars. Since this driver
has a localized attach we already know the use of the bars so
this information in the boardinfo is unnecessary.

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>
12 years agostaging: comedi: addi_apci_1710: remove the eeprom parameters
H Hartley Sweeten [Thu, 1 Nov 2012 18:10:19 +0000 (11:10 -0700)]
staging: comedi: addi_apci_1710: remove the eeprom parameters

This driver does not have an eeprom and does not use the data
saved in devpriv->s_EeParameters. Remove the code that initalizes
the eeprom parameters.

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>
12 years agostaging: comedi: addi_apci_1710: remove dma setup/free code
H Hartley Sweeten [Thu, 1 Nov 2012 18:10:02 +0000 (11:10 -0700)]
staging: comedi: addi_apci_1710: remove dma setup/free code

This driver does not use dma. Remove the code that sets up the
dma and allocates the buffers in the attach and the code that
frees the buffers in the detach.

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>
12 years agostaging: comedi: addi_apci_1710: remove eeprom handling code
H Hartley Sweeten [Thu, 1 Nov 2012 18:09:43 +0000 (11:09 -0700)]
staging: comedi: addi_apci_1710: remove eeprom handling code

The apci1710 board does not have an eeprom. Remove the unnecessary
code to handle 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>
12 years agostaging: comedi: addi_apci_1710: remove i_ADDI_Reset
H Hartley Sweeten [Thu, 1 Nov 2012 18:09:27 +0000 (11:09 -0700)]
staging: comedi: addi_apci_1710: remove i_ADDI_Reset

This driver is now separate from the "common" code used with the
addi-data drivers. There is no need to use i_ADDI_Reset() to call
the correct "reset" function.

Remove the i_ADDI_Reset() function and the 'reset' pointer to the
real function from the boardinfo and just call the function directly
where 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>
12 years agostaging: comedi: addi_apci_1710: cleanup addi_find_boardinfo()
H Hartley Sweeten [Thu, 1 Nov 2012 18:09:12 +0000 (11:09 -0700)]
staging: comedi: addi_apci_1710: cleanup addi_find_boardinfo()

This driver uses the comedi PCI auto attach mechanism and the comedi
core does not use the boardinfo during the attach.

Now that this driver has the attach separated from addi_common.c we
can remove passing the boardinfo in the comedi_driver and cleanup
the code that finds the boardinfo.

Also, rename addi_find_boardinfo() so it has namespace associated
with 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>
12 years agostaging: comedi: addi-data: remove special handling for apci1710
H Hartley Sweeten [Thu, 1 Nov 2012 18:08:56 +0000 (11:08 -0700)]
staging: comedi: addi-data: remove special handling for apci1710

Now that the addi_apci_1710 driver is not using addi_common.c we can
remove the CONFIG_APCI_1710 define and all the special handling for
the initialization of it's subdevices.

Also remove the i_ADDIDATA_InsnReadEeprom() function from the
addi_apci_1710 driver. This board does not have an eeprom subdevice
and does not use this function.

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>
12 years agostaging: comedi: addi_apci_1710: separate from addi_common.c
H Hartley Sweeten [Thu, 1 Nov 2012 18:08:37 +0000 (11:08 -0700)]
staging: comedi: addi_apci_1710: separate from addi_common.c

This addi-data driver uses a private function to initialize all
the subdevices during the attach of the board.

Copy the code in addi_common.c to this driver and remove the #include
that caused addi_common.c to be compiled with this driver. This will
allow removing the special handling for the apci1710 board in the
common code.

Rename the attach_pci and detach functions so they have namespace
associated with 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>
12 years agostaging: comedi: gsc_hpdi: update driver description comment
Ian Abbott [Thu, 1 Nov 2012 16:28:34 +0000 (16:28 +0000)]
staging: comedi: gsc_hpdi: update driver description comment

Reformat the comment used to describe the Comedi driver to use the usual
block comment style.

Update the information reflecting the fact that the driver no longer
supports manual attachment of devices via the `COMEDI_DEVCONFIG` ioctl.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: gsc_hpdi: change DEBUG_PRINT()
Ian Abbott [Thu, 1 Nov 2012 16:28:33 +0000 (16:28 +0000)]
staging: comedi: gsc_hpdi: change DEBUG_PRINT()

Change the `DEBUG_PRINT(format, args...)` macro used by this module to
use either `pr_debug()` (if macro `HPDI_DEBUG` is defined) or
`no_printk()` instead of `printk()` or nothing.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: gsc_hpdi: use board name to request resources
Ian Abbott [Thu, 1 Nov 2012 16:28:32 +0000 (16:28 +0000)]
staging: comedi: gsc_hpdi: use board name to request resources

When requesting PCI region resources and IRQ, use the board name as the
resource owner string instead of the driver name.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: gsc_hpdi: make board name pointer const
Ian Abbott [Thu, 1 Nov 2012 16:28:31 +0000 (16:28 +0000)]
staging: comedi: gsc_hpdi: make board name pointer const

Change the type of the `name` member of `struct hpdi_board` from `char
*` to `const char *` as it should not be modifiable.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: gsc_hpdi: remove board(dev) function
Ian Abbott [Thu, 1 Nov 2012 16:28:30 +0000 (16:28 +0000)]
staging: comedi: gsc_hpdi: remove board(dev) function

The `board(dev)` function just casts `dev->board_ptr` to a pointer to
the private data type `struct hpdi_private` and returns it.  It's only
called from one function: `hpdi_auto_attach()`.

Remove `board()` and use a local variable to point to the `struct
hpdi_private` data structure.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: gsc_hpdi: don't store physical base addresses
Ian Abbott [Thu, 1 Nov 2012 16:28:29 +0000 (16:28 +0000)]
staging: comedi: gsc_hpdi: don't store physical base addresses

In `struct hpdi_private`, the `plx9080_phys_iobase` and
`hpdi_phys_iobase` hold the physical memory addresses from the PCI
BARs used by this driver.  The physical addresses are only really needed
when ioremapping the resources when the device is being attached by
`hpdi_auto_attach()`.  A non-zero value of the `hpdi_phys_iobase` is
also used to indicate that a call to `comedi_pci_enable()` was
successful so that `comedi_pci_disable()` should be called when the
device is detached by `hpdi_detach()`.

Remove the `plx9080_phys_iobase` and `hpdi_phys_iobase` members and use
`dev->iobase` as a flag to indicate whether `comedi_pci_disable()` needs
to be called by `hpdi_detach()`.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: gsc_hpdi: remove devpriv->hw_dev
Ian Abbott [Thu, 1 Nov 2012 16:28:28 +0000 (16:28 +0000)]
staging: comedi: gsc_hpdi: remove devpriv->hw_dev

The `hw_dev` member of `struct hpdi_private` is used to point to the
`struct pci_dev`.  This is redundant as the `struct comedi_device`
already has a pointer to the `struct device` within the `struct pci_dev`
and there is a convenient inline function, `comedi_to_pci_dev(dev)` that
returns a pointer to the `struct pci_dev`.

Remove the redundant `hw_dev` member and use alternate ways to get at
the `struct pci_dev`.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: gsc_hpdi: use auto_attach method
Ian Abbott [Thu, 1 Nov 2012 16:28:27 +0000 (16:28 +0000)]
staging: comedi: gsc_hpdi: use auto_attach method

This driver does not need to support manual attachment of supported PCI
devices.  Replace the `attach()` hook (`hpdi_attach()`) with an
`auto_attach()` hook (`hpdi_auto_attach()`).  This will be called via
`comedi_pci_auto_config()` at PCI probe time.

This driver no longer increments the PCI reference during attachment, so
remove the call to `pci_dev_put()` when detaching the device.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: csr: csr_wifi_nme_task.h: remove function prototypes
Devendra Naga [Thu, 1 Nov 2012 06:24:43 +0000 (02:24 -0400)]
staging: csr: csr_wifi_nme_task.h: remove function prototypes

there are function definitions missing for these prototypes, so
remove all 3 function protos.

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: csr: csr_wifi_nme_ap_lib.h: remove the function prototypes
Devendra Naga [Thu, 1 Nov 2012 06:24:42 +0000 (02:24 -0400)]
staging: csr: csr_wifi_nme_ap_lib.h: remove the function prototypes

these function prototypes are missing the function definition,
remove them all.

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: csr: csr_wifi_nme_lib.h: remove function prototypes
Devendra Naga [Thu, 1 Nov 2012 06:24:41 +0000 (02:24 -0400)]
staging: csr: csr_wifi_nme_lib.h: remove function prototypes

the function definitions are missing for these prototypes, so remove all
these.

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: csr: sme_blocking.c: add missing check for return of sme_wait_for_reply
Devendra Naga [Thu, 1 Nov 2012 06:24:40 +0000 (02:24 -0400)]
staging: csr: sme_blocking.c: add missing check for return of sme_wait_for_reply

sme_ap_config misses a check of the return of the sme_wait_for_reply
as all other functions do here, for the return of sme_wait_for_reply
add the check and fail if it returns other than 0.

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: csr: sme_blocking.c: remove braces around single statement blocks
Devendra Naga [Thu, 1 Nov 2012 06:24:39 +0000 (02:24 -0400)]
staging: csr: sme_blocking.c: remove braces around single statement blocks

remove the braces around single statement if blocks

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: csr: sme_blocking.c: replace spaces with the tabs in sme_mgt_tspec
Devendra Naga [Thu, 1 Nov 2012 06:24:38 +0000 (02:24 -0400)]
staging: csr: sme_blocking.c: replace spaces with the tabs in sme_mgt_tspec

replace spaces at start of line with tabs in sme_mgt_tspec

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: csr: sme_blocking.c: replace spaces with tabs
Devendra Naga [Thu, 1 Nov 2012 06:24:37 +0000 (02:24 -0400)]
staging: csr: sme_blocking.c: replace spaces with tabs

replace spaces at the beginning of the line with tabs in sme_mgt_packet_filter_set

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: csr: inet.c: replaces spaces with tabs
Devendra Naga [Thu, 1 Nov 2012 06:24:36 +0000 (02:24 -0400)]
staging: csr: inet.c: replaces spaces with tabs

replace spaces with tabs at the start of line

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: csr: inet.c: single statement if blocks doesn't need braces
Devendra Naga [Thu, 1 Nov 2012 06:24:35 +0000 (02:24 -0400)]
staging: csr: inet.c: single statement if blocks doesn't need braces

remove braces to single statement if blocks

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: skel: do auto-attachment of PCI devices
Ian Abbott [Thu, 1 Nov 2012 14:02:20 +0000 (14:02 +0000)]
staging: comedi: skel: do auto-attachment of PCI devices

This driver is an example of how to write a Comedi driver and includes
some code for handling PCI devices, but not very much.  It calls
`comedi_pci_auto_config()` at PCI probe time.  That normally expects to
call the comedi driver's `auto_attach()` hook (or the deprecated
`attach_pci()` hook), but will fall back to using the `attach()` hook
that should only be used for attaching devices "manually" via the
`COMEDI_DEVCONFIG` ioctl.

Add an `auto_attach()` hook (`skel_auto_attach()`) to handle
auto-attachment of supported PCI devices.  Add comments to the
`attach()` hook (`skel_attach()`) to indicate that it shouldn't
generally allow PCI devices to be attached that way (and probably isn't
needed at all for PCI-only Comedi drivers).  Add code to the `detach()`
hook (`skel_detach()`) to disable PCI devices enabled by the
`auto_attach()` hook.

`skel_auto_attach()` calls new function `skel_find_pci_board()` to find
a matching element in `skel_boards[]`.  PCI device ID information has
been added to `skel_boards[]` to give the function something to look
for.

Remove the `pci_dev` member of `struct skel_private` as drivers now use
the `hw_dev` member of `struct comedi_device` to get at the PCI device.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: skel: move skel_pci_table
Ian Abbott [Thu, 1 Nov 2012 14:02:19 +0000 (14:02 +0000)]
staging: comedi: skel: move skel_pci_table

Move `skel_pci_table[]` closer to `skel_pci_table` so it falls within
the same `#ifdef`.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: skel: remove remaining forward declaration
Ian Abbott [Thu, 1 Nov 2012 14:02:18 +0000 (14:02 +0000)]
staging: comedi: skel: remove remaining forward declaration

Move `skel_ns_to_timer()` up so it's forward declaration can be removed.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: skel: remove most forward declarations
Ian Abbott [Thu, 1 Nov 2012 14:02:17 +0000 (14:02 +0000)]
staging: comedi: skel: remove most forward declarations

Move `skel_attach()`, `skel_detach()` and `skel_driver` down the file so
that a bunch of forward declarations can be removed.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: skel: use module_comedi_pci_driver()
Ian Abbott [Thu, 1 Nov 2012 14:02:16 +0000 (14:02 +0000)]
staging: comedi: skel: use module_comedi_pci_driver()

Use the `module_comedi_pci_driver()` macro to register the module as a
comedi PCI driver instead of adding the boiler-plate code in full.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: skel: remove driver_ prefix
Ian Abbott [Thu, 1 Nov 2012 14:02:15 +0000 (14:02 +0000)]
staging: comedi: skel: remove driver_ prefix

Remove the `driver_` prefix from variable and function names.  Rename
`driver_skel` to `skel_driver`.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: skel: replace pr_...() with dev_...()
Ian Abbott [Thu, 1 Nov 2012 14:02:14 +0000 (14:02 +0000)]
staging: comedi: skel: replace pr_...() with dev_...()

Use the dev_info() etc. instead of pr_info() etc.  Remove a couple of
them that seemed a bit pointless.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: skel: remove thisboard macro
Ian Abbott [Thu, 1 Nov 2012 14:02:13 +0000 (14:02 +0000)]
staging: comedi: skel: remove thisboard macro

This driver's `thisboard` macro relies on a local variable having a
specific name.  Replace it with a local variable of the same name in the
functions that use it.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging/comedi: Use dev_ printks in drivers/ni_mio_cs.c
YAMANE Toshiaki [Thu, 1 Nov 2012 02:39:18 +0000 (11:39 +0900)]
staging/comedi: Use dev_ printks in drivers/ni_mio_cs.c

fixed below checkpatch warnings.
- WARNING: printk() should include KERN_ facility level

Signed-off-by: YAMANE Toshiaki <yamanetoshi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging/comedi: fix the initialize statics issue in drivers/ni_mio_cs.c
YAMANE Toshiaki [Thu, 1 Nov 2012 02:39:03 +0000 (11:39 +0900)]
staging/comedi: fix the initialize statics issue in drivers/ni_mio_cs.c

fixed below checkpatch error.
- ERROR: do not initialise statics to 0 or NULL

Signed-off-by: YAMANE Toshiaki <yamanetoshi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging/comedi: fix the spaces issue at the start of line in drivers/ni_mio_cs.c
YAMANE Toshiaki [Thu, 1 Nov 2012 02:37:46 +0000 (11:37 +0900)]
staging/comedi: fix the spaces issue at the start of line in drivers/ni_mio_cs.c

fixed below checkpatch warnings.
- WARNING: please, no spaces at the start of a line

Signed-off-by: YAMANE Toshiaki <yamanetoshi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: silicom: bypasslib: remove unused including <linux/version.h>
Wei Yongjun [Thu, 1 Nov 2012 05:47:19 +0000 (13:47 +0800)]
Staging: silicom: bypasslib: remove unused including <linux/version.h>

Remove including <linux/version.h> that don't need it.

dpatch engine is used to auto generate this patch.
(https://github.com/weiyj/dpatch)

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: silicom: remove unused including <linux/version.h>
Wei Yongjun [Thu, 1 Nov 2012 05:47:45 +0000 (13:47 +0800)]
Staging: silicom: remove unused including <linux/version.h>

Remove including <linux/version.h> that don't need it.

dpatch engine is used to auto generate this patch.
(https://github.com/weiyj/dpatch)

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: addi-data: remove ERROR and SUCCESS defines
H Hartley Sweeten [Wed, 31 Oct 2012 23:59:30 +0000 (16:59 -0700)]
staging: comedi: addi-data: remove ERROR and SUCCESS defines

These are not used. 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>
12 years agostaging: comedi: addi-data: remove duplicate ADDIDATA_{ENABLE,DISABLE} defines
H Hartley Sweeten [Wed, 31 Oct 2012 23:59:15 +0000 (16:59 -0700)]
staging: comedi: addi-data: remove duplicate ADDIDATA_{ENABLE,DISABLE} defines

These are defined in addi_common.h, the hwdrv_* files do not need
to redefined 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>
12 years agostaging: comedi: addi-data: remove duplicate #include's
H Hartley Sweeten [Wed, 31 Oct 2012 23:58:56 +0000 (16:58 -0700)]
staging: comedi: addi-data: remove duplicate #include's

All these #include's have already been handled.

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>
12 years agostaging: comedi: addi-data: remove addi_amcc_s5933.h
H Hartley Sweeten [Wed, 31 Oct 2012 23:58:40 +0000 (16:58 -0700)]
staging: comedi: addi-data: remove addi_amcc_s5933.h

Now that the PCI bus walking has been removed from the addi-data
drivers, the only differenced between addi_amcc_s9533.h and the
standard comedi amcc_s5933.h is the additional defines for the
apci3120 "ADDON RELATED ADDITIONS". Move those defines to
hwdrv_apci3120.c.

Modify all the addi-data drivers to then include the standard
comedi amcc_s5933.h header and delete the duplicate in addi-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>
12 years agostaging: comedi: addi-data: remove 'b_ValidDriver' from the private data
H Hartley Sweeten [Wed, 31 Oct 2012 23:58:25 +0000 (16:58 -0700)]
staging: comedi: addi-data: remove 'b_ValidDriver' from the private data

This variable is only used in the detach of the addi-data boards to
indicate that the attach of the board was successful and that the reset
function can be called. We can use the dev->iobase variable to indicate
this instead. Once this variable is set the attach always completes.

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>
12 years agostaging: comedi: addi-data: remove 'allocated' from the private data
H Hartley Sweeten [Wed, 31 Oct 2012 23:58:09 +0000 (16:58 -0700)]
staging: comedi: addi-data: remove 'allocated' from the private data

This variable is only used as a flag to indicate that the pci device
has been enabled. Use the comedi_device 'iobase' variable to indicate
this instead. This is how it's normally handled in the comedi pci
drivers.

Make the call to comedi_pci_disabled() in i_ADDI_Detach() common
and move it to the end of the function. Both the if and else case
require 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>
12 years agostaging: comedi: addi-data: cleanup reading of the PCI bars
H Hartley Sweeten [Wed, 31 Oct 2012 23:57:52 +0000 (16:57 -0700)]
staging: comedi: addi-data: cleanup reading of the PCI bars

Read the PCI bars directly into the private data variables and
remove all the local variables used for them in addi_attach_pci().

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>
12 years agostaging: comedi: addi-data: use attach_pci callback
H Hartley Sweeten [Wed, 31 Oct 2012 23:57:37 +0000 (16:57 -0700)]
staging: comedi: addi-data: use attach_pci callback

Use the comedi pci auto config mechanism to attach the addi-data
drivers. This allows removing all the PCI bus walking code.

Add a function, addi_find_boardinfo(), to find the driver specific
boardinfo. Since this function is currently in the common code we
have to use the pointer to the boardinfo that is stored in the
comedi_driver 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>
12 years agostaging: comedi: addi-data: remove i_pci_card_free()
H Hartley Sweeten [Wed, 31 Oct 2012 23:57:22 +0000 (16:57 -0700)]
staging: comedi: addi-data: remove i_pci_card_free()

This function calls comedi_pci_disable() to disable the pci
device when detached. It's only called from i_ADDI_Detach().
Move the code there and delete the function.

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>
12 years agostaging: comedi: addi-data: remove attach option to disable dma
H Hartley Sweeten [Wed, 31 Oct 2012 23:57:07 +0000 (16:57 -0700)]
staging: comedi: addi-data: remove attach option to disable dma

This pci driver currently uses the comedi legacy attach mechanism
which allows the user to pass configuration options to the driver
when it is attached to the comedi subsystem. The use of these
configuration options is preventing the conversion of the addi-data
drivers to the comedi auto attach mechanism.

For the addi-data drivers, option[2] is used to enable/disable dma.
The default (0) action is to enable dma is the driver supports it.

Remove this configuration option and just enable dma if it is
supported.

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>