platform/adaptation/renesas_rcar/renesas_kernel.git
10 years agostaging: comedi: ii_pci20kc.c: break up the subdevice private data union
H Hartley Sweeten [Wed, 24 Jul 2013 19:12:30 +0000 (12:12 -0700)]
staging: comedi: ii_pci20kc.c: break up the subdevice private data union

The union used for the subdevice private data just adds confusion.
Split the union into two separate private data structs.

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>
10 years agostaging: comedi: ii_pci20kc.c: remove 'iobase' from the subdevice private data
H Hartley Sweeten [Wed, 24 Jul 2013 19:12:09 +0000 (12:12 -0700)]
staging: comedi: ii_pci20kc.c: remove 'iobase' from the subdevice private data

The 'iobase' can be calculated when needed. Remove it from the
subdevice 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>
10 years agostaging: comedi: ii_pci20kc.c: tidy up the subdevice module init
H Hartley Sweeten [Wed, 24 Jul 2013 19:11:47 +0000 (12:11 -0700)]
staging: comedi: ii_pci20kc.c: tidy up the subdevice module init

Use the carrier board id to determine if a module is installed for
a given subdevice.

Consolidate the module init code into ii20k_init_module().

For aesthetic reasons, rename the subdevice functions to remove
'pci' from 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>
10 years agostaging: comedi: ii_pci20kc.c: cleanup the dio subdevice
H Hartley Sweeten [Wed, 24 Jul 2013 19:11:25 +0000 (12:11 -0700)]
staging: comedi: ii_pci20kc.c: cleanup the dio subdevice

For asethetics, redefine the register map for the carrier board.
The 'PCI*' names lead one to think this is a PCI board not a
legacy ISA board.

Remove the #if 0'd out pci20xxx_{do,di}() functions. They are not
needed.

Rename, and fix, the pci20xxx_dio_config() function. The control
and direction registers are not readable. Use the new register map
defines instead of the crazy bit shifts.

Rename, and fix, the pci20xxx_dio_insn_config() function. This
function should treat data[0] as the 'instruction' to handle not
just use it to determine if the port is an input or output.

Rename, and tix, the pci20xxx_dio_insn_bits() function. The 'state'
only needs to be updated if the 'mask' indicates.

For aesthetics, abosrb the pci20xxx_dio_init() into the (*attach)
function.

Fix the carrier board id detect in the (*attach). There are two carrier
board types, one with 32 dio channels and one without. Use this info
when setting up the dio subdevice.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: ii_pci20kc: remove CHAN macro
H Hartley Sweeten [Wed, 24 Jul 2013 19:11:00 +0000 (12:11 -0700)]
staging: comedi: ii_pci20kc: remove CHAN macro

This macro is not used, and it looks to much like the comedi CR_CHAN
macro. 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>
10 years agostaging: comedi: ii_pci20kc: move comedi_lrange tables
H Hartley Sweeten [Wed, 24 Jul 2013 19:10:41 +0000 (12:10 -0700)]
staging: comedi: ii_pci20kc: move comedi_lrange tables

For aesthetic reasons, move the static const data to the head of
the file.

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>
10 years agostaging: comedi: ii_pci20kc: remove forward declarations 3
H Hartley Sweeten [Wed, 24 Jul 2013 19:10:18 +0000 (12:10 -0700)]
staging: comedi: ii_pci20kc: remove forward declarations 3

Move a couple functions to remove the need for the last forward
declarations.

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>
10 years agostaging: comedi: ii_pci20kc: remove forward declarations 2
H Hartley Sweeten [Wed, 24 Jul 2013 19:09:53 +0000 (12:09 -0700)]
staging: comedi: ii_pci20kc: remove forward declarations 2

Move the pci20xxx_dio_*() functions to remove the need for some of
the forward declarations.

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>
10 years agostaging: comedi: ii_pci20kc: remove forward declarations 1
H Hartley Sweeten [Wed, 24 Jul 2013 19:09:25 +0000 (12:09 -0700)]
staging: comedi: ii_pci20kc: remove forward declarations 1

Move the pci20xxx_attach() and pci20xxx_detach() functions to remove
the need for some of the forward declarations.

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>
10 years agostaging: comedi: ii_pci20kc: use comedi_alloc_spriv()
H Hartley Sweeten [Wed, 24 Jul 2013 19:08:58 +0000 (12:08 -0700)]
staging: comedi: ii_pci20kc: use comedi_alloc_spriv()

For aesthetic reasons, use the helper function to allocate the
subdevice private data instead of hanging it on the device
private data. The core will free the memory during 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>
10 years agostaging: comedi: addi_common.h: cleanup after removal of addi_apci_1710
H Hartley Sweeten [Wed, 24 Jul 2013 18:14:43 +0000 (11:14 -0700)]
staging: comedi: addi_common.h: cleanup after removal of addi_apci_1710

Now that the addi_apci_1710 driver has been removed, get rid of all the
unnecessary stuff in addi_common.h.

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>
10 years agostaging: comedi: addi_apci_1710: delete driver
H Hartley Sweeten [Wed, 24 Jul 2013 18:13:53 +0000 (11:13 -0700)]
staging: comedi: addi_apci_1710: delete driver

