Commit Graph

361871 Commits

Author SHA1 Message Date
Andrew Morton b26c05a207 drivers/staging/zcache/zcache-main.c: fix build
flush_dcache_page() takes a page*, not a void*.  It breaks ia64.

Remove this and another unused function.  Warnings remain:

drivers/staging/zcache/zcache-main.c: In function '__check_disable_cleancache':
drivers/staging/zcache/zcache-main.c:1837: warning: return from incompatible pointer type
drivers/staging/zcache/zcache-main.c: In function '__check_disable_frontswap':
drivers/staging/zcache/zcache-main.c:1838: warning: return from incompatible pointer type
drivers/staging/zcache/zcache-main.c: In function '__check_disable_frontswap_ignore_nonactive':
drivers/staging/zcache/zcache-main.c:1842: warning: return from incompatible pointer type

Cc: Dan Magenheimer <dan.magenheimer@oracle.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-26 16:17:54 -07:00
H Hartley Sweeten 7c00782b1d staging: comedi: ni_labpc: fix labpc_calib_insn_write()
The comedi core expects the (*insn_write) operations to write insn->n
values and return the number of values actually wrote.

Make this function work like the core expects.

As Ian Abbott pointed out for the eeprom writes, we really only need
to write the last value to the caldac. The preceding data would be
overwritten anyway.

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>
2013-03-26 16:14:51 -07:00
H Hartley Sweeten 198ac9dc7f staging: comedi: ni_labpc: fix labpc_calib_insn_read()
The comedi core expects the (*insn_read) operations to read insn->n
values and return the number of values actually read.

Make this function work like the core expects.

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>
2013-03-26 16:14:51 -07:00
H Hartley Sweeten 43d092c677 staging: comedi: ni_labpc: simplify labpc_range_is_unipolar()
As Ian Abbott pointed out, this helper function can be simplified
by just checking if the 'min' value is >= 0.

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>
2013-03-26 16:14:51 -07:00
H Hartley Sweeten e7a1aa6282 staging: comedi: ni_labpc: fix labpc_eeprom_insn_write()
The comedi core expects the (*insn_write) operations to write insn->n
values and return the number of values actually wrote.

Make this function work like the core expects.

As Ian Abbott pointed out, we really only need to write the last value
to the eeprom. The preceding data would be overwritten anyway.

Also, remove the noise about invalid channels.

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>
2013-03-26 16:14:51 -07:00
Andres More e1970fce11 staging: vt6656: remove unused functions
Removed defined symbols not being used elsewhere.
Only compile tested.

