Matthias Beyer [Tue, 29 Jul 2014 14:52:13 +0000 (16:52 +0200)]
Staging: bcm: Qos.c: Replaced member accessing with variable in PruneQueue()
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Matthias Beyer [Tue, 29 Jul 2014 12:48:34 +0000 (14:48 +0200)]
Staging: bcm: IPv6Protocol.c: Line length fixes
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Matthias Beyer [Tue, 29 Jul 2014 12:48:33 +0000 (14:48 +0200)]
Staging: bcm: IPv6Protocol.c: Whitespace cleanup
Removes whitespace before semicolons and add blank line after
declaration.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Matthias Beyer [Tue, 29 Jul 2014 12:48:32 +0000 (14:48 +0200)]
Staging: bcm: IPv6Protocol.c: Replaced member accessing with variable
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Matthias Beyer [Tue, 29 Jul 2014 12:48:31 +0000 (14:48 +0200)]
Staging: bcm: IPv6Procotol.c: Replaced member accessing with variable
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Matthias Beyer [Tue, 29 Jul 2014 12:48:30 +0000 (14:48 +0200)]
Staging: bcm: IPv6Protocol.c: Removed unnecessary if-else blocks
This patch simplifies
if (a) {
x = false;
} else {
if (b) {
x = false;
}
}
to
if (a || b) {
x = false;
}
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Matthias Beyer [Tue, 29 Jul 2014 12:48:29 +0000 (14:48 +0200)]
Staging: bcm: IPv6Protocol.c: Reindented switch-case
This patch removes the unneccessary blocks inside the case statements
and fixes the indentation of their content.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Benjamin Romer [Tue, 29 Jul 2014 19:09:40 +0000 (15:09 -0400)]
staging: unisys: remove U8 type
This patch switches all use of the U8 typedef to use the kernel's u8 type
instead.
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Benjamin Romer [Tue, 29 Jul 2014 15:11:21 +0000 (11:11 -0400)]
staging: unisys: add sysfs entries for parahotplug support
This patch adds new a new directory parahotplug to the visorchipset sysfs
directory, and two new attributes, deviceenabled, and devicedisabled, into the
new directory, to add s-Par parahotplug support.
The parahotplug interface is used to deal with SR-IOV recovery situations on
s-Par guest partitions. The command service partition will send a message to a
guest when an SR-IOV device that guest is using needs to be temporarily removed.
The message triggers a udev event that will cause a recovery script to run.
When that script has completed its work, it will write to one of the
parahotplug interfaces to send a message back to Command, indicating that the
recovery action has completed.
When a guest that is sharing an SR-IOV device is restarted, that guest will
take down the PF driver on the device, but any guests with VFs will not know
that their device needs to be reset as well. The recovery script makes it so
the device will be shut down fully and then restarted after the sharing guest
comes back up, and ensures that the timing is correct.
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Benjamin Romer [Tue, 29 Jul 2014 15:11:20 +0000 (11:11 -0400)]
staging: unisys: remove parahotplug proc entry
Remove the parahotplug proc code entirely in preparation for replacement with
sysfs entries. Since visorchipset_proc_read_writeonly() is orphaned by the
removal, it is removed as well.
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Malcolm Priestley [Mon, 28 Jul 2014 22:26:26 +0000 (23:26 +0100)]
staging: vt6655: clean up the tail of function device_init_registers
Aligning the code.
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Malcolm Priestley [Mon, 28 Jul 2014 22:26:25 +0000 (23:26 +0100)]
staging: vt6655: remove typedef enum __device_init_type
The value is either DEVICE_INIT_COLD or DEVICE_INIT_DXPL making no
difference to code.
Remove typedef and remove if statement in device_init_registers
pulling the code in.
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Malcolm Priestley [Mon, 28 Jul 2014 20:43:30 +0000 (21:43 +0100)]
staging: vt6655: dead code remove undefined macro IO_MAP
This device is always memory mapped
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Malcolm Priestley [Mon, 28 Jul 2014 20:43:29 +0000 (21:43 +0100)]
staging: vt6655: dead code remove undefined macro FOR_LED_ON_NOTEBOOK code.
Removing all variables associated with the code.
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Malcolm Priestley [Mon, 28 Jul 2014 20:43:28 +0000 (21:43 +0100)]
staging: vt6655: deadcode remove undefined macro THREAD code.
Removing _RxManagementQueue, InitRxManagementQueue, MlmeThread, mlme_kill,
EnQueue and DeQueue.
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Malcolm Priestley [Mon, 28 Jul 2014 20:43:27 +0000 (21:43 +0100)]
staging: vt6655: remove undefined TASK_LET code
Removing all code within and function MngWorkItem.
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Santiago Torres [Sun, 27 Jul 2014 21:02:47 +0000 (17:02 -0400)]
staging:rtl8712:mlme_linux.c: Adds blank lines to pass checkpatch.pl
Added three newlines after variable declarations to pass checkpatch.pl.
Signed-off by: Santiago Torres-Arias <torresariass@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Radek Dostal [Sun, 27 Jul 2014 21:22:57 +0000 (23:22 +0200)]
staging: lustre: fix sparse warnings "Using plain integer as NULL pointer"
fixes all sparse warnings "Using plain integer as NULL pointer"
in drivers/staging/lustre
drivers/staging/lustre/lnet/lnet/api-ni.c:1665:32: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lnet/lnet/api-ni.c:1773:35: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/fld/fld_request.c:171:17: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/llite/llite_lib.c:155:30: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/llite/lproc_llite.c:846:11: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/lov/lov_obd.c:902:48: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/lov/lov_obd.c:946:54: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/lov/lov_obd.c:2819:46: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/lov/lov_dev.c:456:66: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/mdc/mdc_request.c:2426:46: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/mdc/mdc_request.c:2569:46: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/mdc/mdc_request.c:2740:46: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/mdc/lproc_mdc.c:175:57: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/mdc/lproc_mdc.c:176:57: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/mdc/lproc_mdc.c:177:57: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/mdc/lproc_mdc.c:178:57: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/mdc/lproc_mdc.c:179:57: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/mdc/lproc_mdc.c:180:57: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/mdc/lproc_mdc.c:181:57: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/mdc/lproc_mdc.c:182:57: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/mdc/lproc_mdc.c:183:57: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/mdc/lproc_mdc.c:185:57: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/mdc/lproc_mdc.c:186:57: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/mdc/lproc_mdc.c:193:66: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/mdc/lproc_mdc.c:194:63: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/mdc/lproc_mdc.c:195:56: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/mdc/lproc_mdc.c:196:51: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/mdc/lproc_mdc.c:197:50: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/mdc/lproc_mdc.c:198:48: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/mdc/lproc_mdc.c:199:57: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/mdc/lproc_mdc.c:200:11: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/mdc/lproc_mdc.c:206:48: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/mdc/lproc_mdc.c:207:11: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/mgc/mgc_request.c:199:9: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/obdclass/linux/linux-module.c:331:11: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/obdclass/obd_config.c:1164:53: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/obdclass/obd_config.c:1306:71: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/obdclass/llog_test.c:943:62: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/obdclass/llog_test.c:944:65: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/obdecho/echo_client.c:3116:46: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/osc/osc_request.c:3424:46: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/osc/osc_request.c:3548:46: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/osc/osc_request.c:3615:46: warning: Using plain integer as NULL pointer
Signed-off-by: Radek Dostal <rd@radekdostal.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jessica Yu [Mon, 28 Jul 2014 13:33:15 +0000 (06:33 -0700)]
Staging: lustre: linux-module: add const modifier to file_operations
Add the const modifier to the file_operations struct, since it is
normally const.
Signed-off-by: Jessica Yu <jyu@cowsay.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jessica Yu [Mon, 28 Jul 2014 13:33:14 +0000 (06:33 -0700)]
Staging: lustre: linux-module: remove extraneous parens
Remove unnecessary parens from return statements, return is not a function
Signed-off-by: Jessica Yu <jyu@cowsay.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jessica Yu [Mon, 28 Jul 2014 13:33:13 +0000 (06:33 -0700)]
Staging: lustre: linux-module: remove unnecessary spaces
Remove extraneous space after open paren and before close paren.
Signed-off-by: Jessica Yu <jyu@cowsay.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jessica Yu [Mon, 28 Jul 2014 13:33:12 +0000 (06:33 -0700)]
Staging: lustre: linux-module: fix pointer style issue
Fix pointer code style (foo * bar -> foo *bar)
Signed-off-by: Jessica Yu <jyu@cowsay.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 29 Jul 2014 22:01:45 +0000 (15:01 -0700)]
staging: comedi: amplc_dio200: use the comedi_device 'mmio' member
The amplc_dio200_common module currently uses a union in the private
data to determine if the hardware uses port or memory mapped I/O.
Use the new 'mmio' member in the comedi_device for the ioremap'ed
base address and remove all the union code.
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>
H Hartley Sweeten [Tue, 29 Jul 2014 22:01:44 +0000 (15:01 -0700)]
staging: comedi: ii_pci20kc: use the comedi_device 'mmio' member
Use the new 'mmio' member in the comedi_device for the __iomem * base
address.
Since this was the only member in the private data, remove the struct
and its allocation.
This legacy driver is a bit strange. The base address of the board is
passed to the (*attach) using by the user using the comedi_config
utiltiy. This base address is currently not ioremap'ed and is simply
cast to a void __iomem *. I'm not sure if this is correct. Add a
comment so it will be addressed later.
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>
H Hartley Sweeten [Tue, 29 Jul 2014 22:01:43 +0000 (15:01 -0700)]
staging: comedi: ni_labpc: use the comedi_device 'mmio' member
Use the new 'mmio' member in the comedi_device for the ioremap'ed
base address.
Only the ni_labpc_pci module does the ioremap, its also the only
module that sets the 'has_mmio' member in the boardinfo. Remove
this member from the boardinfo and use dev->mmio to determine if
the I/O is memory mapped.
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>
H Hartley Sweeten [Tue, 29 Jul 2014 22:01:42 +0000 (15:01 -0700)]
staging: comedi: ni_labpc: refactor labpc_8255_mmio()
Refactor the 8255 support code in preperation for using the comedi_device
'mmio' member.
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>
H Hartley Sweeten [Tue, 29 Jul 2014 22:01:41 +0000 (15:01 -0700)]
staging: comedi: ni_labpc: don't pass dev->iobase to labpc_counter_set_mode()
Use the comedi_device parameter that is passed to this function to find
the dev->iobase so it does not have to be included in each call.
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>
H Hartley Sweeten [Tue, 29 Jul 2014 22:01:40 +0000 (15:01 -0700)]
staging: comedi: ni_labpc: don't pass dev->iobase to labpc_counter_load()
Use the comedi_device parameter that is passed to this function to find
the dev->iobase so it does not have to be included in each call.
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>
H Hartley Sweeten [Tue, 29 Jul 2014 22:01:39 +0000 (15:01 -0700)]
staging: comedi: ni_labpc: pass comedi_device to the I/O callbacks
This driver uses some callbacks in the private data to handle the
port mapped or memory mapped I/O used to access the hardware.
Pass the comedi_device pointer to the helper functions so that the
base address can be found and does not need to be included in each
call.
Also, remove the inline from the helper functions.
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>
H Hartley Sweeten [Tue, 29 Jul 2014 22:01:38 +0000 (15:01 -0700)]
staging: comedi: mite: use the comedi_device 'mmio' member
Use the new 'mmio' member in the comedi_device for the ioremap'ed
'daq_io_addr'.
Move the iounmap of this address from mite_detach() to the drivers
that use the mite module.
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>
H Hartley Sweeten [Tue, 29 Jul 2014 22:01:37 +0000 (15:01 -0700)]
staging: comedi: mite: pass comedi_device to mite_setup()
For aesthetics, pass the comedi_device to mite_setup() and mite_setup2()
so that the dev->class_dev can be used in the dev_{level} message to make
the messages have consistancy with the other comedi drivers.
Remove the extra dev_warn() noise in the drivers when mite_setup() fails.
Rename the 'use_iodwbsr_1' parameter and change it to a bool.
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>
H Hartley Sweeten [Tue, 29 Jul 2014 22:01:36 +0000 (15:01 -0700)]
staging: comedi: mite: inline mite_setup()
This exported function simply calls mite_setup2() with the 'use_iodsbsr_1'
parameter set to 0.
Inline the simple function and remove the EXPORT_SYMBOL_GPL.
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>
H Hartley Sweeten [Tue, 29 Jul 2014 22:01:35 +0000 (15:01 -0700)]
staging: comedi: s626: use the comedi_device 'mmio' member
Use the new 'mmio' member in the comedi_device for the ioremap'ed
base address.
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>
H Hartley Sweeten [Tue, 29 Jul 2014 22:01:34 +0000 (15:01 -0700)]
staging: comedi: rtd520: use the comedi_device 'mmio' member
Use the new 'mmio' member in the comedi_device for the ioremap'ed
base address of PCI bar 2.
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>
H Hartley Sweeten [Tue, 29 Jul 2014 22:01:33 +0000 (15:01 -0700)]
staging: comedi: cb_pcidas64: use the comedi_device 'mmio' member
Use the new 'mmio' member in the comedi_device for the ioremap'ed
base address of PCI bar 3.
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>
H Hartley Sweeten [Tue, 29 Jul 2014 22:01:32 +0000 (15:01 -0700)]
staging: comedi: ni_670x: use the comedi_device 'mmio' member
Use the new 'mmio' member in the comedi_device for the ioremap'ed
base address.
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>
H Hartley Sweeten [Tue, 29 Jul 2014 22:01:31 +0000 (15:01 -0700)]
staging: comedi: ni_6527: iounmap resource when detached
PCI bar 1 is ioremap'ed during the (*auto_attach). This resource
needs to be iounmap'ed when the driver is (*detach)ed.
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>
H Hartley Sweeten [Tue, 29 Jul 2014 22:01:30 +0000 (15:01 -0700)]
staging: comedi: ni_6527: use the comedi_device 'mmio' member
Use the new 'mmio' member in the comedi_device for the ioremap'ed
base address.
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>
H Hartley Sweeten [Tue, 29 Jul 2014 22:01:29 +0000 (15:01 -0700)]
staging: comedi: dt3000: use the comedi_device 'mmio' member
Use the new 'mmio' member in the comedi_device for the ioremap'ed
base address.
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>
H Hartley Sweeten [Tue, 29 Jul 2014 22:01:28 +0000 (15:01 -0700)]
staging: comedi: daqboard2000: use the comedi_device 'mmio' member
Use the new 'mmio' member in the comedi_device for the ioremap'ed
base address.
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>
H Hartley Sweeten [Tue, 29 Jul 2014 22:01:27 +0000 (15:01 -0700)]
staging: comedi: addi_apci_3xxx: use the comedi_device 'mmio' member
Use the new 'mmio' member in the comedi_device for the ioremap'ed
base address.
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>
H Hartley Sweeten [Tue, 29 Jul 2014 22:01:26 +0000 (15:01 -0700)]
staging: comedi: icp_multi: use the comedi_device 'mmio' member
Use the new 'mmio' member in the comedi_device for the ioremap'ed
base address.
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>
H Hartley Sweeten [Tue, 29 Jul 2014 22:01:25 +0000 (15:01 -0700)]
staging: comedi: mf6x4: use the comedi_device 'mmio' member
Use the new 'mmio' member in the comedi_device for the ioremap'ed
base address.
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>
H Hartley Sweeten [Tue, 29 Jul 2014 22:01:24 +0000 (15:01 -0700)]
staging: comedi: me_daq: use the comedi_device 'mmio' member
Use the new 'mmio' member in the comedi_device for the ioremap'ed
base address.
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>
H Hartley Sweeten [Tue, 29 Jul 2014 22:01:23 +0000 (15:01 -0700)]
staging: comedi: gsc_hpdi: use the comedi_device 'mmio' member
Use the new 'mmio' member in the comedi_device for the ioremap'ed
base address.
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>
H Hartley Sweeten [Tue, 29 Jul 2014 22:01:22 +0000 (15:01 -0700)]
staging: comedi: ni_65xx: use the comedi_device 'mmio' member
Use the new 'mmio' member in the comedi_device for the ioremap'ed
base address.
Since this was the only member in the private data, remove the struct
and its allocation.
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>
H Hartley Sweeten [Tue, 29 Jul 2014 22:01:21 +0000 (15:01 -0700)]
staging: comedi: 8255_pci: use the comedi_device 'mmio' member
Use the new 'mmio' member in the comedi_device for the ioremap'ed
base address.
Since this was the only member in the private data, remove the struct
and its allocation.
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>
H Hartley Sweeten [Tue, 29 Jul 2014 22:01:20 +0000 (15:01 -0700)]
staging: comedi: add an 'mmio' member to comedi_device
All the comedi drivers that use memory mapped io currently have a
void __iomem * member in their private data for the driver. For
some of the drivers this is actually the only member in that data.
For convienence, add a new member to the comedi_device for this
void __iomem *.
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>
Ian Abbott [Tue, 29 Jul 2014 11:58:26 +0000 (12:58 +0100)]
staging: comedi: amplc_pci230: tidy up stuct pci230_private
Align the member comments a bit better in the declaration of `struct
pci230_private`. Also remove the heading comment as it is just a
boilerplate comedi comment.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Tue, 29 Jul 2014 11:58:25 +0000 (12:58 +0100)]
staging: comedi: amplc_pci230: no need to initialize named members to zero
The members of the elements of `pci230_boards[]` that are not explicitly
named in their initializers will be initialized to 0 automatically, so
there is no need to initialize them to 0 explicitly.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Tue, 29 Jul 2014 11:58:24 +0000 (12:58 +0100)]
staging: comedi: amplc_pci230: add whitespace to pci230_boards[]
Add a bit of whitespace to the initializer of `pci230_boards[]` for
aesthetic reasons.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Tue, 29 Jul 2014 11:58:23 +0000 (12:58 +0100)]
staging: comedi: amplc_pci230: no need for '&function'
Remove the "address-of" operator when the operand is a function.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Tue, 29 Jul 2014 11:58:22 +0000 (12:58 +0100)]
staging: comedi: amplc_pci230: remove some indentation in pci230_ai_check_chanlist()
A few lines in `pci230_ai_check_chanlist()` are indented one level too
much, so remove the excess indentation.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Tue, 29 Jul 2014 11:58:20 +0000 (12:58 +0100)]
staging: comedi: amplc_pci230: omit '!= 0' from logical expressions
Since anything non-zero is logically "true", don't bother doing
"not-equal" comparisons with zero.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Tue, 29 Jul 2014 11:58:19 +0000 (12:58 +0100)]
staging: comedi: amplc_pci230: don't begin line with binary operator
If an expression involving a binary operator needs to be split across
two lines, put the split after the operator.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Tue, 29 Jul 2014 11:58:18 +0000 (12:58 +0100)]
staging: comedi: amplc_pci230: add whitespace to register values
Several macros are defined for bit-field values within hardware
registers. They are defined as left-shifted values. Add some
whitespace around the left-shift operator.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Tue, 29 Jul 2014 11:58:17 +0000 (12:58 +0100)]
staging: comedi: amplc_pci230: remove PCI230_TEST_BIT()
The `PCI230_TEST_BIT()` macro is never used. Remove it.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Tue, 29 Jul 2014 11:58:16 +0000 (12:58 +0100)]
staging: comedi: amplc_pci230: remove PCI230_ADC_CONV
The macro `PCI230_ADC_CONV` is never used. Just remove it. (At one
time, the value was written to the `PCI230_ADCSWTRIG` register to
trigger a conversion, but any value would do, and the driver no longer
uses that register to trigger conversions anyway.)
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Tue, 29 Jul 2014 11:58:15 +0000 (12:58 +0100)]
staging: comedi: amplc_pci230: remove unused settling time constants
The macro constants `PCI230_DAC_SETTLE`, `PCI230_ADC_SETTLE` and
`PCI230_MUX_SETTLE` are never used. Just remove them.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Tue, 29 Jul 2014 11:58:14 +0000 (12:58 +0100)]
staging: comedi: amplc_pci230: usleep_range is preferred over udelay
Fix checkpatch issue: "CHECK: usleep_range is preferred over udelay; see
Documentation/timers/timers-howto.txt". I picked 100 us as a reasonable
upper bound, but it's not that critical.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Tue, 29 Jul 2014 11:58:13 +0000 (12:58 +0100)]
staging: comedi: amplc_pci230: alignment should match open parenthesis
Fix checkpatch issue: "CHECK: Alignment should match open parenthesis".
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Tue, 29 Jul 2014 11:58:12 +0000 (12:58 +0100)]
staging: comedi: amplc_pci230: blank lines aren't necessary before a close brace '}'
Fix checkpatch issues: "CHECK: Blank lines aren't necessary before a
close brace '}'".
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Tue, 29 Jul 2014 11:58:11 +0000 (12:58 +0100)]
staging: comedi: amplc_pci230: logical continuations should be on the previous line
Fix checkpatch issues "CHECK: Logical continuations should be on the
previous line".
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Tue, 29 Jul 2014 11:58:10 +0000 (12:58 +0100)]
staging: comedi: amplc_pci230: fix checkpatch line over 80 characters
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Tue, 29 Jul 2014 11:58:09 +0000 (12:58 +0100)]
staging: comedi: amplc_pci230: reformat a load of comments
Reformat a load of comments to fit in with the preferred coding style,
including the copyright and driver description comments at the top of
the file.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Mon, 28 Jul 2014 17:27:04 +0000 (10:27 -0700)]
staging: comedi: ni_tiocmd: introduce ni_tio_acknowledge()
The external callers of ni_tio_acknowledge_and_confirm() only call
this function to ack any pending errors or interrupts before starting
a new async command. Only the internal code in ni_tiocmd uses the
data that is optionally returned by this function.
Remove the export from ni_tio_acknowledge_and_confirm() and introduce
a new exported function that handles passing the NULL params.
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>
H Hartley Sweeten [Mon, 28 Jul 2014 17:27:03 +0000 (10:27 -0700)]
staging: comedi: ni_tiocmd: tidy up ni_tio_input_cmd()
The cmd->start_src is validated in the (*do_cmdtest) before this
function is called. All valid trigger sources are handled so the
default BUG() case can never occure.
For aesthetics, refactor the switch into if/else tests and remove
the BUG().
For aesthetics, rename the local variable 'retval' to simply 'ret'.
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>
H Hartley Sweeten [Mon, 28 Jul 2014 17:27:02 +0000 (10:27 -0700)]
staging: comedi: ni_tiocmd: tidy up ni_tio_input_inttrig()
Remove the BUG_ON(counter == NULL). If this can never happen and it
if did the driver should have died long before this function is called.
For aesthetics, rename the local variable 'retval' to simply 'ret'.
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>
H Hartley Sweeten [Mon, 28 Jul 2014 17:27:01 +0000 (10:27 -0700)]
staging: comedi: ni_tiocmd: tidy up ni_tio_configure_dma()
The 'enable' and 'read_not_write' parameters are true/false flags. For
aesthetics, change their types to bool.
Rename the local variable 'input_select_bits' to simply 'bits' and reuse
it when enabling the dma on the m series and 660x counter variants.
Add a local variable for the 'mask' that is passed to ni_tio_set_bits()
to help clarify the code.
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>
H Hartley Sweeten [Mon, 28 Jul 2014 17:27:00 +0000 (10:27 -0700)]
staging: comedi: ni_tio: tidy up G{02, 12}_Interrupt_Enable_Bits
Convert these enums into defines and rename the CamelCase symbols.
For aesthetics, move the new defines so they are associated with
the register define.
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>
H Hartley Sweeten [Mon, 28 Jul 2014 17:26:59 +0000 (10:26 -0700)]
staging: comedi: ni_tio: tidy up Gi_Status_Bits
Convert this enum into defines and rename the CamelCase symbols.
For aesthetics, move the new defines so they are associated with
the register define.
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>
H Hartley Sweeten [Mon, 28 Jul 2014 17:26:58 +0000 (10:26 -0700)]
staging: comedi: ni_tio: tidy up Gxx_Interrupt_Acknowledge_Bits
Convert this enum and the others related to it into defines and
rename the CamelCase symbols.
For aesthetics, move the new defines so they are associated with
the register define.
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>
H Hartley Sweeten [Mon, 28 Jul 2014 17:26:57 +0000 (10:26 -0700)]
staging: comedi: ni_tio: tidy up Gi_DMA_Status_Reg_Bits
Convert this enum into defines and rename the CamelCase symbols.
For aesthetics, move the new defines so they are associated with
the register define.
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>
H Hartley Sweeten [Mon, 28 Jul 2014 17:26:56 +0000 (10:26 -0700)]
staging: comedi: ni_tio: tidy up Gi_DMA_Config_Reg_Bits
Convert this enum into defines and rename the CamelCase symbols.
For aesthetics, move the new defines so they are associated with
the register define.
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>
H Hartley Sweeten [Mon, 28 Jul 2014 17:26:55 +0000 (10:26 -0700)]
staging: comedi: ni_tio: tidy up Gxx_Joint_Status2_Bits
Convert this enum into defines and rename the CamelCase symbols.
For aesthetics, move the new defines so they are associated with
the register define.
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>
H Hartley Sweeten [Mon, 28 Jul 2014 17:26:54 +0000 (10:26 -0700)]
staging: comedi: ni_tio: tidy up Gi_Reset_Bit
Convert this inline CamelCase function into a define.
For aesthetics, move the new define so it is associated with the
register define.
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>
H Hartley Sweeten [Mon, 28 Jul 2014 17:26:53 +0000 (10:26 -0700)]
staging: comedi: ni_tio: tidy up Gxx_Status_Bits
Convert this enum into defines and rename the CamelCase symbols.
For aesthetics, move the new defines so they are associated with
the register define.
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>
H Hartley Sweeten [Mon, 28 Jul 2014 17:26:52 +0000 (10:26 -0700)]
staging: comedi: ni_tio: tidy up Gi_Second_Gate_Bits
Convert this enum into defines and rename the CamelCase symbols.
For aesthetics, move the new defines so they are associated with
the register define.
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>
H Hartley Sweeten [Mon, 28 Jul 2014 17:26:51 +0000 (10:26 -0700)]
staging: comedi: ni_tio: tidy up Gi_Mode_Bits
Convert this enum into defines and rename the CamelCase symbols.
For aesthetics, move the new defines so they are associated with
the register define.
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>
H Hartley Sweeten [Mon, 28 Jul 2014 17:26:50 +0000 (10:26 -0700)]
staging: comedi: ni_tio: tidy up Gi_Input_Select_Bits
Convert this enum into defines and rename the CamelCase symbols.
For aesthetics, move the new defines so they are associated with
the register define.
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>
H Hartley Sweeten [Mon, 28 Jul 2014 17:26:49 +0000 (10:26 -0700)]
staging: comedi: ni_tio: tidy up Gi_Auto_Increment_Reg_Bits
Convert this enum into defines and rename the CamelCase symbols.
For aesthetics, move the new defines so they are associated with
the register define.
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>
H Hartley Sweeten [Mon, 28 Jul 2014 17:26:48 +0000 (10:26 -0700)]
staging: comedi: ni_tio: tidy up Gi_Command_Reg_Bits
Convert this enum into defines and rename all the CamelCase symbols.
For aesthetics, move the new defines so they are associated with the
register define.
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>
H Hartley Sweeten [Mon, 28 Jul 2014 17:26:47 +0000 (10:26 -0700)]
staging: comedi: ni_tio: tidy up Gi_Counting_Mode_Reg_Bits
Convert this enum into defines and rename all the CamelCase symbols.
For aesthetics, move the new defines so they are associated with the
register define.
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>
H Hartley Sweeten [Mon, 28 Jul 2014 17:26:46 +0000 (10:26 -0700)]
staging: comedi: ni_tio: tidy up ni_tio_read_sw_save_reg()
Remove the need for some of the local variables.
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>
Ian Abbott [Mon, 28 Jul 2014 12:09:35 +0000 (13:09 +0100)]
staging: comedi: amplc_pc236, amplc_pci236: get rid of bustype
The `bustype` member of `struct pc236_board` variables is initialized,
but never used. Remove it along with the enumerated constants
associated with it.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Mon, 28 Jul 2014 12:09:34 +0000 (13:09 +0100)]
staging: comedi: amplc_pc236: split into ISA, PCI and common module
The "amplc_pc236" driver currently handles both ISA and PCI devices and
uses a small amount of conditional compilation depending which are
enabled.
Move most of the functionality into a new module, "amplc_pc236_common",
and split off support for PCI devices into a new module, "amplc_pci236".
Retain support for ISA devices in the existing module, "amplc_pc236".
Since the `detach` handler (`pc236_detach()`) in the existing module
"amplc_pc236" now only needs to handle ISA devices and only calls
`comedi_legacy_detach()`, just use `comedi_legacy_detach()` directly as
the `detach` handler in `struct comedi_driver amplc_pc236_driver`.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Mon, 28 Jul 2014 12:09:33 +0000 (13:09 +0100)]
staging: comedi: amplc_pc236: add callback to check and clear interrupt
Add an optional callback function pointer to the board data to be called
when checking if an interrupt has occurred and to clear it if it has.
Since the callback returns `bool`, change a few other `int` values to
`bool` to match.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Mon, 28 Jul 2014 12:09:32 +0000 (13:09 +0100)]
staging: comedi: amplc_pc236: combine interrupt enable/disable functions
`pc236_intr_enable()` and `pc236_intr_disable()` are very similar.
Combine them into a single function `pc236_intr_update()` with a
parameter to indicate whether interrupts are being enabled or disabled.
Change type type of the `enable_irq` member of the private data to
`bool` to match the parameter.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Mon, 28 Jul 2014 12:09:31 +0000 (13:09 +0100)]
staging: comedi: amplc_pc236: add callback to enable/disable interrupt
Add an optional callback function pointer to the board data to be called
when interrupts are logically enabled or disabled to update the hardware
registers.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Mon, 28 Jul 2014 12:09:30 +0000 (13:09 +0100)]
staging: comedi: amplc_pc236: don't disable h/w interrupt on detach()
If an asynchronous command was running when the device is being
detached, the comedi core would have called the subdevice `cancel`
handler (`pc236_intr_cancel()`) before calling the `detach` handler
(`pc236_detach()`). Since the cancel handler disables hardware
interrupts (at least for the PCI236 board) by calling
`pc236_disable_intr()`, there is no need for the detach handler to do so
as well. Remove the call to `pc236_disable_intr()` from
`pc236_detach()`.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Mon, 28 Jul 2014 12:09:29 +0000 (13:09 +0100)]
staging: comedi: amplc_pc236: move static board data
Move the static board data in `pc236_isa_boards[]` and `pc236_pci_board`
closer to where they are used.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Fri, 25 Jul 2014 17:07:09 +0000 (18:07 +0100)]
staging: comedi: amplc_dio200_pci: no need to test board pointer in dio200_pci_detach()
`dio200_pci_detach()` doesn't need to check if the pointer to constant
board data (`thisboard`) and the pointer to private per-device data
(`devpriv`) are valid before calling `amplc_dio200_common_detach()`. It
has no further need to check `thisboard` so remove the variable
altogether. Move the test of `devpriv` to the first point it is needs
to be valid.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Fri, 25 Jul 2014 17:07:08 +0000 (18:07 +0100)]
staging: comedi: amplc_dio200_common: remove some tests from amplc_dio200_common_detach()
`amplc_dio200_common_detach()` doesn't do much apart from freeing the
IRQ handler that was requested by `amplc_dio200_common_attach()` if
`dev->irq` is non-zero. There is no need to check if the pointer to
the constant board data or the pointer to private per-device data
exist, so remove those tests.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Fri, 25 Jul 2014 17:07:07 +0000 (18:07 +0100)]
staging: comedi: amplc_dio200_common: prevent extra free_irq()
`dio200_detach()` in "amplc_dio200.c" calls
`amplc_dio200_common_detach()` in "amplc_dio200_common.c", followed by
`comedi_legacy_detach()` in "../drivers.c". Both of those functions
call `free_irq()` if `dev->irq` is non-zero. The second call produces a
warning message because the handler has already been freed. Prevent
that by setting `dev->irq = 0` in `amplc_dio200_common_detach()`.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Max Vozeler [Mon, 28 Jul 2014 11:28:10 +0000 (13:28 +0200)]
staging: usbip: remove redundant return statements
Remove redundant return statements at the end of void functions. This
addresses the checkpatch.pl warnings:
WARNING: void function return statements are not generally useful
Signed-off-by: Max Vozeler <max@hinterhof.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Rahul Garg [Mon, 28 Jul 2014 01:32:32 +0000 (07:02 +0530)]
staging: vt6655: coding style: Fixed commenting style
fix coding style: use C89 comments, not C99
Signed-off-by: Rahul Garg <rahul.lnmiit@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Guillaume Clement [Fri, 25 Jul 2014 12:47:23 +0000 (14:47 +0200)]
staging: vt6655: fix direct dereferencing of user pointer
Sparse reported that the data from tagSCmdRequest is given by
userspace, so it should be tagged as such.
Later, we were memcomparing and dereferencing it without first copying
it, fix that as well.
Signed-off-by: Guillaume Clement <gclement@baobob.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Fabian Frederick [Wed, 23 Jul 2014 19:04:38 +0000 (21:04 +0200)]
staging: ion: vm_insert_pfn and zap_page_range rely on CONFIG_MMU
Fix following sh-allmodconfig errors reported on kisskb
"
drivers/built-in.o: In function `ion_vm_fault':
ion.c:(.text+0x1f2d8f8): undefined reference to `vm_insert_pfn'
drivers/built-in.o: In function `ion_buffer_sync_for_device':
ion.c:(.text+0x1f316bc): undefined reference to `zap_page_range'
make: *** [vmlinux] Error 1
"
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Kristina Martšenko [Sun, 27 Jul 2014 19:59:50 +0000 (22:59 +0300)]
staging: sep: remove driver
Looks like no one's working on the driver anymore, so remove it for now.
If someone wants to work on moving it out of staging, this commit can be
reverted.
Signed-off-by: Kristina Martšenko <kristina.martsenko@gmail.com>
Cc: Alan Cox <alan@linux.intel.com>
Cc: Mark A. Allyn <mark.a.allyn@intel.com>
Cc: Jayant Mangalampalli <jayant.mangalampalli@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Nicolas Thery [Sun, 27 Jul 2014 18:32:06 +0000 (20:32 +0200)]
staging: ft1000: remove procfs entries
This patch started as a fix to some checkpatch complaints in ft1000
procfs code but Greg suggested to remove the procfs entries altogether:
http://driverdev.linuxdriverproject.org/pipermail/driverdev-devel/2014-July/055594.html
Signed-off-by: Nicolas Thery <nthery@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>