This driver is seriously broken and most of it does not "work" with
the comedi API. Just remove it.

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>
10 years agostaging: comedi: addi_apci_1710: separate from addi_common.h
H Hartley Sweeten [Wed, 24 Jul 2013 18:12:35 +0000 (11:12 -0700)]
staging: comedi: addi_apci_1710: separate from addi_common.h

Move the necessary bits from addi_common.h to remove it's dependency
and make this driver standalone.

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>
10 years agostaging: comedi: addi_apci_1710: fix some compile errors/warnings
H Hartley Sweeten [Wed, 24 Jul 2013 18:11:51 +0000 (11:11 -0700)]
staging: comedi: addi_apci_1710: fix some compile errors/warnings

Fix a couple comments within comments errors.

Remove the #include of eddi_eeprom.c. This driver does not use it.

Remove an unused local variable.

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>
10 years agostaging: comedi: adv_pci1724: remove ao_range_list_1724
H Hartley Sweeten [Wed, 24 Jul 2013 17:03:50 +0000 (10:03 -0700)]
staging: comedi: adv_pci1724: remove ao_range_list_1724

All the AO channels have the same ranges. Remove the subdevice
s->range_table_list and just use the s->range_table to setup the
ranges.

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>
10 years agostaging: comedi: range: tidy up comedi_check_chanlist()
H Hartley Sweeten [Wed, 24 Jul 2013 17:00:45 +0000 (10:00 -0700)]
staging: comedi: range: tidy up comedi_check_chanlist()

The only difference in the if() and else if() check of the chanlist
is the source of the range table length. Consolidate the checks to
make the function a bit more concise.

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>
10 years agostaging: comedi: usbdux: tidy up usbdux_ao_cancel()
H Hartley Sweeten [Wed, 24 Jul 2013 21:18:36 +0000 (14:18 -0700)]
staging: comedi: usbdux: tidy up usbdux_ao_cancel()

Rename the local variable used for the private data pointer to the
comedi "norm".

Remove the unnecessary sanity check of the private data pointer. This
function can only be called is the private data was allocated during
the 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>
10 years agostaging: comedi: usbdux: tidy up usbdux_ao_stop()
H Hartley Sweeten [Wed, 24 Jul 2013 21:18:15 +0000 (14:18 -0700)]
staging: comedi: usbdux: tidy up usbdux_ao_stop()

For aesthetic reasons, pass the comedi_device pointer to this function
instead of the private data pointer. Rename the local variable used
for the private data pointer to the comedi "norm".

Remove the unnecessary sanity check of the private data pointer. This
function can only be called is the private data was allocated during
the 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>
10 years agostaging: comedi: usbdux: tidy up usbdux_ai_cancel()
H Hartley Sweeten [Wed, 24 Jul 2013 21:17:50 +0000 (14:17 -0700)]
staging: comedi: usbdux: tidy up usbdux_ai_cancel()

Rename the local variable used for the private data pointer to the
comedi "norm".

Remove the unnecessary sanity check of the private data pointer. This
function can only be called is the private data was allocated during
the 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>
10 years agostaging: comedi: usbdux: tidy up usbdux_ai_stop()
H Hartley Sweeten [Wed, 24 Jul 2013 21:17:23 +0000 (14:17 -0700)]
staging: comedi: usbdux: tidy up usbdux_ai_stop()

For aesthetic reasons, pass the comedi_device pointer to this function
instead of the private data pointer. Rename the local variable used
for the private data pointer to the comedi "norm".

Remove the unnecessary sanity check of the private data pointer. This
function can only be called is the private data was allocated during
the 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>
10 years agostaging: comedi: usbdux: make private data flags bit-fields
H Hartley Sweeten [Wed, 24 Jul 2013 21:17:05 +0000 (14:17 -0700)]
staging: comedi: usbdux: make private data flags bit-fields

Change the flags in the private data to bit-fields to save a bit of
space.

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>
10 years agostaging: comedi: usbdux: remove 'ifnum' from the private data
H Hartley Sweeten [Wed, 24 Jul 2013 21:16:44 +0000 (14:16 -0700)]
staging: comedi: usbdux: remove 'ifnum' from the private data

The 'ifnum' is only used during the attach of the device. Remove it
from 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>
10 years agostaging: comedi: usbdux: remove usb_device back pointer from private data
H Hartley Sweeten [Wed, 24 Jul 2013 21:16:24 +0000 (14:16 -0700)]
staging: comedi: usbdux: remove usb_device back pointer from private data

The usb_device can be found when needed using the comedi_to_usb_dev()
helper. Use that instead the remove the back pointer from 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>
10 years agostaging: comedi: usbdux: pass comedi_device pointer to usbdux_alloc_usb_buffers()
H Hartley Sweeten [Wed, 24 Jul 2013 21:16:04 +0000 (14:16 -0700)]
staging: comedi: usbdux: pass comedi_device pointer to usbdux_alloc_usb_buffers()

For aesthetic reasons, pass the comedi_device pointer to this function
instead of the private data pointer.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: usbdux: tidy up receive_dux_commands()
H Hartley Sweeten [Wed, 24 Jul 2013 21:15:43 +0000 (14:15 -0700)]
staging: comedi: usbdux: tidy up receive_dux_commands()

