Commit graph

323885 commits

Author SHA1 Message Date
Srinivas Pandruvada f07b60b7c3 iio: hid-sensors: Prevent crash during hot-unplug
When hid sensor hub is unplugged, there is a crash in
iio_device_unregister_trigger_consumer.
In a typical IIO driver when remove is called, it will unregister and free
trigger and then it will call iio_device_free.
The function iio_trigger_free() will free the allocated memory for trigger.
If this trigger was assigned to iio_dev->trig, then it should be set to NULL.
Othewise when iio_device_free() is called later, it finally calls
iio_device_unregsister_trigger(), which checks for
       if (indio_dev->trig)
                iio_trigger_put(indio_dev->trig);
If indio_dev->trig is not set to NULL, it calls iio_trigger_put on a bad
pointer causing crash.
This scenerio can happen in any driver, which is storing trigger pointer in
iio_dev structure and following current procedure during remove.

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2012-09-22 10:07:34 +01:00
Dan Carpenter 24db0d75d3 HID: sensors: remove some unneeded checks
"report_id" is unsigned so it's never less than zero.  These checks can
be removed without any problem.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2012-09-18 21:50:44 +01:00
Dan Carpenter 2b7c4b8e3e HID: sensors: use GFP_ATOMIC under spinlock
We're holding a spinlock here so we can't call kmalloc() with
GFP_KERNEL.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2012-09-18 21:50:43 +01:00
Stephen Rothwell f45c69b113 HID: sensors: fix up for mfd_add_devices() API change
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2012-09-18 21:50:23 +01: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 87c5b10fd9 iio: ad7476: Add support for the ad7091r
Add support for the ad7091r 12 bit ADC to the ad7476 driver. Although the
ad7091r is not really related to any of the other devices supported by this
driver, luckily for us there are not so many ways (which are not totally insane)
how sampling a single channel ADC via SPI can be implemented and support for the
ad7091r can be added to the driver with just a few adjustments.

The ad7091r requires an external "conversion start" pulse to start a sample
conversion. After the conversion has finished the result can be read via SPI. We
depend on a IIO trigger to generate this signal, as a result only sampling in
buffered mode and not in manual mode is available.

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 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
Lars-Peter Clausen 48e44ce0f8 iio:inkern: Add function to read the processed value
Add a function to read a processed value from a channel. The function will first
attempt to read the IIO_CHAN_INFO_PROCESSED attribute. If that fails it will
read the IIO_CHAN_INFO_RAW attribute and convert the result from a raw value to
a processed value.

The patch also introduces a function to convert raw value to a processed value
and exports it, in case a user needs or wants to do the conversion by itself.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2012-09-17 21:48:51 +01:00
Lars-Peter Clausen 45f010baa0 iio: consumer.h: Fix kernel doc incosistency
For the iio_read_channel_raw and iio_read_channel_scale the kerneldoc comment
refers to an argument called "channel", while the argument is called "chan" in
the function signature. This leads to the following warnings from kerneldoc:

	Warning(include/linux/iio/consumer.h:71): No description found for parameter 'chan'
	Warning(include/linux/iio/consumer.h:71): Excess function parameter 'channel' description in 'iio_read_channel_raw'
	Warning(include/linux/iio/consumer.h:109): No description found for parameter 'chan'
	Warning(include/linux/iio/consumer.h:109): Excess function parameter 'channel' description in 'iio_read_channel_scale'

This patch fixes the warnings by naming them consistently.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2012-09-17 21:41:26 +01:00
Lars-Peter Clausen c499d029d8 iio:dac: Add ad5755 driver
This patch adds support for the AD5755, AD5755-1, AD5757, AD5735, AD5737 16 and
14 bit quad-channel DACs. The AD5757/AD5737 only have current outputs, but
for the AD5755/AD5757 each of the outputs can be configured to either be a
voltage or a current output. We only allow to configure this at device probe
time since usually this needs to match the external circuitry and should not be
changed on the fly.

A few trivial formatting changes on merge.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2012-09-17 20:55:54 +01:00
Kim, Milo b2b79ffa40 iio: inkern: add error case in iio_channel_get()
The datasheet name is defined in the IIO driver.
 On the other hand, the adc_channel_label is configured in
 the platform side.
 If the datasheet name is not matched with any adc_channel_label,
 the iio_channel_get() should be returned as error for preventing
 invalid channel data access.

 This can be handled either way.
 (a) checking null data when using it : in the xxx_read_raw()
 or
 (b) error returns when the channel is requested : this patch

 The IIO consumer can't use the channel with invalid channel spec.
 Therefore case (b) is more reasonable.

Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2012-09-17 19:16:42 +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