Signed-off-by: Andres More <more.andres@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-26 16:13:21 -07:00
Masanari Iida d88fe15b2d staging: davinci: Fix typo in staging/media/davinci
Correct spelling typo in staging/media/davinci

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-26 16:13:21 -07:00
Nick Østergaard 318e16b920 staging: wlan-ng: prism2usb.c: fix printk(KERN_ERR... to dev_err(dev, ...
Fix checkpatch warning. Change printk(KERN_ERR ... to dev_err(dev ...

Signed-off-by: Nick Østergaard <oe.nick@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-26 16:13:20 -07:00
Paul Zimmerman ba0e60d18c staging: dwc2: fix wrong setting of DMA masks
We were setting the DMA masks in dwc2_driver_probe(), but that is
before the driver parameters have been set to their default values.
That meant the DMA masks could be set wrong. Fix it by moving the
DMA mask setting into dwc2_hcd_init(), after the driver parameters
have been set.

Reported-by: Matthijs Kooijman <matthijs@stdin.nl>
Signed-off-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-25 17:10:35 -07:00
Paul Zimmerman e62662c7f3 staging: dwc2: remove unneeded arguments from two functions
Remove the unneeded struct device *dev argument from dwc2_hcd_init()
and dwc2_hcd_remove(), and pass in the value through the hsotg->dev
member instead

Signed-off-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-25 17:10:35 -07:00
Matthijs Kooijman 8509f2f43a staging: dwc2: always release host channel after dequeueing
Previously, when an active urb was dequeued, its host channel would
not always be released. There is some special handling for this in
dwc2_hc_chhltd_intr_dma, but when it was the last urb/qtd in its qh, a
safeguard in dwc2_hc_n_intr would short-circuit and prevent the regular
interrupt handlers from running, without releasing the channel.

This is easily triggered when using a 3G modem using the option driver.
Opening and closing any ttyUSBx device will eat up a host channel that
is forever unusable from that point on.

Signed-off-by: Matthijs Kooijman <matthijs@stdin.nl>
[paulz@synopsys.com: fixed comment style and added a couple of NULL checks]
Signed-off-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-25 16:32:46 -07:00
Malcolm Priestley 257f658015 staging: vt6656: Fix stuck in scanning with variable uScanChannel.
When pMgmt->uScanChannel > pDevice->byMaxChannel scanning ends
but no SIOCGIWSCAN(scan done) message is sent. This section of code is
duplicate of that in WLAN_CMD_SCAN_END which sends scan done.
So remove it and jump eCommandState to WLAN_CMD_SCAN_END.

Increment uScanChannel on !ChannelValid.

At WLAN_CMD_SCAN_END reset uScanChannel to 0 when done.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-25 16:32:46 -07:00
H Hartley Sweeten c5cf4606b6 staging: comedi: s626: remove MC_DISABLE macro
This macro relies on a local variable having a specific name. Replace
it with a new helper function, s626_mc_disable().

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-25 11:44:44 -07:00
H Hartley Sweeten ddd9813e75 staging: comedi: s626: remove MC_ENABLE macro
This macro relies on a local variable having a specific name. Replace
it with a new helper function, s626_mc_enable().

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-25 11:44:44 -07:00
H Hartley Sweeten e4632a71fa staging: comedi: s626: #ifdef out a block of unused code
Currently the unused s626_ai_rinsn() function is commented out with
/* ... */ on every line of the function. Remove those by using an

This block will be removed once it is determined that it really
is not needed.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-25 11:44:44 -07:00
H Hartley Sweeten 90d54ff27e staging: comedi: s626: cleanup comedi_lrange table
Reformat the whitespace in the comedi_lrange table and use the
BIP_RANGE() macro instead of generic RANGE() macro.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-25 11:44:44 -07:00
H Hartley Sweeten 0b9675d565 staging: comedi: s626: factor counter interrupt handling from s626_irq_handler()
Factor the code that handles the counter interrupt out of s626_irq_handler().

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-25 11:44:44 -07:00
H Hartley Sweeten 4c2d13e07d staging: comedi: s626: factor eos interrupt handling from s626_irq_handler()
Factor the code that handles the end of scan interrupt out of
s626_irq_handler().

Remove the printk noise when cfc_write_to_buffer() fails. The user
can't do anything about it anyway.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-25 11:44:44 -07:00
H Hartley Sweeten 3b00b8570a staging: comedi: s626: use a local var for the s->async in s626_irq_handler()
The comedi_async pointer is used a number of times in this function.
For aesthetic reasons, use a local variable for the pointer.

Also, since was already have a pointer to the "cmd" use that in the
for loop instead of s->async->cmd (or even async->cmd).

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-25 11:44:44 -07:00
H Hartley Sweeten abafc9e851 staging: comedi: s626: cleanup "subdevice" and "cmd" in s626_irq_handler()
The comedi_subdevice in this function is actually the dev->read_subdev
that was initialized during the attach of the board. Use that instead
of accessing the dev->subdevices array directly.

Also, get the comedi_cmd used in s626_irq_handler() when the function
is first entered.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-25 11:44:43 -07:00
H Hartley Sweeten 65a17c2913 staging: comedi: s626: factor dio interrupt handling from s626_irq_handler()
Factor the code that checks and handles the dio interrupts out of
s626_irq_handler().

This allows reducing the number of indents in the code and makes it
easier to follow.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-25 11:44:43 -07:00
H Hartley Sweeten 100b4edcad staging: comedi: s626: simplify dio register access
This driver has three dio subdevices, each with 16 channels. These
subdevices use hardware registers that are spaced 0x10 bytes apart
for each "group" of 16 channels.

Create new macros to get the correct addresses for each register
based on the dio "group". Use the s->private (void *) to hold the
"group" number to use in the subdevice functions.

This allows removing struct dio_private and all its uses. It also
removes the ugly casts used to get the register address.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-25 11:44:43 -07:00
H Hartley Sweeten 1330af4c7d staging: comedi: ni_labpc: fix labpc_eeprom_insn_read()
The comedi core expects the (*insn_read) operations to read insn->n
values and return the number of values actually read.

Make this function work like the core expects.

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>
2013-03-25 11:43:02 -07:00
H Hartley Sweeten 63a93381ef staging: comedi: ni_labpc: return bool from labpc_use_continuous_mode()
This is a simple true/false test, return bool instead of int.

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>
2013-03-25 11:43:02 -07:00
H Hartley Sweeten 58cd9b91f8 staging: comedi: ni_labpc: cleanup trigger setting in labpc_ai_cmd()
The (*do_cmdtest) already validated the cmd sources so the default
cases in the switch() statements can never happen.

Preclear to trigger bits and change the switch() statements to simple
if() tests to set the bits.

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>
2013-03-25 11:43:02 -07:00
H Hartley Sweeten 83d75effa7 staging: comedi: ni_labpc: remove board attach noise
Remove the kernel noise in labpc_common_attach() as well as a couple
obvious comments.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-25 11:43:01 -07:00
H Hartley Sweeten 290899082a staging: comedi: ni_labpc: dma requires an interrupt
DMA support only works if an interrupt is available.

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>
2013-03-25 11:43:01 -07:00
H Hartley Sweeten 19a40abf5e staging: comedi: ni_labpc: allow board to attach without dma
If the dma channel is not available this driver will still work
with interrupts for the analog input subdevice command support.

In addition, only dma channels 1 and 3 are valid for the ISA
devices.

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>
2013-03-25 11:43:01 -07:00
H Hartley Sweeten 0229979a32 staging: comedi: ni_labpc: allow board to attach without interrupt
If the interrupt is not available this driver will still work
with command support disabled for the analog input 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>
2013-03-25 11:42:59 -07:00
H Hartley Sweeten f06563f013 staging: comedi: ni_labpc: return error from labpc_counter_set_mode()
Make sure labpc_counter_set_mode() was successfull and return any
errno back to the caller.

For the if/else conditions that either load the counter of just set
the mode, use a common error patch to check for the error.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-25 11:42:59 -07:00
H Hartley Sweeten fbca05d601 staging: comedi: ni_labpc: cleanup labpc_counter_load() usage
For aesthetic reasons, move the labpc_counter_load() function so
it's by the labpc_counter_set_mode() function.

Update all the labpc_counter_load() calls so that the I8254_MODE*
enums are used instead of the open coded 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>
2013-03-25 11:42:59 -07:00
H Hartley Sweeten 463f930401 staging: comedi: ni_labpc: introduce labpc_counter_set_mode()
Introduce labpc_counter_set_mode() which is a wrapper around the
i8254_set_mode() helpers to program the 8254 timers. Use the new
function instead of directly writing to the timer mode register
with a "magic" number.

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>
2013-03-25 11:42:59 -07:00
H Hartley Sweeten 161ce6fa4b staging: comedi: ni_labpc: remove inline from labpc_counter_load()
Let the compiler figure out if this function should be inlined.

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>
2013-03-25 11:42:59 -07:00
H Hartley Sweeten 488ec9f12d staging: comedi: ni_labpc: move a couple of the #define's
For aesthetic reasons, move a couple of the #defines in this file
so that the register map defines are first.

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>
2013-03-25 11:42:59 -07:00
H Hartley Sweeten 42cb6a82a9 staging: comedi: ni_labpc: clean up register map
Rename the register map defines to better match the National
Instruments Register-Level Programming Manual for the labpc.

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>
2013-03-25 11:42:59 -07:00
H Hartley Sweeten 3192239417 staging: comedi: ni_labpc: clean up multi-line comments
Clean up the multi-line comments at the beginning of the file
so that they follow the CodingStyle.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-25 11:42:59 -07:00
H Hartley Sweeten d5c8d9c411 staging: comedi: ni_labpc: fix a > 80 char line issue
Fix a checkpatch.pl warning about a line over 80 characters.

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>
2013-03-25 11:42:58 -07:00
H Hartley Sweeten 810c73c7e7 staging: comedi: ni_labpc: introduce labpc_ai_wait_for_data()
Introduce a helper function to wait for the a/d conversion to
complete.

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>
2013-03-25 11:42:58 -07:00
H Hartley Sweeten 3c4dfac8f7 staging: comedi: ni_labpc: introduce labpc_read_adc_fifo()
Introduce a helper function to read the a/d conversion result
from the fifo.

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>
2013-03-25 11:42:58 -07:00
H Hartley Sweeten 359553bb3b staging: comedi: ni_labpc: introduce labpc_setup_cmd6_reg()
Introduce a helper function to set the COMMAND6_REG.

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>
2013-03-25 11:42:58 -07:00
H Hartley Sweeten 8a498667b6 staging: comedi: ni_labpc:use labpc_cancel() to remove some common code
The labpc_cancel() function can be used by the labpc_ai_insn_read() and
labpc_ai_cmd() functions to disable the ai 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>
2013-03-25 11:42:58 -07:00
H Hartley Sweeten 8c2bc333af staging: comedi: ni_labpc: introduce labpc_ai_set_chan_and_gain()
Introduce a helper function to set the channel and gain bits in the
COMMAND1_REG.

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>
2013-03-25 11:42:58 -07:00
H Hartley Sweeten 73f2b1d26f staging: comedi: ni_labpc: cleanup local var declarations in labpc_ai_insn_read()
Determine the chan, range, and aref when the variables are declared.

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>
2013-03-25 11:42:58 -07:00
H Hartley Sweeten 8a67a67f45 staging: comedi: ni_labpc: cleanup local var declarations in labpc_ai_cmd()
Determine the scan_mode early and get the proper chanspec so that
the chan, range, and aref can be determined when the variables are
declared.

labpc_ai_chanlist_invalid() checks that all the range and aref values
in the chanlist are the same so, for consistency, use the same chanspec
used to get the chan.

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>
2013-03-25 11:42:58 -07:00
H Hartley Sweeten 9718e5dfd7 staging: comedi: ni_labpc: remove unnecessary test of dev->irq
The ai subdevice (*do_cmd) pointer is only initialized if the
driver has successfully requested the interrupt. The extra test
in labpc_ai_cmd() is not necessary.

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>
2013-03-25 11:42:57 -07:00
H Hartley Sweeten fe7fc72af7 staging: comedi: ni_labpc: move declaration of local var 'irq_flags'
In labpc_ai_cmd(), move the declaration of the local variable
'irq_flags' to remove the need for the extra #ifdef/#endif.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-25 11:41:52 -07:00
H Hartley Sweeten 147a85d7db staging: comedi: ni_labpc: remove DRV_NAME
Remove the DRV_NAME define and just open code the string in the
comedi_driver and pci_driver declarations.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-25 11:41:52 -07:00
H Hartley Sweeten 7b09c9f63d staging: comedi: ni_labpc: use dev->board_name instead of DRV_NAME
In labpc_common_attach(), initialize the dev->board_name early and
use that instead of DRV_NAME when allocating the resources.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-25 11:41:51 -07:00
H Hartley Sweeten cacedd0ce5 staging: comedi: ni_labpc: move declaration of local var 'dma_flags'
In labpc_common_attach(), move the declaration of the local variable
'dma_flags' to remove the need for the extra #ifdef/#endif.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-25 11:41:51 -07:00
H Hartley Sweeten 7d47f0f4c6 staging: comedi: ni_labpc: tidy up subdevice init
Add some whitespace to the subdevice init.

Remove the unnecessary comment about adding command support to
the analog input subdevice and change the 'maxdata' value to hex
as this is more common in comedi drivers.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-25 11:41:51 -07:00