For aesthetic reasons, pass the comedi_device pointer to this function
instead of the private data pointer. Rename the local variable used
for the private data pointer to the comedi "norm".

Add a local variable for the usb_device pointer to tidy up the
usb_bulk_msg() call.

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>
10 years agostaging: comedi: usbdux: tidy up send_dux_commands()
H Hartley Sweeten [Wed, 24 Jul 2013 21:15:22 +0000 (14:15 -0700)]
staging: comedi: usbdux: tidy up send_dux_commands()

For aesthetic reasons, pass the comedi_device pointer to this function
instead of the private data pointer. Rename the local variable used
for the private data pointer to the comedi "norm".

Add a local variable for the usb_device pointer to tidy up the
usb_bulk_msg() call.

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>
10 years agostaging: comedi: usbdux: remove 'interface' from private data
H Hartley Sweeten [Wed, 24 Jul 2013 21:15:04 +0000 (14:15 -0700)]
staging: comedi: usbdux: remove 'interface' from private data

This back pointer is only used for a couple dev_printk() messages and
during the detach.

For the dev_printk() we can use the dev->class_dev. In the detach we
can get the usb_interface from the comedi_device.

Do that and remove the back pointer from 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>
10 years agostaging: comedi: usbdux: remove 'comedidev' from private data
H Hartley Sweeten [Wed, 24 Jul 2013 21:14:42 +0000 (14:14 -0700)]
staging: comedi: usbdux: remove 'comedidev' from private data

This back pointer is no longer needed by the driver. Remove it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: usbdux: tidy up usbduxsub_submit_pwm_urbs()
H Hartley Sweeten [Wed, 24 Jul 2013 21:13:34 +0000 (14:13 -0700)]
staging: comedi: usbdux: tidy up usbduxsub_submit_pwm_urbs()

Pass the comedi_device pointer (the urb context) to this function
instead of the private data pointer.

Use a local variable for the urb pointer that is setup and submitted.

Remove the sanity check of the private data. This function can only
get called if the allocation was successful during the 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>
10 years agostaging: comedi: usbdux: tidy up usbduxsub_submit_outurbs()
H Hartley Sweeten [Wed, 24 Jul 2013 21:13:15 +0000 (14:13 -0700)]
staging: comedi: usbdux: tidy up usbduxsub_submit_outurbs()

Pass the comedi_device pointer (the urb context) to this function
instead of the private data pointer.

Use a local variable for the urb pointers that are setup and submitted.

Remove the sanity check of the private data. This function can only
get called if the allocation was successful during the 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>
10 years agostaging: comedi: usbdux: tidy up usbduxsub_submit_inurbs()
H Hartley Sweeten [Wed, 24 Jul 2013 21:12:35 +0000 (14:12 -0700)]
staging: comedi: usbdux: tidy up usbduxsub_submit_inurbs()

Pass the comedi_device pointer (the urb context) to this function
instead of the private data pointer.

Use a local variable for the urb pointers that are setup and submitted.

Remove the sanity check of the private data. This function can only
get called if the allocation was successful during the 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>
10 years agostaging: comedi: usbdux: remove dev_printk() noise
H Hartley Sweeten [Wed, 24 Jul 2013 21:12:14 +0000 (14:12 -0700)]
staging: comedi: usbdux: remove dev_printk() noise

Most of these are just function trace noise. The rest report errors
that the user can't do anything about so they amount to 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>
10 years agostaging: comedi: usbdux: tidy up the comedi_lrange tables
H Hartley Sweeten [Wed, 24 Jul 2013 21:11:53 +0000 (14:11 -0700)]
staging: comedi: usbdux: tidy up the comedi_lrange tables

Cleanup the whitespace in the tables.

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>
10 years agostaging: comedi: usbdux: remove the SUBDEV_* defines
H Hartley Sweeten [Wed, 24 Jul 2013 21:11:33 +0000 (14:11 -0700)]
staging: comedi: usbdux: remove the SUBDEV_* defines

These defines are only used to index the dev->subdevices array
during the attach. It's cleaner to 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>
10 years agostaging: comedi: usbdux: tidy up usbduxsub_pwm_irq()
H Hartley Sweeten [Wed, 24 Jul 2013 21:11:14 +0000 (14:11 -0700)]
staging: comedi: usbdux: tidy up usbduxsub_pwm_irq()

Rename the local variables to the comedi "norm".

Use dev->class_dev as the device for all dev_printk() 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>
10 years agostaging: comedi: usbdux: tidy up usbduxsub_ao_isoc_irq()
H Hartley Sweeten [Wed, 24 Jul 2013 21:10:54 +0000 (14:10 -0700)]
staging: comedi: usbdux: tidy up usbduxsub_ao_isoc_irq()

Rename the local variables to the comedi "norm".

The comedi_subdevice in this function is actually the dev->write_subdev
that was initialized in the attach. Use that instead of accessing the
dev->subdevices array directly.

Use dev->class_dev as the device for all dev_printk() messages.

Instead of using the 'comedidev' back pointer in the private data, use
the comedi_device 'dev' that we already have.

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>
10 years agostaging: comedi: usbdux: tidy up usbduxsub_ai_isoc_irq()
H Hartley Sweeten [Wed, 24 Jul 2013 21:10:32 +0000 (14:10 -0700)]
staging: comedi: usbdux: tidy up usbduxsub_ai_isoc_irq()

