summaryrefslogtreecommitdiff
path: root/drivers/staging/comedi/drivers/ni_daq_700.c
AgeCommit message (Collapse)Author
2017-11-28staging: comedi: drivers: Remove redundant license textGreg Kroah-Hartman
Now that the SPDX tag is in all comedi files, that identifies the license in a specific and legally-defined manner. So the extra GPL text wording can be removed as it is no longer needed at all. This is done on a quest to remove the 700+ different ways that files in the kernel describe the GPL license text. And there's unneeded stuff like the address (sometimes incorrect) for the FSF which is never needed. No copyright headers or other non-license-description text was removed. Cc: Ian Abbott <abbotti@mev.co.uk> Cc: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-28staging: comedi: add SPDX identifiers to all greybus driver filesGreg Kroah-Hartman
It's good to have SPDX identifiers in all files to make it easier to audit the kernel tree for correct licenses. Update the drivers/staging/comedi files files with the correct SPDX license identifier based on the license text in the file itself. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. This work is based on a script and data from Thomas Gleixner, Philippe Ombredanne, and Kate Stewart. Cc: Ian Abbott <abbotti@mev.co.uk> Cc: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Kate Stewart <kstewart@linuxfoundation.org> Cc: Philippe Ombredanne <pombredanne@nexb.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-02-07staging: comedi: ni_daq_700: include new "comedi_pcmcia.h" headerIan Abbott
Include the new "../comedi_pcmcia.h" header instead of <pcmcia/cistpl.h>, <pcmcia/ds.h> and "../comedidev.h", which will now get included indirectly. 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>
2014-07-10staging: comedi: ni_daq_700: remove MODULE_VERSION() and commentaryIan Abbott
We don't module version numbers for in-kernel drivers. The kernel version number is sufficient information. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-20staging: comedi: ni_daq_700: add AI range and input mode switchingFred Brooks
Add support for switching the input range and the single-ended/ differential input mode for the AI subdevice. We needed to clear the FIFO of data before the conversion to handle card mode switching glitches. [ Minor whitespace fixes and driver comment reformatting. - Ian ] Signed-off-by: Fred Brooks <frederick.brooks@microchip.com> 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>
2014-06-18staging: comedi: ni_daq_700: update driver commentIan Abbott
Reformat the comment describing this comedi driver to use the usual block comment format. Also remove reference to digital I/O emulating an 8255, because it doesn't, and remove "DIO only" from the "Description:" line as it also supports analog inputs. 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>
2014-05-24staging: comedi: ni_daq_700: add mux settling delayIan Abbott
I got a patch from the original author, Fred Brooks, to add a small settling delay after setting the AI channel multiplexor. The lack of delay resulted in unstable or scrambled data on faster processors. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reported-by: Fred Brooks <nsaspook@nsaspook.com> Cc: <stable@vger.kernel.org> # 3.7.x - 3.15.x Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-14staging: comedi: move (*insn_{read, write}) timeout debug messages to coreH Hartley Sweeten
Have the comedi core display a standard dev_dbg() message when a timeout occurs and remove all the driver specific 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>
2014-02-14staging: comedi: ni_daq_700: use comedi_timeout()H Hartley Sweeten
Use comedi_timeout() to wait for the analog input end-of-conversion. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-07staging: comedi: drivers: remove final 'attach' messagesH Hartley Sweeten
These messages are just added noise. Remove them. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-17staging: comedi: drivers: use comedi_dio_update_state() for complex casesH Hartley Sweeten
Use comedi_dio_update_state() to handle the boilerplate code to update the subdevice s->state for more complex cases where the hardware is only updated based on the 'mask' of the channels that are modified. 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>
2013-09-17staging: comedi: initialize subdevice s->io_bits in postconfigH Hartley Sweeten
The subdevice 'io_bits' is a bit mask of the i/o configuration for digital subdevices. '0' values indicate that a channel is configured as an input and '1' values that the channel is an output. Since the subdevice data is kzalloc()'d, all channels default as inputs. Modify __comedi_device_postconfig() so that 'io_bits' is correctly initialized for Digital Output subdevices. Remove all the unnecessary initializations of 's->io_bits' from the drivers. Also, remove the unnecessary initialization of the 's->state'. 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>
2013-08-12staging: comedi: drivers: use comedi_dio_insn_config() for simple casesH Hartley Sweeten
Convert the drivers with simple, per channel programmable i/o, to use the comedi_dio_insn_config() helper function. All of these pass a 'mask' of '0' to comedi_dio_insn_config() this causes the per channel mask to be used to configure the i/o direction. 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>
2013-07-23staging: comedi: drivers do not need <linux/ioport.h>H Hartley Sweeten
All the ioport resources are managed by the comedi core. None of the drivers depend on <linux/ioport.h>. Remove the includes. 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-07-23staging: comedi: don't rely on comedidev.h to include headersH Hartley Sweeten
comedidev.h is the main kernel header for comedi. Every comedi driver includes this header which then includes a number of <linux/*> headers. All the drivers need <linux/module.h> and some of them need <linux/delay.h>. The rest are not needed by any of the drivers. Remove all the includes in comedidev.h except for <linux/dma-mapping.h>, which is needed to pick up the enum dma_data_direction for the comedi_subdevice definition, and "comedi.h", which is the uapi header for comedi. Add <linux/module.h> to all the comedi drivers and <linux/delay.h> to the couple that need 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>
2013-07-23staging: comedi: use comedi_alloc_devpriv()H Hartley Sweeten
Use the helper function to allocate memory and set the comedi_device private data pointer. This removes the dependency on slab.h from most of the drivers so remove the global #include in comedidev.h and the local #include in some of the drivers. 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>
2013-06-04staging: comedi: ni_daq_700: fix some trailing whitespace errorsH Hartley Sweeten
checkpatch.pl reports 2 errors about trailing whitespace in this file. Fix 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>
2013-05-13staging: comedi: remove FSF address from boilerplate textH Hartley Sweeten
Addresses change... Remove the paragraph with the FSF address from all the comedi source files. Also, remove the paragraph about the finding the complete GPL in the COPYING file since it's unnecessary. 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-04-08staging: comedi: remove unnecessary dev->board_name initializationH Hartley Sweeten
The dev->board_name is now initialized by the comedi core before calling the(*attach) or (*auto_attach) function in a driver. As long as the driver does no additional probing, it's no longer necessary initialize the board_name. 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>
2013-02-05staging: comedi: comedi_pcmcia: allow drivers to use a custom conf_check()H Hartley Sweeten
Allow comedi pcmcia drivers to use a custom conf_check() when calling comedi_pcmcia_enable() to enable the pcmcia device. If a conf_check() is not passed the internal comedi_pcmcia_conf_check() will be used. 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-02-04staging: comedi: ni_daq_700: use comedi_pcmcia_disable() for (*detach)H Hartley Sweeten
The (*detach) function, daq700_detach() is now a simple wrapper around comedi_pcmcia_disable(). Just use comedi_pcmcia_disable() directly for 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>
2013-02-04staging: comedi: ni_daq_700: use comedi_pcmcia_{enable, disable}H Hartley Sweeten
Use the comedi_pcmcia_{enable,disable} helpers to enable/disable the PCMCIA device. This driver does not use interrupts and is not an audio device, remove CONF_ENABLE_IRQ and CONF_AUTO_AUDIO from the link->config_flags. 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-01-31staging: comedi: ni_daq_700: convert to auto attachH Hartley Sweeten
Convert this pcmcia driver to the comedi auto attach mechanism. This allows getting rid of the "hack" needed to pass the pcmcia_device pointer from the pcmcia_driver to the comedi_driver. We can also get rid of the boardinfo since it was only used to provide the "name" that was used with the manual 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>
2013-01-17staging/comedi/ni_daq_700: Convert to module_comedi_pcmcia_driverPeter Huewe
This patch removes the boring init/exit functions with the new module_comedi_pcmcia_driver macro. Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-22staging: comedi: ni_daq_700: fix dio subdevice regressionFred Brooks
Here is a small patch to fix a problem caused by a previous patch that removed the callback function. The callback remove patch: http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=1de02225358988e8fd48d1dc3fd12336bbae258a I finally booted my dev machine on the latest kernel (running Debian here so it's still on 3.2 normally) to test the ni_daq_700 driver with my test program and noticed this bug. Shift the DIO_R read result to bits 8..15 Digital direction configuration: channels 0-7 output, 8-15 input (8225 device emu as port A output, port B input, port C N/A). Cc: <stable@vger.kernel.org> # 3.6.x Signed-off-by: Fred Brooks <nsaspook@nsaspook.com> 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>
2012-09-26staging: comedi: ni_daq_700: add AI subdeviceIan Abbott
Add subdevice 1 as an analog input (AI) subdevice. It currently only supports basic, software-triggered acquisitions. This is mostly the work of Fred Brooks (MODULE_AUTHOR), but he based his update on an older version of the driver. I applied the relevant changes with a few tweaks: adding an explicit `udelay(1)` in a timeout loop, replacing binary constants with hex, renaming functions, replacing `printk()` calls, removing exported symbols, removing (very) incomplete comedi "command" support, and making some coding-style changes. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-26staging: comedi: ni_daq_700: rename functions for DIO subdeviceIan Abbott
Rename `subdev_700_insn()` to `daq700_dio_insn_bits()` and `subdev_700_insn_config()` to `daq700_dio_insn_config()`. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-26staging: comedi: ni_daq_700: use prefix daq700Ian Abbott
Rename a few functions and variables to use the prefix `daq700` instead of the prefix or suffix `dio700`. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-05staging: comedi: ni_daq_700: remove subdevice pointer mathH Hartley Sweeten
Convert the comedi_subdevice access from pointer math to array access. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-22staging: comedi: ni_daq_700: refactor the pcmcia attach/detachH Hartley Sweeten
Move the pcmcia_disable_device() call where needed in the pcmcia attach/detach and delete the dio700_release() function. Move the logic of dio700_config() directly into the attach function and properly return an error code when the config fails. Only set the pcmcia_cur_dev, used by the comedi_driver, if the pcmcia attach is successful. Also, make sure to NULL it in the detach. Remove all the kernel messages in the pcmcia support code. They are just added noise. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Frank Mori Hess <fmhess@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-22staging: comedi: ni_daq_700: remove the pcmcia suspend/resumeH Hartley Sweeten
The pcmcia suspend/resume callbacks don't do anything. Remove them. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Frank Mori Hess <fmhess@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-22staging: comedi: ni_daq_700: remove unneeded pcmcia private dataH Hartley Sweeten
The pcmcia device-specific data is not longer needed by this driver. Remove it. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Frank Mori Hess <fmhess@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-22staging: comedi: ni_daq_700: remove unused pcmcia 'stop' logicH Hartley Sweeten
The pcmcia support code in this driver appears to be cut-and- paste from some other driver. It has code in it to stop the device during suspend but nothing in the main comedi_driver uses it. Remove the 'stop' variable from the pcmcia private data and all the logic that deals with it. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Frank Mori Hess <fmhess@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-22staging: comedi: ni_daq_700: cleanup pcmcia debug output messagesH Hartley Sweeten
These messages should probably just be removed. For now just clean then up. Remove a couple redundant KERN_INFO messages in the pcmcia support code and leave the dev_dbg() ones. Change the dev_dgb() messages to use __func__ instead of the open coded string. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Frank Mori Hess <fmhess@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-22staging: comedi: ni_daq_700: fix return for insn_config functionH Hartley Sweeten
The comedi insn_config functions should return < 0 for errors or the number of data elements used to perform the command, this value is available as 'insn->n'. Return that instead of the open coded number to better indicate what the return means. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Frank Mori Hess <fmhess@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-22staging: comedi: ni_daq_700: use a local var to fix a > 80 char line issueH Hartley Sweeten
The 'data[1] = ...' line is currently kept < 80 chars by breaking a pointer access after the '->'. This makes the code a bit confusing to follow. Use a local variable to shorten the line and make it clearer. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Frank Mori Hess <fmhess@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-22staging: comedi: ni_daq_700: remove some dangling ';'H Hartley Sweeten
Functions don't need the ';' at the end. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Frank Mori Hess <fmhess@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-22staging: comedi: ni_daq_700: remove local variable in the 'attach' functionH Hartley Sweeten
There is no need for the local variable 'iobase' in the attach function. If it's '0' the attach fails otherwise the value is just stored in dev->iobase. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Frank Mori Hess <fmhess@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-22staging: comedi: ni_daq_700: change the 'attach' printk's to dev_printk'sH Hartley Sweeten
Use the dev_printk() routines to output the kernel messages in the attach routine. The main 'attach' message had a level of KERN_ERR, I believe it should have been KERN_INFO. Also, move that message to the end of the attach so it only gets displayed if the attach is successful. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Frank Mori Hess <fmhess@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-22staging: comedi: ni_daq_700: remove the #ifdef'ed out irq codeH Hartley Sweeten
The irq code is not compiled in due to the '#ifdef incomplete'. And, as stated, it's not even complete. Just remove it. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Frank Mori Hess <fmhess@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-22staging: comedi: ni_daq_700: remove the subdev_700_init functionH Hartley Sweeten
Move the contents of subdev_700_init into the attach function. For aesthetic reasone, add some whitespace to the initialization of the subdevice. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Frank Mori Hess <fmhess@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-22staging: comedi: ni_daq_700: remove a couple unused definesH Hartley Sweeten
These defines are not referenced in the driver. Remove them. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Frank Mori Hess <fmhess@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-22staging: comedi: ni_daq_700: remove the CALLBACK_* codeH Hartley Sweeten
This driver was originally copied from the 8255 driver. The 8255 uses a callback function to handle the io operations to the device. In this driver, the callback adds unneeded complexity. The CALLBACK_ARG for this driver is always 'dev->iobase' and the CALLBACK_FUNC is always 'subdev_700_cb'. The callback function is also overly complex for this driver. It takes a 'dir' parameter to determine if the io is a write or read, a 'port' parameter that is not used, a 'data' parameter that is only used for writes, and an 'arg' which is the iobase of the device. Unwind all of it and just put the outb()/inb() call in the code where needed. This allows getting rid of the private data completely. Refactor the code based on it's removal. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Frank Mori Hess <fmhess@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-22staging: comedi: ni_daq_700: remove unused private data variableH Hartley Sweeten
The 'have_irq' variable is not needed since this driver doesn't use interrupts. Remove it. The kfree(s->private) needs to remain to free the memory allocated in subdev_700_init(). Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Frank Mori Hess <fmhess@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-22staging: comedi: ni_daq_700: remove thisboard macroH Hartley Sweeten
The 'thisboard' macro relies on a local variable having a specific name and yields a pointer derived from that local variable. Replace the macro with local variables and use the comedi_board() helper to get the pointer. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Frank Mori Hess <fmhess@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-22staging: comedi: ni_daq_700: move the boardinfo variableH Hartley Sweeten
For aesthetic reasons, move the boardinfo declaration down so it's next to the comedi_driver. That's the only place in the driver where it's referenced directly. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Frank Mori Hess <fmhess@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-22staging: comedi: ni_daq_700: Remove bustype variable from the boardinfoH Hartley Sweeten
This driver is only used for pcmcia type devices. There is no need for the 'bustype' check. Remove the variable from the boardinfo and refactor the code based on it's removal. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Frank Mori Hess <fmhess@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-22staging: comedi: ni_daq_700: Remove unneeded variables from the boardinfoH Hartley Sweeten
The 'device_id' and 'have_dio' variables in the boardinfo struct are initialized but not referenced in the driver. Just remove them. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Frank Mori Hess <fmhess@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-22staging: comedi: ni_daq_700: Remove unused variables from the boardinfoH Hartley Sweeten
The 'read_byte' and 'write_byte' function pointers in the boardinfo struct are not referenced in the driver. Just remove them. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Frank Mori Hess <fmhess@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-22staging: comedi: ni_daq_700: Remove a "do nothing" function stubH Hartley Sweeten
The function do_config() doesn't do anything. Just remove it. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Frank Mori Hess <fmhess@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>