Jonathan Cameron [Sun, 22 Jun 2014 19:59:00 +0000 (20:59 +0100)]
iio: imu: adis16400 switch sampling frequency attr to core support.
By using the info_mask_shared_by_all element of the channel spec, access
to the sampling frequency becomes available to in kernel users of the
driver. It also shortens and simplifies the code.
Jonathan Cameron [Sun, 22 Jun 2014 19:59:00 +0000 (20:59 +0100)]
iio: adis: Switch sampling frequency attr to core support.
By using the info_mask_shared_by_all element of the channel spec, acce
to the sampling frequency becomes available to in kernel users of the
driver. It also shortens and simplifies the code.
This particular conversion was made more complicated by the shared library
and the fact that a number of the drivers do not actually have support for
setting or reading the sampling frequency. The hardware, in those cases
investigated supports it. It's just never been implemented.
Jonathan Cameron [Sun, 22 Jun 2014 19:59:00 +0000 (20:59 +0100)]
iio: gyro: itg3200 switch sampling frequency attr to core support.
By using the info_mask_shared_by_all element of the channel spec, access
to the sampling frequency becomes available to in kernel users of the
driver. It also shortens and simplifies the code a little.
Signed-off-by: Jonathan Cameron <jic23@kernel.org> Reviewed-by: Hartmut Knaack <knaack.h@gmx.de> Cc: Manuel Stahl <manuel.stahl@iis.fraunhofer.de> Cc: Thorsten Nowak <thorsten.nowak@iis.fraunhofer.de> Cc: Christian Strobel <christian.strobel@iis.fraunhofer.de>
Sachin Kamat [Fri, 7 Mar 2014 07:44:00 +0000 (07:44 +0000)]
iio: hid-sensors: Fix compilation warning
Move the 'static' keyword to beginning of definition to silence the
following compilation warning:
drivers/iio/common/hid-sensors/hid-sensor-attributes.c:34:1: warning: ‘static’ is not at beginning of declaration [-Wold-style-declaration]
Remove the driver as it hasn't been cleaned up and it doesn't look like
anyone is going to work on it anymore. This can be reverted if someone
wants to work to fix the remaining issues the driver has.
Remove the driver as it hasn't been cleaned up and it doesn't look like
anyone is going to work on it anymore. This can be reverted if someone
wants to work to fix the remaining issues the driver has.
Remove the driver as it hasn't been cleaned up and it doesn't look like
anyone is going to work on it anymore. This can be reverted if someone
wants to work to fix the remaining issues the driver has.
Ben Chan [Sat, 28 Jun 2014 06:17:26 +0000 (23:17 -0700)]
staging: gdm72xx: use int instead of u32 whenever makes sense
This patch addresses the following issues:
- Use int instead of u32 whenever makes sense
- Turn extract_qos_list() in gdm_qos.c, which previously always returned
0, into a void function.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Reported-by: Michalis Pappas <mpappas@fastmail.fm> Signed-off-by: Ben Chan <benchan@chromium.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ben Chan [Sat, 28 Jun 2014 06:17:24 +0000 (23:17 -0700)]
staging: gdm72xx: return -EINVAL instead of BUG_ON for invalid data length
This patch changes gdm_usb_send() and gdm_sdio_send() to return -EINVAL instead
of calling BUG_ON if an invalid data length is passed to the functions.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Reported-by: Michalis Pappas <mpappas@fastmail.fm> Signed-off-by: Ben Chan <benchan@chromium.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Guillaume Morin [Sat, 28 Jun 2014 16:16:40 +0000 (18:16 +0200)]
staging: dgnc_driver.c: code style fixes
Simple code style fixes:
- "if(" -> "if ("
- "switch(" -> "switch ("
- move one open brace to the line of the declaration instead of
its own line
- remove trailing whitespace
- this fixes few sparse warnings for missing static in functions:
drivers/staging/lustre/lnet/lnet/api-ni.c:63:6: warning: symbol 'lnet_get_routes' was not declared. Should it be static?
drivers/staging/lustre/lnet/lnet/api-ni.c:69:6: warning: symbol 'lnet_get_networks' was not declared. Should it be static?
drivers/staging/lustre/lnet/lnet/api-ni.c:93:1: warning: symbol 'lnet_init_locks' was not declared. Should it be static?
drivers/staging/lustre/lnet/lnet/api-ni.c:102:1: warning: symbol 'lnet_fini_locks' was not declared. Should it be static?
drivers/staging/lustre/lnet/lnet/api-ni.c:180:6: warning: symbol 'lnet_assert_wire_constants' was not declared. Should it be static?
drivers/staging/lustre/lnet/lnet/api-ni.c:273:7: warning: symbol 'lnet_find_lnd_by_type' was not declared. Should it be static?
drivers/staging/lustre/lnet/lnet/api-ni.c:419:1: warning: symbol 'lnet_create_interface_cookie' was not declared. Should it be static?
drivers/staging/lustre/lnet/lnet/api-ni.c:450:1: warning: symbol 'lnet_res_container_cleanup' was not declared. Should it be static?
drivers/staging/lustre/lnet/lnet/api-ni.c:494:1: warning: symbol 'lnet_res_container_setup' was not declared. Should it be static?
drivers/staging/lustre/lnet/lnet/api-ni.c:612:1: warning: symbol 'lnet_prepare' was not declared. Should it be static?
drivers/staging/lustre/lnet/lnet/api-ni.c:917:1: warning: symbol 'lnet_shutdown_lndnis' was not declared. Should it be static?
drivers/staging/lustre/lnet/lnet/api-ni.c:1034:1: warning: symbol 'lnet_startup_lndnis' was not declared. Should it be static?
This function is only called by comedi drivers during the (*detach) of the
driver. After it is called mite_free() is always called to kfree the allocated
mite_struct pointer.
Rename this function to mite_detach() and merge the kfree() from mite_free()
into it.
Remove the unnecessary clearing of the mite variables since the mite pointer
is going to be kfree()'d anyway.
The mite_detach() function checks if the pointer is valid so remove the
unnecessary checks in the callers.
The check can also be removed in ni_660x since the ni_660x_free_mite_rings()
function does not actually need the 'mite' pointer.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This inline function simply returns the 'irq' of the struct pci_dev pointer
that is stored in struct mite_struct. This pci_dev pointer is the same as
the one that is already available in the (*auto_attach) functions where
mite_irq() is used.
Use the pci_dev pointer directly to get the irq and remove the unnecessary
inline function to remove the indirection.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: ni_pcimio: remove ATMIO and PCIMIO defines
These defines were probably intended to be used so that ni_mio_common.c
could detect if it was included by a driver that uses ioport or memory
mapped register access. This can actually be detected by checking if
the 'mite' member in the private data has been allocated.
Regardless, the symbols are not used. Just remove them.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: ni_mio_cs: remove ATMIO and PCIMIO defines
These defines were probably intended to be used so that ni_mio_common.c
could detect if it was included by a driver that uses ioport or memory
mapped register access. This can actually be detected by checking if
the 'mite' member in the private data has been allocated.
Regardless, the symbols are not used. Just remove them.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: ni_atmio: remove ATMIO and PCIMIO defines
These defines were probably intended to be used so that ni_mio_common.c
could detect if it was included by a driver that uses ioport or memory
mapped register access. This can actually be detected by checking if
the 'mite' member in the private data has been allocated.
Regardless, the symbols are not used. Just remove them.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: ni_stc.h: the boardinfo 'name' should be first
By convention, the first member of the boardinfo is a 'const char *' to
the board name, especially for those comedi drivers that rely on the
comedi core to set dev->board_ptr to the entry matching the board name
when doing a legacy (*attach) to a comedi driver.
Modify the ni_board_struct appropriately for consistency, although the
board name is only used for informational purposes by this driver (only
the driver name is matched by the comedi core).
For aesthetics, also move the members in the boardinfo declarations.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Merge tag 'iio-for-3.17b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next
Jonathan writes:
Second round of new drivers and cleanups for IIO in the 3.17 cycle.
New drivers
* mcp4902, mcp4912 and mcp4922 SPI DAC driver.
* max1027, max1029 and max1031 SPI ADC driver.
Cleanups
* cm32181 - use devm APIs to simplify error paths.
* ak8975 - use devm APIs to simplify error paths.
* ad9850 - drop some unused defines and an unnecessary goto.
* hmc5843 - add missing devices to the device id table and the documentation.
* ad9832 - small formatting cleanups.
* sca3000 - hide direct use of the stufftoread element by adding a
data_available function. This is a precursor for the addition of buffer
watermarks to the subsystem but stands as a good cleanup on its own.
Vincent Heuken [Mon, 23 Jun 2014 12:09:18 +0000 (05:09 -0700)]
Staging: slicoss: fixed frivolous else statement warnings in slicoss.c
This is a patch for the slicoss.c file that fixes four instances
of the following warning:
WARNING: else is not generally useful after a break or return
Signed-off-by: Vincent Heuken <me@vincentheuken.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sachin Kamat [Mon, 23 Jun 2014 06:13:08 +0000 (11:43 +0530)]
staging: emxx_udc: Fix build error
devm_request_and_ioremap has been removed since commit c9d53c0f2d23
("devres: remove devm_request_and_ioremap()") Use devm_ioremap_resource
instead. While at it, also remove redundant error message as it is now
handled by devm_ioremap_resource. Without this patch we get the following
build error:
drivers/staging/emxx_udc/emxx_udc.c:3370:2: error: implicit declaration of function ‘devm_request_and_ioremap’ [-Werror=implicit-function-declaration]