Rename the local variables to the comedi "norm".

The comedi_subdevice in this function is actually the dev->read_subdev
that was initialized in the attach. Use that instead of accessing the
dev->subdevices array directly.

Use dev->class_dev as the device for all dev_printk() messages.

Instead of using the 'comedidev' back pointer in the private data, use
the comedi_device 'dev' that we already have.

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>
10 years agostaging: comedi: usbdux: absorb usbdux_attach_common into caller
H Hartley Sweeten [Wed, 24 Jul 2013 21:10:11 +0000 (14:10 -0700)]
staging: comedi: usbdux: absorb usbdux_attach_common into caller

This function is only called by usbdux_auto_attach(), absorb it.

Also, there is no reason to down/up the semaphore during the attach.
None of the subdevices are functioning yet so there are no commands
being sent to the usb device.

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>
10 years agostaging: comedi: usbdux: tidy up usbdux_attach_common()
H Hartley Sweeten [Wed, 24 Jul 2013 21:09:51 +0000 (14:09 -0700)]
staging: comedi: usbdux: tidy up usbdux_attach_common()

Rename the local variable used for the device private data.

Move the setting of the device private data 'comedidev' to the
(*auto_attach) where the other back pointers are set.

Tidy up the subdevice init by removing the unnecessary comments
and adding some whitespace.

Remove the unnecessary dev_info() after a sucessful 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>
10 years agostaging: comedi: usbdux: remove NOISY_DUX_DEBUGBUG
H Hartley Sweeten [Wed, 24 Jul 2013 21:09:24 +0000 (14:09 -0700)]
staging: comedi: usbdux: remove NOISY_DUX_DEBUGBUG

This define enables printing of the 'dux_commands' that is sent to
the usb device in send_dux_commands(). This type of development
debug should not be left in the final 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>
10 years agostaging: comedi: usbdux: cleanup the (*detach)
H Hartley Sweeten [Wed, 24 Jul 2013 21:09:04 +0000 (14:09 -0700)]
staging: comedi: usbdux: cleanup the (*detach)

The tidy_up() function is only called by the (*detach). That function
unlinks any running urbs and frees all the allocated urbs and buffers
used by the driver.

Rename tidy_up() to usbdux_free_usb_buffers() and move all the parts
that don't deal with the freeing of the buffers directly into the
(*detach).

Also, remove all the unnecessary clearing of the pointers. The comedi
core will kfree() the private data after calling the (*detach).

Foe aesthetic reasons, do the kfree()'ing of the buffers and urbs in
the reverse order that they were allocated.

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>
10 years agostaging: comedi: usbdux: remove unnecessary tidy_up() calls
H Hartley Sweeten [Wed, 24 Jul 2013 21:08:43 +0000 (14:08 -0700)]
staging: comedi: usbdux: remove unnecessary tidy_up() calls

If the comedi_driver (*auto_attach) fails, the comedi core will call
the (*detach) function to do any cleanup. It's not necessary to do
the cleanup 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>
10 years agostaging: comedi: usbdux: push usb (*probe) into comedi (*auto_attach)
H Hartley Sweeten [Wed, 24 Jul 2013 21:08:24 +0000 (14:08 -0700)]
staging: comedi: usbdux: push usb (*probe) into comedi (*auto_attach)

The usb_driver (*probe) calls comedi_usb_auto_config() after finding a
free slot for the static private data and doind some initial allocation
and setup. The comedi_usb_auto_config() will then call the comedi_driver
(*auto_attach).

Move all the probe/auto_attach into the comedi_driver and just have the
usb_driver call comedi_usb_auto_config(). This allows the comedi_driver
to allocate the private data and removes the need for the static array
and the semaphore that protects it.

Since all the probe/auto_attach is now handled by the comedi_driver, we
can also remove the 'attached' and 'probed' information from the private
data. The subdevice functions will only be hooked up if the usb device
has been probed and the comedi device is attached.

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>
10 years agostaging: comedi: usbdux: push usb (*disconnect) into comedi (*detach)
H Hartley Sweeten [Wed, 24 Jul 2013 21:08:02 +0000 (14:08 -0700)]
staging: comedi: usbdux: push usb (*disconnect) into comedi (*detach)

The usb_driver (*disconnect) calls comedi_usb_auto_unconfig() which will
call the comedi_driver (*detach). Just move all the disconnect/detach
into the comedi_driver and use comedi_usb_auto_unconfig() 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>
10 years agostaging: comedi: usbdux: move usb buffer allocation into new function
H Hartley Sweeten [Wed, 24 Jul 2013 21:07:39 +0000 (14:07 -0700)]
staging: comedi: usbdux: move usb buffer allocation into new function

Move all the usb buffer allocation code in the usb_driver (*probe)
into a new function, usbdux_alloc_usb_buffers(). This allows tidying
up the error path 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>
10 years agostaging: comedi: usbdux: tidy up usbdux_usb_probe()
H Hartley Sweeten [Wed, 24 Jul 2013 21:07:18 +0000 (14:07 -0700)]
staging: comedi: usbdux: tidy up usbdux_usb_probe()

