Aaro Koskinen [Wed, 29 May 2013 20:59:00 +0000 (23:59 +0300)]
staging: xgifb: refactor XGI_BridgeIsOn()
Refactor XGI_BridgeIsOn(). IF_DEF_LVDS bit is not valid for < XG20 chips.
Also we can make the function static by moving it to vb_init.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Peng Tao [Wed, 29 May 2013 13:40:56 +0000 (21:40 +0800)]
staging/lustre: fix LBUG and inode refcount bug
ldlm_proc_setup and ldlm_proc_cleanup should reset global
pde pointers otherwise remount may hit
LASSERT(ldlm_ns_proc_dir == NULL);
Also in libcfs_sock_ioctl, fput() includes itself sock_release.
So don't call sock_release twice otherwise kernel may oops
due to incorrect inode ref counting.
Signed-off-by: Peng Tao <tao.peng@emc.com>
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Peng Tao [Wed, 29 May 2013 13:40:55 +0000 (21:40 +0800)]
staging/lustre: adapt proc_dir_entry change
In 3.10 merge window, proc_dir_entry is now private to proc. However,
Lustre lprocfs depends heavily on it and its now-gone read_proc_t and
write_proc_t members.
The patch largely changed the fact, and made lprocfs depend on none of
proc_dir_entry private members. All lprocfs callers are converted to
use the new seq_file scheme.
Also lprocfs_srch is removed so that we can drop lprocfs_lock. All callers
are changed to save created pde in proper place.
See https://jira.hpdd.intel.com/browse/LU-3319 for more details.
Signed-off-by: Peng Tao <tao.peng@emc.com>
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Peng Tao [Wed, 29 May 2013 13:40:54 +0000 (21:40 +0800)]
staging/lustre: fix build error
We missed one file...
Signed-off-by: Peng Tao <tao.peng@emc.com>
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dan Carpenter [Wed, 29 May 2013 08:12:18 +0000 (11:12 +0300)]
Staging: rtl8192e: fix an endian bug
Passing the high bits of "ratr_value" to rtl8192_config_rate() only
works on little endian systems. We should be passing a u16 value.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dan Carpenter [Wed, 29 May 2013 06:57:36 +0000 (09:57 +0300)]
Staging: rtl8192e: printing the wrong array
Smatch complained that there is an array overflow here. It looks
like we are supposed to be printing the ->rates_ex[] array which is
slightly larger than the ->rates[] array. This is a cut and paste
error.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dan Carpenter [Wed, 29 May 2013 06:56:00 +0000 (09:56 +0300)]
Staging: rtl8192e: delete some dead cruft
I have removed some unneeded comments, some blank lines and some
unused macros.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Wei Yongjun [Thu, 23 May 2013 09:28:05 +0000 (17:28 +0800)]
Staging: vt6655: add missing free_netdev() on error in hostap_enable_hostapd()
Add the missing free_netdev() before return from function
hostap_enable_hostapd() in the error handling case.
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Wei Yongjun [Thu, 23 May 2013 09:28:34 +0000 (17:28 +0800)]
staging: keucr: remove needless check before usb_free_coherent()
usb_free_coherent() is safe with NULL addr and this check is
not required.
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Thu, 23 May 2013 20:09:45 +0000 (13:09 -0700)]
staging: comedi: usbduxsigma: tidy up the multi-line comments
Modify the multi-line comments to follow the CodingStyle.
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>
H Hartley Sweeten [Thu, 23 May 2013 20:09:25 +0000 (13:09 -0700)]
staging: comedi: usbduxsigma: remove a space before tab
checkpatch.pl reports:
WARNING: please, no space before tabs
+^Ihigh_speed = 0; ^I/* (devpriv->high_speed) */$
Remove the space to avoid the warning.
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>
H Hartley Sweeten [Thu, 23 May 2013 20:09:08 +0000 (13:09 -0700)]
staging: comedi: usbduxsigma: tidy up chanToInterval()
Rename the function to have namespace associated with the driver.
Rename the CamelCase parameter 'nChannels' to avoid the checkpatch.pl
warning.
Tidy up the function a bit.
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>
H Hartley Sweeten [Thu, 23 May 2013 20:08:51 +0000 (13:08 -0700)]
staging: comedi: usbduxsigma: add missing spaces reported by checkpatch.pl
checkpatch.pl reports:
ERROR: space required after that ',' (ctx:VxV)
+ dev_dbg(dev->class_dev,"CRC error in ISO IN stream\n");
^
ERROR: spaces required around that '=' (ctx:VxW)
+ struct usbduxsigma_private *devpriv= dev->private;
^
Add the missing spaces to avoid the error.
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>
H Hartley Sweeten [Thu, 23 May 2013 20:08:33 +0000 (13:08 -0700)]
staging: comedi: usbduxsigma: rename CamelCase vars in private data
Rename the CamelCase variables in the private data to avoid the
checkpatch.pl warning.
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>
H Hartley Sweeten [Thu, 23 May 2013 20:08:14 +0000 (13:08 -0700)]
staging: comedi: usbduxsigma: remove some unused defines
These defines are not used in the driver. 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>
H Hartley Sweeten [Thu, 23 May 2013 20:07:53 +0000 (13:07 -0700)]
staging: comedi: usbduxsigma: tidy up the usb endpoint defines
Rename the defines so they have namespace associated with the driver.
Tidy up the defines.
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>
H Hartley Sweeten [Thu, 23 May 2013 20:07:35 +0000 (13:07 -0700)]
staging: comedi: usbduxsigma: cleanup comedi_lrange table
Rename the table so it has namespace associated with the driver.
Tidy up the whitespace of the table.
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>
H Hartley Sweeten [Thu, 23 May 2013 20:07:14 +0000 (13:07 -0700)]
staging: comedi: usbduxsigma: rename usbdux_{ai,ao}_stop() functions
Rename the functions so they have namespace associated with the driver.
For aesthetic reasons, pass the comedi_device pointer instead of the
private data pointer as the first parameter.
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>
H Hartley Sweeten [Thu, 23 May 2013 20:06:55 +0000 (13:06 -0700)]
staging: comedi: usbduxsigma: rename the (*cancel) functions
Rename these functions so they have namespace associated with 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>
H Hartley Sweeten [Thu, 23 May 2013 20:06:37 +0000 (13:06 -0700)]
staging: comedi: usbduxsigma: rename the urb completion handlers
Rename these functions so they have namespace associated with the
driver and their use is aparent.
Also, rename the #defines used for the bulk transfer commands and
move them up with the other defines.
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>
H Hartley Sweeten [Thu, 23 May 2013 20:06:18 +0000 (13:06 -0700)]
staging: comedi: usbduxsigma: rename {send,receive}_dux_commands()
Rename these functions so they have namespace associated with the
driver.
Also, rename the #defines used for the bulk transfer commands and
move them up with the other defines.
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>
H Hartley Sweeten [Thu, 23 May 2013 20:05:59 +0000 (13:05 -0700)]
staging: comedi: usbduxsigma: check for invalid 'ao_timer' in all cases
Make sure to check that the 'ao_timer' value is valid for both the
high speed and low speed cases in usbduxsigma_ao_cmdtest().
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Thu, 23 May 2013 20:05:38 +0000 (13:05 -0700)]
staging: comedi: usbduxsigma: tidy up analog input command support
Rename the (*do_cmdtest) and (*do_cmd) functions so they have namespace
associated with the driver. Rename the local variable used for the
private data pointer.
Move all the command argument initialization and testing into the
(*do_cmdtest) function. That function is always called by the comedi
core before the (*do_cmd) function. The only thing the (*do_cmd) function
should have to do is setup the channel list, send the command to start
the analog input sampling, initialize the counter for the conversion,
then either read the acquisition data (submit the urbs) or set the
trigger to read the data later.
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>
H Hartley Sweeten [Thu, 23 May 2013 20:05:19 +0000 (13:05 -0700)]
staging: comedi: usbduxsigma: tidy up usbdux_ai_insn_read()
Rename the function so it has namespace associated with the driver.
Rename the local variable used for the private data pointer.
Return -EBUSY if an asynchronous command is running and the read cannot
be completed.
Propagate the errno if the receive_dux_command() fails.
Tidy up the function to make it more concise.
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>
H Hartley Sweeten [Thu, 23 May 2013 20:04:53 +0000 (13:04 -0700)]
staging: comedi: usbduxsigma: cleanup the private data 'outBuffer'
This buffer is used to cache the analog output values that are written
to the analog output channels. Currently it only caches the single
writes to the channels using the (*insn_write) callback. The async
command writes are not cached. The buffer is also being kzalloc'ed
during the attach of the driver to a size much larger that required.
Rename the CamelCase buffer and change it to an array in the private
data of the correct size to cache the analog output channel values.
Modify the analog output urb callback so it updates the cached values
with those used for the asynchronous command to allow readback after
the command 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>
H Hartley Sweeten [Thu, 23 May 2013 20:04:31 +0000 (13:04 -0700)]
staging: comedi: usbduxsigma: tidy up analog output (*insn_{read, write})
Rename the functions so they have namespace associated with the driver.
Rename the local variable used for the private data pointer.
Return -EBUSY from the (*insn_write) function if an asynchronous command
is running that the write cannot be completed.
Don't save the cached value of the analog output for readback unless
the command to set it is successful.
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>
H Hartley Sweeten [Thu, 23 May 2013 20:04:11 +0000 (13:04 -0700)]
staging: comedi: usbduxsigma: tidy up analog output command support
Rename the (*do_cmdtest) and (*do_cmd) functions so they have namespace
associated with the driver. Rename the local variable used for the
private data pointer.
Move all the command argument initialization and testing into the
(*do_cmdtest) function. That function is always called by the comedi
core before the (*do_cmd) function. The only thing the (*do_cmd) function
should have to do is setup the channel list, initialize the counter for
the conversion, then either start the conversion (submit the urbs) or
set the trigger to start the conversion.
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>
H Hartley Sweeten [Thu, 23 May 2013 20:03:45 +0000 (13:03 -0700)]
staging: comedi: usbduxsigma: rename usbdux_pwm_stop()
Rename the function so it has namespace associated with the driver.
For aesthetic reasons, pass the comedi_device pointer instead of the
private data pointer as the first parameter.
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>
H Hartley Sweeten [Thu, 23 May 2013 20:03:26 +0000 (13:03 -0700)]
staging: comedi: usbduxsigma: rename usbdux_pwm_cancel()
Rename the function so it has namespace associated with 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>
H Hartley Sweeten [Thu, 23 May 2013 20:03:06 +0000 (13:03 -0700)]
staging: comedi: usbduxsigma: rename usbdux_pwm_irq()
Rename the function so it has namespace associated with 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>
H Hartley Sweeten [Thu, 23 May 2013 20:02:45 +0000 (13:02 -0700)]
staging: comedi: usbduxsigma: tidy up usbdux_pwm_period()
Rename the function so it has namespace associated with the driver.
Rename the local variable used for the private data pointer.
Modify the fx2delay calculation to remove the floating point values.
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>
H Hartley Sweeten [Thu, 23 May 2013 20:02:25 +0000 (13:02 -0700)]
staging: comedi: usbduxsigma: change private data flags to bit fields
Change the type of all the true/false flags in the private data to
bit fields.
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>
H Hartley Sweeten [Thu, 23 May 2013 20:01:56 +0000 (13:01 -0700)]
staging: comedi: usbduxsigma: remove 'interface' from the private data
This back pointer to the usb_interface is not used, 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>
H Hartley Sweeten [Thu, 23 May 2013 20:01:18 +0000 (13:01 -0700)]
staging: comedi: usbduxsigma: remove some dev_{level} noise
Remove the dev_err() and dev_dbg() messages that are just kernel
noise.
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>
H Hartley Sweeten [Thu, 23 May 2013 20:00:56 +0000 (13:00 -0700)]
staging: comedi: usbduxsigma: tidy up usbdux_dio_insn_config()
Rename the function so it has namespace associated with the driver.
Rename the local variable used for the private data pointer.
Add a local variable for the channel mask.
Remove the unnecessary comments and clean up the multi-line comment
at the end.
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>
H Hartley Sweeten [Thu, 23 May 2013 20:00:36 +0000 (13:00 -0700)]
staging: comedi: usbduxsigma: tidy up usbdux_dio_insn_bits()
Rename the function so it has namespace associated with the driver.
Rename the local variable used for the private data pointer.
Remove the unnecessary casts.
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>
H Hartley Sweeten [Thu, 23 May 2013 19:59:24 +0000 (12:59 -0700)]
staging: comedi: usbduxsigma: tidy up usbdux_pwm_start()
Rename the function so it has namespace associated with the driver.
Rename the local variable used for the private data pointer.
Remove the unnecessary cast of the pwm delay.
Use memset to initialize the buffer instead of the for loop.
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>
H Hartley Sweeten [Thu, 23 May 2013 19:58:43 +0000 (12:58 -0700)]
staging: comedi: usbduxsigma: tidy up usbdux_pwm_pattern()
Rename the function so it has namespace associated with the driver.
Tidy up the function to make it more concise.
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>
H Hartley Sweeten [Thu, 23 May 2013 19:58:23 +0000 (12:58 -0700)]
staging: comedi: usbduxsigma: tidy up usbdux_pwm_write()
Rename the function so it has namespace associated with the driver.
Tidy up the comments.
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>
H Hartley Sweeten [Thu, 23 May 2013 19:58:04 +0000 (12:58 -0700)]
staging: comedi: usbduxsigma: remove usbdux_pwm_read()
The comment says its not needed, just 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>
H Hartley Sweeten [Thu, 23 May 2013 19:57:45 +0000 (12:57 -0700)]
staging: comedi: usbduxsigma: tidy up usbduxsigma_pwm_config()
Rename the function so it has namespace associated with the driver.
Rename the local variable used for the private data pointer.
Remove some unnecessary comments and tidy up the comment about the
parameters for the INSN_CONFIG_PWM_SET_H_BRIDGE instruction.
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>
H Hartley Sweeten [Thu, 23 May 2013 19:57:25 +0000 (12:57 -0700)]
staging: comedi: usbduxsigma: move usbduxsigma_firmware_upload()
For aesthetics, move this function near its caller. Also, move the
FIRMWARE_MAX_LEN define so its with the other firmware constants
and fix the whitespace.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Thu, 23 May 2013 19:56:59 +0000 (12:56 -0700)]
staging: comedi: usbduxsigma: remove an extra ';'
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>
H Hartley Sweeten [Thu, 23 May 2013 19:56:36 +0000 (12:56 -0700)]
staging: comedi: usbduxsigma: tidy up tidy_up()
Rename the function so it has namespace associated with the driver.
For aesthetic reasons, move the function so it's near the one that
allocates the usb buffers.
Tidy up the function so it frees the buffers in the opposite order
they were allocated. Also remove the = NULL for all the buffers,
the driver is being detached so the comedi core will kfree the
private data.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Thu, 23 May 2013 19:56:12 +0000 (12:56 -0700)]
staging: comedi: usbduxsigma: kill all urbs before freeing them
For aesthetic reasons, kill all the urbs before freeing them.
Also, remove a redundant killing of the ai and ao urbs 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>
H Hartley Sweeten [Thu, 23 May 2013 19:55:48 +0000 (12:55 -0700)]
staging: comedi: usbduxsigma: move usb_set_intfdata(intf, NULL) to (*detach)
For aesthetic reasons, move the clearing of the interface data to
the (*detach) since its set in the (*auto_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>
H Hartley Sweeten [Thu, 23 May 2013 19:55:28 +0000 (12:55 -0700)]
staging: comedi: usbduxsigma: remove tidy_up() from (*auto_attach)
Comedi drivers do not need to cleanup allocations during the
(*auto_attach). If the (*auto_attach) fails the (*detach) will
automatically be called to handle the cleanup.
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>
H Hartley Sweeten [Thu, 23 May 2013 19:55:08 +0000 (12:55 -0700)]
staging: comedi: usbduxsigma: tidy up usbdux_getstatusinfo()
Rename the function so it has namespace associated with the driver.
Move the function closer to its only caller and tidy it up a bit.
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>
H Hartley Sweeten [Thu, 23 May 2013 19:54:49 +0000 (12:54 -0700)]
staging: comedi: usbduxsigma: tidy up usbduxsigma_attach_common()
Rename the local variable used for the comedi_device private data.
Remove all the unnecessary comments and add some whitespace to the
subdevice init.
Use dev->class_dev for the dev_{level} 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>
H Hartley Sweeten [Thu, 23 May 2013 19:54:25 +0000 (12:54 -0700)]
staging: comedi: usbduxsigma: remove SUBDEV_* defines
The SUBDEV_* defines are only used during the (*auto_attach). Remove
the defines and just open code the values.
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>
H Hartley Sweeten [Thu, 23 May 2013 19:54:06 +0000 (12:54 -0700)]
staging: comedi: usbduxsigma: remove unnecessary check in usbdux_ao_cmd()
The comedi core verifies that the command chanlist_len is valid for
the subdevice based on the len_chanlist that was setup during the
attach. There is no need to recheck it in the (*cmd) 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>
H Hartley Sweeten [Thu, 23 May 2013 19:53:46 +0000 (12:53 -0700)]
staging: comedi: usbduxsigma: remove unnecessary check in usbdux_ai_cmd()
The comedi core verifies that the command chanlist_len is valid for
the subdevice based on the len_chanlist that was setup during the
attach. There is no need to recheck it in the (*cmd) 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>
H Hartley Sweeten [Thu, 23 May 2013 19:53:23 +0000 (12:53 -0700)]
staging: comedi: usbduxsigma: tidy up usbdux_ai_inttrig()
Rename the function so it has namespace associated with the driver.
Rename the local variable used for the private data pointer.
Remove the dev_err() messages, they are just added noise.
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>
H Hartley Sweeten [Thu, 23 May 2013 19:52:59 +0000 (12:52 -0700)]
staging: comedi: usbduxsigma: tidy up usbdux_ao_inttrig()
Rename the function so it has namespace associated with the driver.
Rename the local variable used for the private data pointer.
Remove the dev_err() messages, they are just added noise.
Refactor the code to remove the goto.
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>
H Hartley Sweeten [Thu, 23 May 2013 19:52:37 +0000 (12:52 -0700)]
staging: comedi: usbduxsigma: remove private data sanity checks
The comedi functions in this driver can only be called if the
(*auto_attach) successfull kzalloc'ed the private data and set
dev->private. The extra sanity checks are not needed. 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>
H Hartley Sweeten [Thu, 23 May 2013 19:52:17 +0000 (12:52 -0700)]
staging: comedi: usbduxsigma: tidy up firmware upload error messages
Use dev->class_dev for all dev_{level} messages.
Remove the unnecessary error message for a kmemdup() failure.
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>
H Hartley Sweeten [Thu, 23 May 2013 19:51:56 +0000 (12:51 -0700)]
staging: comedi: usbduxsigma: remove 'usbdev' from the private data
This back pointer to the usb_device is not needed in the private data.
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>
H Hartley Sweeten [Thu, 23 May 2013 19:51:37 +0000 (12:51 -0700)]
staging: comedi: usbduxsigma: remove 'comedidev' from the private data
This back pointer to the comedi_device is not needed in the private
data. 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>
H Hartley Sweeten [Thu, 23 May 2013 19:51:14 +0000 (12:51 -0700)]
staging: comedi: usbduxsigma: tidy up usbduxsub_submit_PwmURBs()
Rename the CamelCase function.
Pass the comedi_device pointer instead of the private data pointer
to the function.
Use a couple local variables to tidy up the function.
Remove the dev_err() message when usb_submit_urb() fails, its just
added noise.
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>
H Hartley Sweeten [Thu, 23 May 2013 19:50:51 +0000 (12:50 -0700)]
staging: comedi: usbduxsigma: tidy up receive_dux_commands()
Rename the variable used for the private data pointer.
Remove dev_err() when usb_blk_msg() fails, it's just added noise.
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>
H Hartley Sweeten [Thu, 23 May 2013 19:50:31 +0000 (12:50 -0700)]
staging: comedi: usbduxsigma: tidy up send_dux_commands()
Rename the variable used for the private data pointer.
Remove dev_err() when usb_blk_msg() fails, it's just added noise.
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>
H Hartley Sweeten [Thu, 23 May 2013 19:50:08 +0000 (12:50 -0700)]
staging: comedi: usbduxsigma: remove NOISY_DUX_DEBUGBUG
This define enables a bunch of printk debug in send_dux_commands().
This is just noise used for development debuging. 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>
H Hartley Sweeten [Thu, 23 May 2013 19:49:50 +0000 (12:49 -0700)]
staging: comedi: usbduxsigma: push usb (*probe) into comedi (*auto_attach)
The usb_driver (*probe) already calls comedi_usb_auto_config(), which
will call the comedi_driver (*auto_attach). Move the bulk of the (*probe)
to the (*auto_attach).
This allows the comedi_device private data to be kzalloc'ed and the static
array used to pass the private data from the usb_driver to the comedi_driver
can be removed along with the static semaphore that protected it.
We can also drop a couple variables from the private data since they no
longer are used or 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>
H Hartley Sweeten [Thu, 23 May 2013 19:49:26 +0000 (12:49 -0700)]
staging: comedi: usbduxsigma: push usb (*disconnect) into comedi (*detach)
The usb_driver (*disconnect) already calls comedi_usb_auto_unconfig(), which
will call the comedi_driver (*detach). Move the other operations in the
(*disconnect) into the (*detach). The comedi_usb_auto_unconfig() can then
be used directly for the (*disconnect).
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>
H Hartley Sweeten [Thu, 23 May 2013 19:49:02 +0000 (12:49 -0700)]
staging: comedi: usbduxsigma: factor usb buffer allocation out of (*probe)
To make pushing the usb_driver (*probe) into the comedi_driver (*auto_attach)
cleaner, factor the usb buffer allocation out of the (*probe). This also
cleans up the failure paths in the (*probe).
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>
H Hartley Sweeten [Thu, 23 May 2013 19:48:41 +0000 (12:48 -0700)]
staging: comedi: usbduxsigma: tidy up usbduxsigma_usb_probe()
For aesthetic reasons, rename some of the variables to the "norm" used
in comedi drivers.
Use a local variable for the pointer to the private data instead of
accessing the static array directly. Also use a local variable to
setup the urbs.
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>
H Hartley Sweeten [Thu, 23 May 2013 19:48:12 +0000 (12:48 -0700)]
staging: comedi: usbduxsigma: rename the private data struct
For aesthetic reasons, rename the struct used for the comedi_device
private data from usbduxsub to usbduxsigma_private.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Thu, 23 May 2013 19:47:48 +0000 (12:47 -0700)]
staging: comedi: usbduxsigma: tidy up usbduxsub_pwm_irq()
Rename the local variables to follow the "norm" for comedi drivers.
The comedi_subdevice is not used in this function. Remove that local
variable.
Use dev->class_dev for any dev_{level} messages.
Remove the extra check of 'pwm_cmd_running' before submitting the urb.
This flag was previously checked.
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>
H Hartley Sweeten [Thu, 23 May 2013 19:47:19 +0000 (12:47 -0700)]
staging: comedi: usbduxsigma: remove 'probed' checks in comedi functions
The 'probed' flag in the private data is used by the usb_driver (*probe)
function to find a free entry in the static usbduxsub array to use for
the comedi_device private data. The (*probe) sets this flag before it
hands off the probe to the comedi_driver (*auto_attach). The 'probed'
flag is cleared in tidy_up() are part of the usb_driver (*disconnect),
which calls the comedi_driver (*detach).
The 'probed' flag will always be set if the comedi_driver (*auto_attach)
completes successfully. The extra sanity checks in the comedi functions
are not needed. 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>
H Hartley Sweeten [Thu, 23 May 2013 19:46:40 +0000 (12:46 -0700)]
staging: comedi: usbduxsigma: generalize the usb_submit_urb functions
Generalize a helper function to replace usbduxsub_submit_{In,Out}URBs().
In the callers, set the 'a[io]_cmd_running' flag after the urbs have been
successfully submitted. This removes the need to clear the flag if the
submit fails.
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>
H Hartley Sweeten [Thu, 23 May 2013 19:46:17 +0000 (12:46 -0700)]
staging: comedi: usbduxsigma: remove dev_{level} messages in submit urbs functions
The usbduxsub_submit_{In,Out}URBs() functions have a couple development
debug messages that are just added noise. Remove them.
Also, the sanity check of 'usbduxsub', the comedi_device private data, is
not necessary. The callers have already validated it. Remove the checks.
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>
H Hartley Sweeten [Thu, 23 May 2013 19:45:51 +0000 (12:45 -0700)]
staging: comedi: usbduxsigma: tidy up usbduxsub_ao_IsocIrq()
Rename the local variables to follow the "norm" for comedi drivers.
The comedi_subdevice for this function is the dev->write_subdev that
was initialized during the (*auto_attach), use that instead of
directly accessing the comedi_device subdevices array.
Use dev->class_dev for any dev_{level} messages.
Remove the extra check of 'ao_cmd_running' before submitting the urb.
This flag was previously checked and if the command is aborted due to
an usbdux_ao_stop() before reaching this point the function will exit.
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>
H Hartley Sweeten [Thu, 23 May 2013 19:45:16 +0000 (12:45 -0700)]
staging: comedi: usbduxsigma: tidy up usbduxsub_ai_IsocIrq()
Rename the local variables to follow the "norm" for comedi drivers.
The comedi_subdevice for this function is the dev->read_subdev that
was initialized during the (*auto_attach), use that instead of
directly accessing the comedi_device subdevices array.
Use dev->class_dev for any dev_{level} 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>
H Hartley Sweeten [Thu, 23 May 2013 19:44:39 +0000 (12:44 -0700)]
staging: comedi: usbduxsigma: absorb usbduxsub_unlink_PwmURBs() into caller
This function is only called by usbdux_pwm_stop(). Absorb 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>
H Hartley Sweeten [Thu, 23 May 2013 19:44:17 +0000 (12:44 -0700)]
staging: comedi: usbduxsigma: use usbdux_pwm_stop() to force unlink urb
In tidy_up(), instead of duplicating the code in usbdux_pwm_stop() to
unlink the pwm urb, just use usbdux_pwm_stop(). Since that function calls
usb_kill_urb() and clears the 'pwm_cmd_running' flag, we can also remove
the redundant code in tidy_up().
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>
H Hartley Sweeten [Thu, 23 May 2013 19:43:57 +0000 (12:43 -0700)]
staging: comedi: usbduxsigma: absorb usbduxsub_unlink_OutURBs() into caller
This function is only called by usbdux_ao_stop(). Absorb 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>
H Hartley Sweeten [Thu, 23 May 2013 19:43:35 +0000 (12:43 -0700)]
staging: comedi: usbduxsigma: use usbdux_ao_stop() to force unlink all urbs
In tidy_up(), instead of duplicating the code in usbdux_ao_stop() to unlink
all the output urbs, just use usbdux_ao_stop(). Since that function calls
usb_kill_urb() for all the urbs and clears the 'ao_cmd_running' flag, we
can also remove the redundant code in tidy_up().
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>
H Hartley Sweeten [Thu, 23 May 2013 19:43:07 +0000 (12:43 -0700)]
staging: comedi: usbduxsigma: absorb usbduxsub_unlink_InURBs() into caller
This function is only called by usbdux_ai_stop(). Absorb 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>
H Hartley Sweeten [Thu, 23 May 2013 19:42:42 +0000 (12:42 -0700)]
staging: comedi: usbduxsigma: use usbdux_ai_stop() to force unlink all urbs
In tidy_up(), instead of duplicating the code in usbdux_ai_stop() to unlink
all the input urbs, just use usbdux_ai_stop(). Since that function calls
usb_kill_urb() for all the urbs and clears the 'ai_cmd_running' flag, we
can also remove the redundant code in tidy_up().
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>
H Hartley Sweeten [Thu, 23 May 2013 19:42:01 +0000 (12:42 -0700)]
staging: comedi: usbduxsigma: cleanup the (*cancel) functions
The (*cancel) functions can only be called by the comedi core it the
(*auto_attach) completed successfully. That function sets the comedi_device
'private' variable before initializing the callbacks so the sanity checks
are unnecessary. Remove them.
Also, rename the 'this_usbduxsub' local variable to 'devpriv' as this is
more common in comedi drivers.
Remove the unnecessary comments.
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>
H Hartley Sweeten [Thu, 23 May 2013 19:41:27 +0000 (12:41 -0700)]
staging: comedi: usbduxsigma: remove check of 'probed' in (*cancel) functions
The comedi_device private data variable 'probed' is set after the usb_driver
has completed its (*probe) before calling comedi_usb_auto_config(). That
function calls the comedi_driver (*auto_attach) which will set the
comedi_device 'private' variable and initialize the subdevices.
The subdevice (*cancel) functions can only be called after the (*auto_attach)
has completed successfully so the sanity checks of 'probed' are unnecessary.
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>
H Hartley Sweeten [Thu, 23 May 2013 19:40:45 +0000 (12:40 -0700)]
staging: comedi: usbduxsigma: change return type of the stop functions
The usbdux_pwm_cancel() function is the only caller that does not validate
the comedi_device private data before calling the stop function. Move the
validation test to that function and remove the unnecessary sanity checks.
Since the stop functions always succeed, change the return type to void.
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>
H Hartley Sweeten [Thu, 23 May 2013 19:40:10 +0000 (12:40 -0700)]
staging: comedi: usbduxsigma: cleanup the stop functions
The 'this_usbduxsub' parameter is actually the comedi_device private data,
rename it to 'devpriv' which is more common in comedi drivers.
Remove the unnecessary pr_err() noise in usbdux_ai_stop().
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>
H Hartley Sweeten [Thu, 23 May 2013 19:39:41 +0000 (12:39 -0700)]
staging: comedi: usbduxsigma: cleanup the unlink urb functions
These functions always return success. Change them to just return void.
The 'usbduxsub_tmp', which is actually the comedi_device private data, is
already validated by the callers. Remove the unnecessary validation and
rename the 'usbduxsub_tmp' parameter to 'devpriv' which is more common in
comedi drivers.
Remove the unnecessary comments.
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>
H Hartley Sweeten [Thu, 23 May 2013 19:39:11 +0000 (12:39 -0700)]
staging: comedi: usbduxsigma: remove unlink urb debug messages
Remove the dev_dbg() messages in all the unlink urb functions. The 'err'
is always 0 (success) so these messages are just added noise.
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>
H Hartley Sweeten [Thu, 23 May 2013 19:38:43 +0000 (12:38 -0700)]
staging: comedi: usbduxsigma: remove function trace noise
Remove all the dev_{level} function trace noise 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>
Greg Kroah-Hartman [Mon, 27 May 2013 01:54:33 +0000 (10:54 +0900)]
Merge 3.10-rc3 into staging-next
We want the changes here, and we resolve the merge conflict that was
happening in the nvec_kbd.c file.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Linus Torvalds [Sun, 26 May 2013 23:00:47 +0000 (16:00 -0700)]
Linux 3.10-rc3
Manfred Spraul [Sun, 26 May 2013 09:08:52 +0000 (11:08 +0200)]
ipc/sem.c: Fix missing wakeups in do_smart_update_queue()
do_smart_update_queue() is called when an operation (semop,
semctl(SETVAL), semctl(SETALL), ...) modified the array. It must check
which of the sleeping tasks can proceed.
do_smart_update_queue() missed a few wakeups:
- if a sleeping complex op was completed, then all per-semaphore queues
must be scanned - not only those that were modified by *sops
- if a sleeping simple op proceeded, then the global queue must be
scanned again
And:
- the test for "|sops == NULL) before scanning the global queue is not
required: If the global queue is empty, then it doesn't need to be
scanned - regardless of the reason for calling do_smart_update_queue()
The patch is not optimized, i.e. even completing a wait-for-zero
operation causes a rescan. This is done to keep the patch as simple as
possible.
Signed-off-by: Manfred Spraul <manfred@colorfullife.com>
Acked-by: Davidlohr Bueso <davidlohr.bueso@hp.com>
Cc: Rik van Riel <riel@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Sun, 26 May 2013 19:33:05 +0000 (12:33 -0700)]
Merge tag 'nfs-for-3.10-3' of git://git.linux-nfs.org/projects/trondmy/linux-nfs
Pull NFS client bugfixes from Trond Myklebust:
- Stable fix to prevent an rpc_task wakeup race
- Fix a NFSv4.1 session drain deadlock
- Fix a NFSv4/v4.1 mount regression when not running rpc.gssd
- Ensure auth_gss pipe detection works in namespaces
- Fix SETCLIENTID fallback if rpcsec_gss is not available
* tag 'nfs-for-3.10-3' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
NFS: Fix SETCLIENTID fallback if GSS is not available
SUNRPC: Prevent an rpc_task wakeup race
NFSv4.1 Fix a pNFS session draining deadlock
SUNRPC: Convert auth_gss pipe detection to work in namespaces
SUNRPC: Faster detection if gssd is actually running
SUNRPC: Fix a bug in gss_create_upcall
Linus Torvalds [Sun, 26 May 2013 16:52:26 +0000 (09:52 -0700)]
Merge tag 'edac_fixes_for_3.10' of git://git./linux/kernel/git/bp/bp
Pull amd64 edac fix from Borislav Petkov:
"A sysfs file permissions correction"
* tag 'edac_fixes_for_3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp:
amd64_edac: Fix bogus sysfs file permissions
Linus Torvalds [Sun, 26 May 2013 16:36:31 +0000 (09:36 -0700)]
Merge branch 'parisc-for-3.10' of git://git./linux/kernel/git/deller/parisc-linux
Pull parisc fixes from Helge Deller:
"This time we made the kernel- and interruption stack allocation
reentrant which fixed some strange kernel crashes (specifically
protection ID traps).
Furthemore this patchset fixes the interrupt stack in UP and SMP
configurations by using native locking instructions. And finally
usage of floating point calculations on parisc were disabled in the
MPILIB."
* 'parisc-for-3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
parisc: fix irq stack on UP and SMP
parisc/superio: Use module_pci_driver to register driver
parisc: make interrupt and interruption stack allocation reentrant
parisc: show number of FPE and unaligned access handler calls in /proc/interrupts
parisc: add additional parisc git tree to MAINTAINERS file
parisc: use PAGE_SHIFT instead of hardcoded value 12 in pacache.S
parisc: add rp5470 entry to machine database
MPILIB: disable usage of floating point registers on parisc
Linus Torvalds [Sun, 26 May 2013 16:35:02 +0000 (09:35 -0700)]
Merge tag 'for-linus-v3.10-rc3' of git://oss.sgi.com/xfs/xfs
Pull xfs fixes from Ben Myers:
"Here are fixes for corruption on 512 byte filesystems, a rounding
error, a use-after-free, some flags to fix lockdep reports, and
several fixes related to CRCs. We have a somewhat larger post -rc1
queue than usual due to fixes related to the CRC feature we merged for
3.10:
- Fix for corruption with FSX on 512 byte blocksize filesystems
- Fix rounding error in xfs_free_file_space
- Fix use-after-free with extent free intents
- Add several missing KM_NOFS flags to fix lockdep reports
- Several fixes for CRC related code"
* tag 'for-linus-v3.10-rc3' of git://oss.sgi.com/xfs/xfs:
xfs: remote attribute lookups require the value length
xfs: xfs_attr_shortform_allfit() does not handle attr3 format.
xfs: xfs_da3_node_read_verify() doesn't handle XFS_ATTR3_LEAF_MAGIC
xfs: fix missing KM_NOFS tags to keep lockdep happy
xfs: Don't reference the EFI after it is freed
xfs: fix rounding in xfs_free_file_space
xfs: fix sub-page blocksize data integrity writes
Linus Torvalds [Sun, 26 May 2013 03:32:49 +0000 (20:32 -0700)]
Merge tag 'for-v3.10-fixes' of git://git.infradead.org/battery-2.6
Pull bettery fixes from Anton Vorontsov:
"Last minute one-liners: wrong kfree usage fix, module alias fixup and
kconfig adjustments"
* tag 'for-v3.10-fixes' of git://git.infradead.org/battery-2.6:
pm2301_charger: Fix module alias prefix
wm831x_backup: Fix wrong kfree call for devdata->backup.name
bq27x00: Fix I2C dependency in KConfig
lp8788-charger: Fix kconfig dependency
Linus Torvalds [Sun, 26 May 2013 03:32:00 +0000 (20:32 -0700)]
Merge tag 'pm+acpi-3.10-rc3' of git://git./linux/kernel/git/rafael/linux-pm
Pull power management and ACPI fixes from Rafael Wysocki:
- Additional CPU ID for the intel_pstate driver from Dirk Brandewie.
- More cpufreq fixes related to ARM big.LITTLE support and locking from
Viresh Kumar.
- VIA C7 cpufreq build fix from RafaĆ Bilski.
- ACPI power management fix making it possible to use device power
states regardless of the CONFIG_PM setting from Rafael J Wysocki.
- New ACPI video blacklist item from Bastian Triller.
* tag 'pm+acpi-3.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
ACPI / video: Add "Asus UL30A" to ACPI video detect blacklist
cpufreq: arm_big_little_dt: Instantiate as platform_driver
cpufreq: arm_big_little_dt: Register driver only if DT has valid data
cpufreq / e_powersaver: Fix linker error when ACPI processor is a module
cpufreq / intel_pstate: Add additional supported CPU ID
cpufreq: Drop rwsem lock around CPUFREQ_GOV_POLICY_EXIT
ACPI / PM: Allow device power states to be used for CONFIG_PM unset
Linus Torvalds [Sun, 26 May 2013 03:30:31 +0000 (20:30 -0700)]
Merge branch 'fixes' of git://git.infradead.org/users/vkoul/slave-dma
Pull slave-dma fixes from Vinod Koul:
"We have two patches from Andy & Rafael fixing the Lynxpoint dma"
* 'fixes' of git://git.infradead.org/users/vkoul/slave-dma:
ACPI / LPSS: register clock device for Lynxpoint DMA properly
dma: acpi-dma: parse CSRT to extract additional resources
Kyle McMartin [Sat, 25 May 2013 16:54:08 +0000 (12:54 -0400)]
score: remove redundant kcore_list entries
kcore_vmalloc is in fs/proc/kcore.c and kcore_mem is unused across
the tree. Noticed while grepping the tree for some other kcore stuff.
(score looks pretty unmaintained to me.)
Signed-off-by: Kyle McMartin <kyle@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Sat, 25 May 2013 17:06:20 +0000 (10:06 -0700)]
Merge tag 'arc-v3.10-fixes' of git://git./linux/kernel/git/vgupta/arc
Pull ARC fixes from Vineet Gupta:
- Fallouts/wreckage of Cache Flush optimizations / aliasing dcache
support
- Fix for an interesting bug where piped input to grep was getting
mysteriously clobbered
* tag 'arc-v3.10-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc:
ARC: lazy dcache flush broke gdb in non-aliasing configs
ARC: Use enough bits for determining page's cache color
ARC: Brown paper bag bug in macro for checking cache color
ARC: copy_(to|from)_user() to honor usermode-access permissions
ARC: [mm] Prevent stray dcache lines after__sync_icache_dcach()
ARC: [TB10x] Remove redundant abilis,simple-pinctrl mechanism
Linus Torvalds [Sat, 25 May 2013 17:05:24 +0000 (10:05 -0700)]
Merge branch 'fixes' of git://git.linaro.org/people/rmk/linux-arm
Pull ARM fixes from Russell King:
"Just three this time, all really quite small"
* 'fixes' of git://git.linaro.org/people/rmk/linux-arm:
ARM: 7729/1: vfp: ensure VFP_arch is non-zero when VFP is not supported
ARM: 7727/1: remove the .vm_mm value from gate_vma
ARM: 7723/1: crypto: sha1-armv4-large.S: fix SP handling
Vineet Gupta [Sat, 25 May 2013 08:34:25 +0000 (14:04 +0530)]
ARC: lazy dcache flush broke gdb in non-aliasing configs
gdbserver inserting a breakpoint ends up calling copy_user_page() for a
code page. The generic version of which (non-aliasing config) didn't set
the PG_arch_1 bit hence update_mmu_cache() didn't sync dcache/icache for
corresponding dynamic loader code page - causing garbade to be executed.
So now aliasing versions of copy_user_highpage()/clear_page() are made
default. There is no significant overhead since all of special alias
handling code is compiled out for non-aliasing build
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>