Use a pointer to the struct usbdux_private data being configured
in the probe. Also use a pointer to the struct urb being setup in
the buffer allocations.

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>
10 years agostaging: comedi: usbdux: remove the usb_driver (*probe) noise
H Hartley Sweeten [Wed, 24 Jul 2013 21:06:58 +0000 (14:06 -0700)]
staging: comedi: usbdux: remove the usb_driver (*probe) noise

The dev_dbg() during the usb_driver (*probe) is just added noise.

The dev_err() when a usb_alloc_urb() fails is not necessary. The
allocation failure will have already output a message.

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>
10 years agostaging: comedi: usbdux: rename struct usbduxsub
H Hartley Sweeten [Wed, 24 Jul 2013 21:06:38 +0000 (14:06 -0700)]
staging: comedi: usbdux: rename struct usbduxsub

This struct is the comedi_device private data. For aesthetic reasons,
rename it to usbdux_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>
10 years agostaging: gdm724x: Remove version.h header inclusion in gdm_usb.h
Sachin Kamat [Thu, 25 Jul 2013 06:06:55 +0000 (11:36 +0530)]
staging: gdm724x: Remove version.h header inclusion in gdm_usb.h

version.h header inclusion is not necessary as detected by
versioncheck.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: gdm724x: Remove version.h header inclusion in gdm_usb.c
Sachin Kamat [Thu, 25 Jul 2013 06:06:54 +0000 (11:36 +0530)]
staging: gdm724x: Remove version.h header inclusion in gdm_usb.c

version.h header inclusion is not necessary as detected by
versioncheck.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: gdm724x: Remove version.h header inclusion in gdm_tty.h
Sachin Kamat [Thu, 25 Jul 2013 06:06:53 +0000 (11:36 +0530)]
staging: gdm724x: Remove version.h header inclusion in gdm_tty.h

version.h header inclusion is not necessary as detected by
versioncheck.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: gdm724x: Remove version.h header inclusion in gdm_tty.c
Sachin Kamat [Thu, 25 Jul 2013 06:06:52 +0000 (11:36 +0530)]
staging: gdm724x: Remove version.h header inclusion in gdm_tty.c

version.h header inclusion is not necessary as detected by
versioncheck.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: gdm724x: Remove version.h header inclusion in gdm_mux.c
Sachin Kamat [Thu, 25 Jul 2013 06:06:51 +0000 (11:36 +0530)]
staging: gdm724x: Remove version.h header inclusion in gdm_mux.c

version.h header inclusion is not necessary as detected by
versioncheck.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: gdm724x: Remove version.h header inclusion in gdm_lte.h
Sachin Kamat [Thu, 25 Jul 2013 06:06:50 +0000 (11:36 +0530)]
staging: gdm724x: Remove version.h header inclusion in gdm_lte.h

version.h header inclusion is not necessary as detected by
versioncheck.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: gdm724x: Remove version.h header inclusion in gdm_lte.c
Sachin Kamat [Thu, 25 Jul 2013 06:06:49 +0000 (11:36 +0530)]
staging: gdm724x: Remove version.h header inclusion in gdm_lte.c

version.h header inclusion is not necessary as detected by
versioncheck.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging/lustre: add BLOCK depends in Kconfig
Xiong Zhou [Thu, 25 Jul 2013 07:06:13 +0000 (15:06 +0800)]
staging/lustre: add BLOCK depends in Kconfig

Add BLOCK depends in Kconfig for LUSTRE to fix this:
drivers/staging/lustre/lustre/fid/../include/linux/lustre_compat25.h:117:2:
error: implicit declaration of function â€˜unregister_blkdev’

Signed-off-by: Xiong Zhou <jencce.kernel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: lustre: obdclass: Remove duplicate header file inclusion
Sachin Kamat [Thu, 25 Jul 2013 06:57:27 +0000 (12:27 +0530)]
staging: lustre: obdclass: Remove duplicate header file inclusion

Removed the header file included twice.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: lustre: Remove duplicate header file inclusion in lvfs_linux.c
Sachin Kamat [Thu, 25 Jul 2013 06:57:26 +0000 (12:27 +0530)]
staging: lustre: Remove duplicate header file inclusion in lvfs_linux.c

Removed the header file included twice.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: lustre: Remove duplicate header file inclusion in lmv_obd.c
Sachin Kamat [Thu, 25 Jul 2013 06:57:25 +0000 (12:27 +0530)]
staging: lustre: Remove duplicate header file inclusion in lmv_obd.c

Removed the header file included twice.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: lustre: Remove duplicate header file inclusion in lmv_intent.c
Sachin Kamat [Thu, 25 Jul 2013 06:57:24 +0000 (12:27 +0530)]
staging: lustre: Remove duplicate header file inclusion in lmv_intent.c

Removed the header file included twice.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: lustre: Remove duplicate header file inclusion in lmv_fld.c
Sachin Kamat [Thu, 25 Jul 2013 06:57:23 +0000 (12:27 +0530)]
staging: lustre: Remove duplicate header file inclusion in lmv_fld.c

Removed the header file included twice.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: lustre: Remove duplicate header file inclusion in rw26.c
Sachin Kamat [Thu, 25 Jul 2013 06:57:22 +0000 (12:27 +0530)]
staging: lustre: Remove duplicate header file inclusion in rw26.c

Removed the header files included twice.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: lustre: Remove duplicate header file inclusion in rw.c
Sachin Kamat [Thu, 25 Jul 2013 06:57:21 +0000 (12:27 +0530)]
staging: lustre: Remove duplicate header file inclusion in rw.c

Removed the header files included twice.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: lustre: Remove duplicate header file inclusion in lloop.c
Sachin Kamat [Thu, 25 Jul 2013 06:57:20 +0000 (12:27 +0530)]
staging: lustre: Remove duplicate header file inclusion in lloop.c

Removed the header files included twice.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: lustre: Remove duplicate header file inclusion in llite_mmap.c
Sachin Kamat [Thu, 25 Jul 2013 06:57:19 +0000 (12:27 +0530)]
staging: lustre: Remove duplicate header file inclusion in llite_mmap.c

Removed the header files included twice.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: lustre: Remove duplicate header file inclusion in dir.c
Sachin Kamat [Thu, 25 Jul 2013 06:57:18 +0000 (12:27 +0530)]
staging: lustre: Remove duplicate header file inclusion in dir.c

Removed the header files included twice.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: lustre: linux-tcpip: Remove duplicate header file inclusion
Sachin Kamat [Thu, 25 Jul 2013 06:57:17 +0000 (12:27 +0530)]
staging: lustre: linux-tcpip: Remove duplicate header file inclusion

Removed the header files included twice.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: lustre: libcfs: Remove duplicate inclusion of header file
Sachin Kamat [Thu, 25 Jul 2013 06:57:16 +0000 (12:27 +0530)]
staging: lustre: libcfs: Remove duplicate inclusion of header file

Removed the header files included twice.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: lustre: linux-debug: Remove duplicate inclusion of header file
Sachin Kamat [Thu, 25 Jul 2013 06:57:15 +0000 (12:27 +0530)]
staging: lustre: linux-debug: Remove duplicate inclusion of header file

Removed the header files included twice.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: lustre: obd: Remove duplicate inclusion of header file
Sachin Kamat [Thu, 25 Jul 2013 06:57:14 +0000 (12:27 +0530)]
staging: lustre: obd: Remove duplicate inclusion of header file

Removed the header file included twice.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: lustre: socklnd: Remove duplicate inclusion of header files
Sachin Kamat [Thu, 25 Jul 2013 06:57:13 +0000 (12:27 +0530)]
staging: lustre: socklnd: Remove duplicate inclusion of header files

Removed the header files included twice.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: lustre: o2iblnd: Remove duplicate inclusion of header file
Sachin Kamat [Thu, 25 Jul 2013 06:57:12 +0000 (12:27 +0530)]
staging: lustre: o2iblnd: Remove duplicate inclusion of header file

Removed the header files included twice.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: gdm724x: remove ioctl call
Greg Kroah-Hartman [Thu, 25 Jul 2013 16:37:21 +0000 (09:37 -0700)]
staging: gdm724x: remove ioctl call

This isn't needed, userspace can trigger off of the device id if they
need to do something "special" for different devices in special modes
depending on the device's endian issues.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Won Kang <wonkang@gctsemi.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: gdm724x: prevent module from being built in
Greg Kroah-Hartman [Thu, 25 Jul 2013 05:01:43 +0000 (22:01 -0700)]
staging: gdm724x: prevent module from being built in

There are global symbols here that conflict with the rest of the kernel,
preventing it from being built, so do not allow this module to be built
in.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Won Kang <wonkang@gctsemi.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: gdm724x: Update logging
Joe Perches [Wed, 24 Jul 2013 21:13:03 +0000 (14:13 -0700)]
staging: gdm724x: Update logging

Make the logging prefixes match the module names
by adding #define pr_fmt(fmt) KBUILD_MODNAME and
converting printks to netdev_<level> when a
struct netdevice * is available and and pr_<level>
when not.

Remove embedded prefixes.
Add missing terminating newlines.
Remove an unnecessary rx-dropped message.
Remove an unnecessary temporary variable.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: gdm724x: fix up line lengths in the .h files
Greg Kroah-Hartman [Wed, 24 Jul 2013 20:26:12 +0000 (13:26 -0700)]
staging: gdm724x: fix up line lengths in the .h files

This fixes up the coding style line lengths in the .h files for this
driver.

Cc: Won Kang <wonkang@gctsemi.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: gdm724x: remove unneeded TO_HOST_SUCCESS enum
Greg Kroah-Hartman [Wed, 24 Jul 2013 20:22:29 +0000 (13:22 -0700)]
staging: gdm724x: remove unneeded TO_HOST_SUCCESS enum

0 is always success in the kernel, just use that.

Cc: Won Kang <wonkang@gctsemi.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: gdm724x: add tty stuff to TODO file.
Greg Kroah-Hartman [Wed, 24 Jul 2013 20:16:53 +0000 (13:16 -0700)]
staging: gdm724x: add tty stuff to TODO file.

At the least, this should be dynamic, and all of the tty stuff needs to
be audited really well.

Cc: Won Kang <wonkang@gctsemi.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: gdm724x: gdm_tty: fix tty api build warnings
Greg Kroah-Hartman [Wed, 24 Jul 2013 20:15:23 +0000 (13:15 -0700)]
staging: gdm724x: gdm_tty: fix tty api build warnings

This fixes the build warnings due to changes in the tty api.  Note, I
don't know if the reference counting is correct, but at least there are
no more build warnings.

Also the tty code needs to be reworked, no static arrays of tty devices
and the like...

Cc: Won Kang <wonkang@gctsemi.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: gdm7240: adding LTE USB driver
Won Kang [Wed, 24 Jul 2013 18:36:17 +0000 (03:36 +0900)]
staging: gdm7240: adding LTE USB driver

GCT Semiconductor GDM7240 is 4G LTE chip.
This driver supports GCT reference platform as a USB device.

Signed-off-by: Won Kang <wonkang@gctsemi.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging/lustre: fix build on non-x86
Peng Tao [Wed, 24 Jul 2013 18:08:18 +0000 (02:08 +0800)]
staging/lustre: fix build on non-x86

On non-x86 we will build with Lustre's errno translate code but
it has a few issues.

Cc: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Peng Tao <tao.peng@emc.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging/lustre/obdclass: add obd_target.h
Liu Xuezhao [Wed, 24 Jul 2013 18:08:17 +0000 (02:08 +0800)]
staging/lustre/obdclass: add obd_target.h

Move some server-side data structures form obd.h to obd_target.h.  To
remove some code dependencies use HAVE_SERVER_SUPPORT to protect some
llog/fsfilt_* functions.

Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-1330
Lustre-change: http://review.whamcloud.com/2678
Signed-off-by: Liu Xuezhao <xuezhao.liu@emc.com>
Signed-off-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Peng Tao <bergwolf@gmail.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
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>
10 years agostaging: comedi: mite.h: needs <linux/slab.h>
H Hartley Sweeten [Wed, 24 Jul 2013 19:23:34 +0000 (12:23 -0700)]
staging: comedi: mite.h: needs <linux/slab.h>

As reported by the kbuild test robot:

Commit: 0bdab509bf9c6d838dc0a3b1d68bbf841fc20b5a
staging: comedi: usee comedi_alloc_devpriv

Removed the include of <linux/slab.h> from many of the comedi drivers.
Unfortunately, this header uses kfree() in an inline function.

Instead of adding <linux/slab.h> to each of the drivers that use this
header, include slab.h here.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging/lustre/obdclass: use a dummy structure for lu_ref_link
John L. Hammond [Wed, 24 Jul 2013 17:17:30 +0000 (01:17 +0800)]
staging/lustre/obdclass: use a dummy structure for lu_ref_link

Move the definition of struct lu_ref_link to lu_ref.h.  If USE_LU_REF
is not defined then define it to be the empty struct.  Change the
return type of lu_ref_add() and lu_ref_add_atomic() to void.  Add
lu_ref_add_at() taking same arguments as lu_ref_add() togerther with a
pointer to a struct lu_ref_link and returning void.  Adjust all
structures containing a lu_ref_link pointer to contain a struct
lu_ref_link instead.  Use lu_ref_add_at() and lu_ref_del_at() to
handle embedded lu_ref_links.

[Original patch mainly changes lu_ref.[ch] but in upstream client we don't
have lu_ref code in the hope of moving to kobject refcounting. So the patch
only picks the other pieces of original patch, in order to keep code in
sync and make it easier to port future patches.]

Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3059
Lustre-change: http://review.whamcloud.com/5920
Signed-off-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
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>
10 years agostaging/lustre/llite: fix 'data race condition' issues of lli_flags
Sebastien Buisson [Wed, 24 Jul 2013 17:17:27 +0000 (01:17 +0800)]
staging/lustre/llite: fix 'data race condition' issues of lli_flags

Fix 'data race condition' defects found by Coverity version
6.5.0:
Data race condition (MISSING_LOCK)
Accessing variable without holding lock. Elsewhere,
this variable is accessed with lock held.

lli->lli_flags need to be protected by lli->lli_lock.

Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2744
Lustre-change: http://review.whamcloud.com/6571
Signed-off-by: Sebastien Buisson <sebastien.buisson@bull.net>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
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>
10 years agostaging/lustre: fix 'data race condition' issues in at_reset()
Sebastien Buisson [Wed, 24 Jul 2013 17:17:26 +0000 (01:17 +0800)]
staging/lustre: fix 'data race condition' issues in at_reset()

Fix 'data race condition' defects found by Coverity version
6.5.0:
Data race condition (MISSING_LOCK)
Accessing variable without holding lock. Elsewhere,
this variable is accessed with lock held.

at_reset() needs to take at->at_lock before modifying its members.

Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2744
Lustre-change: http://review.whamcloud.com/6569
Signed-off-by: Sebastien Buisson <sebastien.buisson@bull.net>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
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>
10 years agostaging/lustre/llite: handle io init failure in ll_fault_io_init()
John L. Hammond [Wed, 24 Jul 2013 17:17:25 +0000 (01:17 +0800)]
staging/lustre/llite: handle io init failure in ll_fault_io_init()

In ll_fault_io_init(), if cl_io_init() has failed then cleanup and
return an ERR_PTR(). This fixes an oops in the page fault handling
code when a partially initialized io is used. In ll_page_mkwrite0() do
not call cl_io_fini() on an ERR_PTR().

Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3487
Lustre-change: http://review.whamcloud.com/6735
Signed-off-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
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>
10 years agostaging/lustre/lmv: support DNE with HSM.
Thomas Leibovici [Wed, 24 Jul 2013 17:17:24 +0000 (01:17 +0800)]
staging/lustre/lmv: support DNE with HSM.

Send HSM requests to the appropriate MDT. Split lists of fids of HSM
actions into one list per MDT.
Move kuc registration/unregistration from MDC to LMV as this is not
MDT related.

Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3365
Lustre-change: http://review.whamcloud.com/6714
Signed-off-by: Thomas Leibovici <thomas.leibovici@cea.fr>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: jacques-Charles Lafoucriere <jacques-charles.lafoucriere@cea.fr>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
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>
10 years agostaging: lustre: NR_CPUS is always defined
Greg Kroah-Hartman [Wed, 24 Jul 2013 17:25:17 +0000 (10:25 -0700)]
staging: lustre: NR_CPUS is always defined

So don't redefine it.

Cc: Peng Tao <tao.peng@emc.com>
Cc: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: lustre: a typedef for 'struct miscdevice'???
Greg Kroah-Hartman [Wed, 24 Jul 2013 17:21:26 +0000 (10:21 -0700)]
staging: lustre: a typedef for 'struct miscdevice'???

Come on, that's just silly...

Anyway, remove the typedef and fix up the initializer to use named
fields, otherwise bad things might happen in the future.

Cc: Peng Tao <tao.peng@emc.com>
Cc: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: lustre: don't use time() or CFS_CURRENT_TIME
Greg Kroah-Hartman [Wed, 24 Jul 2013 17:11:47 +0000 (10:11 -0700)]
staging: lustre: don't use time() or CFS_CURRENT_TIME

It's just "CURRENT_TIME", don't redefine a macro for something so simple
as that...

Cc: Peng Tao <tao.peng@emc.com>
Cc: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: lustre: remove [f]printf() macros that aren't being used
Greg Kroah-Hartman [Wed, 24 Jul 2013 17:06:35 +0000 (10:06 -0700)]
staging: lustre: remove [f]printf() macros that aren't being used

This isn't userspace, it's the kernel, luckily these weren't being used,
so just remove them entirely so no one gets any ideas...

Cc: Peng Tao <tao.peng@emc.com>
Cc: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: comedi_buf: needs <linux/vmalloc.h>
H Hartley Sweeten [Wed, 24 Jul 2013 16:55:39 +0000 (09:55 -0700)]
staging: comedi: comedi_buf: needs <linux/vmalloc.h>

As reported by the kbuild test robot:

Commit: ce157f8032bbd46d9427034c335b0afd751da25d
staging: comedi: con't rely on comedidev.h to include headers

Removed most the includes from comedidev.h and pushed only the needed
ones to all the comedi drivers.

This one was missed.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: ni_mio_common: needs <linux/delay.h>
H Hartley Sweeten [Wed, 24 Jul 2013 16:55:00 +0000 (09:55 -0700)]
staging: comedi: ni_mio_common: needs <linux/delay.h>

As reported by the kbuild test robot:

Commit: d92fef8d2552ffde42b6092cb467f3021ebf8b98
staging: comedi: do not include <linux/delay.h> if its not needed

Removed the include from the ni_atmio driver, which did not need it.
Unfortunately, this driver includes ni_mio_common.c, which does need
it.

Add the include of <linux/delay.h> to the ni_mio_common.c source
where it is needed.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: lustre: Remove version.h header inclusion in lproc_osc.c
Sachin Kamat [Wed, 24 Jul 2013 06:36:49 +0000 (12:06 +0530)]
staging: lustre: Remove version.h header inclusion in lproc_osc.c

version.h header inclusion is not necessary as detected by
versioncheck.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: lustre: Remove version.h header inclusion in obd_mount.c
Sachin Kamat [Wed, 24 Jul 2013 06:36:48 +0000 (12:06 +0530)]
staging: lustre: Remove version.h header inclusion in obd_mount.c

version.h header inclusion is not necessary as detected by
versioncheck.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: lustre: Remove version.h header inclusion in linux-sysctl.c
Sachin Kamat [Wed, 24 Jul 2013 06:36:47 +0000 (12:06 +0530)]
staging: lustre: Remove version.h header inclusion in linux-sysctl.c

version.h header inclusion is not necessary as detected by
versioncheck.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: lustre: Remove version.h header inclusion in capa.c
Sachin Kamat [Wed, 24 Jul 2013 06:36:46 +0000 (12:06 +0530)]
staging: lustre: Remove version.h header inclusion in capa.c

version.h header inclusion is not necessary as detected by
versioncheck.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: lustre: Remove version.h header inclusion in lproc_mgc.c
Sachin Kamat [Wed, 24 Jul 2013 06:36:45 +0000 (12:06 +0530)]
staging: lustre: Remove version.h header inclusion in lproc_mgc.c

version.h header inclusion is not necessary as detected by
versioncheck.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: lustre: Remove version.h header inclusion in lproc_mdc.c
Sachin Kamat [Wed, 24 Jul 2013 06:36:44 +0000 (12:06 +0530)]
staging: lustre: Remove version.h header inclusion in lproc_mdc.c

version.h header inclusion is not necessary as detected by
versioncheck.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>