summaryrefslogtreecommitdiffstats
path: root/drivers
AgeCommit message (Collapse)Author
2013-04-13staging: zcache/debug: fix coding styleWanpeng Li
Fix coding style issue: ERROR: space prohibited before that '++' (ctx:WxO) and line beyond 8 characters. Acked-by: Dan Magenheimer <dan.magenheimer@oracle.com> Signed-off-by: Wanpeng Li <liwanp@linux.vnet.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-13staging: ramster/debug: Add CONFIG_RAMSTER_DEBUG Kconfig entryWanpeng Li
Add CONFIG_RAMSTER_DEBUG Kconfig entry. Acked-by: Dan Magenheimer <dan.magenheimer@oracle.com> Signed-off-by: Wanpeng Li <liwanp@linux.vnet.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-13staging: ramster: Add incremental accessory countersWanpeng Li
Add incremental accessory counters that are going to be used for debug fs entries. Acked-by: Dan Magenheimer <dan.magenheimer@oracle.com> Signed-off-by: Wanpeng Li <liwanp@linux.vnet.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-13staging: ramster/debug: Use an array to initialize/use debugfs attributesWanpeng Li
Use an array to initialize/use debugfs attributes, it makes them neater as zcache/debug.c does. Acked-by: Dan Magenheimer <dan.magenheimer@oracle.com> Signed-off-by: Wanpeng Li <liwanp@linux.vnet.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-13staging: ramster: Move debugfs code out of ramster.c fileWanpeng Li
Note that at this point there is no CONFIG_RAMSTER_DEBUG option in the Kconfig. So in effect all of the counters are nop until that option gets introduced in patch: ramster/debug: Add CONFIG_RAMSTER_DEBUG Kconfig entry Acked-by: Dan Magenheimer <dan.magenheimer@oracle.com> Signed-off-by: Wanpeng Li <liwanp@linux.vnet.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-12staging: ramster: decrease foregin pers pages when count < 0Wanpeng Li
commit 9a5c59687ad ("staging: ramster: Provide accessory functions for counter decrease") forget decrease foregin pers pages, this patch fix it. Acked-by: Dan Magenheimer <dan.magenheimer@oracle.com> Signed-off-by: Wanpeng Li <liwanp@linux.vnet.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-12staging: comedi: amplc_dio200_pci: use pci_ioremap_bar()Ian Abbott
Use `pci_ioremap_bar()` to ioremap the PCI memory resources. That function just takes the PCI device and a bar index. It also has some additional sanity checks to make sure the bar is actually a memory resource. Eliminate some local variables from `dio200_pcie_board_setup()` and `dio200_pci_auto_attach()` that were used to hold the results of `pci_resource_len()` and `pci_resource_start()` that were only used once. Also eliminate the check that the bar is a memory resource in `dio200_pcie_board_setup()` as `pci_ioremap_bar()` will do that for us. 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>
2013-04-12staging: comedi: 8255_pci: check BAR resource type directlyIan Abbott
This driver handles one or more 8255 DIO subdevices mapped contiguously at the start of a PCI BAR resource. The resource may be a portio resource or an mmio resource. The driver currently checks the `is_mmio` member of the matching element of `pci_8255_boards[]` to determine the type of resource. Rather than doing that, get the information straight from the horse's mouth by checking the resource flags of the PCI BAR and eliminate the `is_mmio` member. 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>
2013-04-12staging: comedi: addi_apci_*: replace ADDIDATA_OLD with AMCCIan Abbott
PCI vendor ID 0x10e8 is assigned to Applied Micro Circuits Corporation (recently AppliedMicro, but AMCC on NASDAQ). The ID currently appears as `PCI_VENDOR_ID_ADDIDATA_OLD` in "include/linux/pci_ids.h" and is used by the "addi_apci_1500", "addi_apci_1710" and "addi_apci_3120" comedi drivers. (It is also used by the "8250_pci" serial driver.) "comedidev.h" defines `PCI_VENDOR_ID_AMCC` locally with the same value as `PCI_VENDOR_ID_ADDIDATA_OLD` and is currently used by the "adl_pci9118" comedi driver. Despite `PCI_VENDOR_ID_ADDIDATA_OLD` being in "pci_ids.h", `PCI_VENDOR_ID_AMCC` is a more sensible name, so change the comedi drivers to use it. Once several drivers are using `PCI_VENDOR_ID_AMCC` we'll have a good excuse to move it into "pci_ids.h" and change the "8250_pci" serial driver to use it. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-12staging: comedi: amplc_pc263: split out PCI supportIan Abbott
The "amplc_pc263" module is a hybrid driver for Amplicon PC263 (ISA) and PCI263 (PCI) and uses conditional compilation (and compiler optimization) to compile in the support for the different bus types. Split out support for the PCI263 into a new module "amplc_pci263", retaining support for the PC263 in the existing module "amplc_pc263". Don't bother supporting the legacy attach mechanism for PCI board in the new module as that is no longer in vogue for the comedi drivers and the PCI263 board has no special configuration requirements. Although the code to handle the single subdevice of each board is the same for both drivers, this is only a small amount of code and I don't think it's worth creating a common module to handle it. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-12staging: comedi: use EXPORT_SYMBOL_GPL() for all exported symbolsH Hartley Sweeten
Comedi is licensed under GPL. Some if its exports are currently EXPORT_SYMBOL() and others are EXPORT_SYMBOL_GPL(). Change them all to EXPORT_SYMBOL_GPL() and see if anyone reports any fall out. If any of the symbols "need" to be EXPORT_SYMBOL() they will be addressed as needed. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-12staging: comedi: unionxx5: allocate 'usp' before using itH Hartley Sweeten
As reported by the kbuild test robot, the 'usp' pointer needs to be allocated before being used. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-12staging: dwc2: fix error return code in dwc2_hcd_init()Wei Yongjun
Fix to return a negative error code from the error handling case instead of 0, as returned elsewhere in this function. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Reviewed-by: Matthijs Kooijman <matthijs@stdin.nl> Acked-by: Paul Zimmerman <paulz@synopsys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-11staging: dwc2: Make dwc2_set_uninitialized more specificMatthijs Kooijman
Before, it was a function that would set all members of a given struct containing only int members to -1. Now, it is renamed to dwc_set_all_params and it works only on the dwc2_core_params struct. This makes sure that all of the slightly dubious casting and assumptions happen inside the function instead of by the caller. Signed-off-by: Matthijs Kooijman <matthijs@stdin.nl> Acked-by: Paul Zimmerman <paulz@synopsys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-11staging: dwc2: set the driver name to "dwc2"Matthijs Kooijman
Previously, it was "dwc_otg", but this does not correspond to the directory name and might cause confusion with the old out-of-tree dwc_otg driver of which many versions circulate. Signed-off-by: Matthijs Kooijman <matthijs@stdin.nl> Acked-by: Paul Zimmerman <paulz@synopsys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-11staging: et131x: cancel_work when module gets unloadedDevendra Naga
The work item has been added to the queue using INIT_WORK and scheduled in interrupt handler. when module unloads that work item has not been removed from the queue. remove and stop its further execution when the module unloaded Cc: Mark Einon <mark.einon@gmail.com> Signed-off-by: Devendra Naga <devendra.aaru@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-11staging: ramster: Provide accessory functions for counter decreaseWanpeng Li
This patch enables these functions to be wrapped and can disable/enable this with CONFIG_DEBUG_FS. Signed-off-by: Wanpeng Li <liwanp@linux.vnet.ibm.com> Acked-by: Dan Magenheimer <dan.magenheimer@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-11staging: ramster: Provide accessory functions for counter increaseWanpeng Li
This patch enables these functions to be wrapped and can disable/enable this with CONFIG_DEBUG_FS. Signed-off-by: Wanpeng Li <liwanp@linux.vnet.ibm.com> Acked-by: Dan Magenheimer <dan.magenheimer@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-11staging: dwc2: register common irq handler in dwc2_core_initMatthijs Kooijman
Before, this was initialized in pci.c, after the dwc2_hcd_init was called and the interrupts were enabled. This opened up a small time window where common interrupts could be triggered, but there was no handler for them, causing them to keep triggering infinitely and locking up the machine. On my RT3052 board this bug could be easily reproduced by hardcoding the console log level to 8, so that a bunch of debug output from the dwc2 driver was generated inside this time window. This caused the interrupt lockup to occur almost every time. By requesting the irq inside dwc2_core_init and by disabling interrupts before calling dwc2_core_init instead of after, we can be sure the handler is registered before the interrupts are enabled, which should close this window. Reported-by: Stephen Warren <swarren@wwwdotorg.org> Signed-off-by: Matthijs Kooijman <matthijs@stdin.nl> Acked-by: Paul Zimmerman <paulz@synopsys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-11staging: dwc2: don't pass IRQ_LEVEL to devm_request_irqMatthijs Kooijman
It seems this flag is intended to pass to irq_set_status_flags, not request_irq, and is not available on all architectures. Its value corresponds to IRQF_PROBE_SHARED, which shouldn't be needed for this driver, so removing this flag should be safe. Signed-off-by: Matthijs Kooijman <matthijs@stdin.nl> Acked-by: Paul Zimmerman <paulz@synopsys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-11staging: zcache: fix account foregin counters against zero-filled pagesWanpeng Li
zero-filled pages won't be compressed and sent to remote system. Monitor the number ephemeral and persistent pages that Ramster has sent make no sense. This patch skip account foregin counters against zero-filled pages. Signed-off-by: Wanpeng Li <liwanp@linux.vnet.ibm.com> Acked-by: Dan Magenheimer <dan.magenheimer@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-11staging: drm/imx: update TODO fileSascha Hauer
One of the main things to do to the driver is to support the common display famework (CDF) to hit mainline. As this will make some changes to the devicetree bindings necessary it makes sense to do it before we move out of staging. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-11staging: comedi: ii_pci20kc: remove comment about 2.4 kernelsH Hartley Sweeten
This comment about using ioremap() for 2.4 kernels is not necessary. 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-04-11staging: comedi: addi_common: remove i_IorangeBase0 from boardinfoH Hartley Sweeten
The i_IorangeBase0 boardinfo is not used. 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>
2013-04-11staging: comedi: addi_common: remove i_IorangeBase2 from boardinfoH Hartley Sweeten
The i_IorangeBase2 boardinfo is not used. 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>
2013-04-11staging: comedi: addi_common: remove i_IorangeBase3 from boardinfoH Hartley Sweeten
When it is used, the entire PCI bar is ioremap'ed with pci_ioremap_bar(). The i_IorangeBase3 boardinfo is no longer needed. 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-04-11staging: comedi: addi_common: use pci_ioremap_bar()H Hartley Sweeten
Use pci_ioremap_bar() to ioremap the PCI resources. That function just takes the pci device and a bar number. It also has some additional sanity checks to make sure the bar is actually a memory resource. This also makes sure that the entire PCI bar is ioremap'ed instead of assuming the size of the bar. 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-04-11staging: comedi: jr3_pci: use pci_ioremap_bar()H Hartley Sweeten
Use pci_ioremap_bar() to ioremap the PCI resources. That function just takes the pci device and a bar number. It also has some additional sanity checks to make sure the bar is actually a memory resource. This also makes sure that the entire PCI bar is ioremap'ed instead of assuming the size of the bar. 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-04-11staging: comedi: mite: use pci_ioremap_bar()H Hartley Sweeten
Use pci_ioremap_bar() to ioremap the PCI resources. That function just takes the pci device and a bar number. It also has some additional sanity checks to make sure the bar is actually a memory resource. This also makes sure that the entire PCI bar is ioremap'ed instead of assuming the size of a bar. For aesthetic reasons, don't set the private data phys_addr vars until after the ioremap is successful. 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-04-11staging: comedi: icp_multi: use pci_ioremap_bar()H Hartley Sweeten
Use pci_ioremap_bar() to ioremap the PCI resources. That function just takes the pci device and a bar number. It also has some additional sanity checks to make sure the bar is actually a memory resource. This also makes sure that the entire PCI bar is ioremap'ed instead of assuming the size of the bar. Also, since this driver only uses memory mapped I/O it is not necessary to set the dev->iobase. 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-04-11staging: comedi: 8255_pci: use pci_ioremap_bar()H Hartley Sweeten
Use pci_ioremap_bar() to ioremap the PCI resources. That function just takes the pci device and a bar number. It also has some additional sanity checks to make sure the bar is actually a memory resource. Refactor the code a bit. The dev->iobase only needs to be set when the board does not use memory mapped I/O. And the 'iobase' passed to subdev_8255_init() is an unsigned long. 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-04-11staging: comedi: dt3000: use pci_ioremap_bar()H Hartley Sweeten
Use pci_ioremap_bar() to ioremap the PCI resources. That function just takes the pci device and a bar number. It also has some additional sanity checks to make sure the bar is actually a memory resource. This also makes sure that the entire PCI bar is ioremap'ed instead of assuming the size of the bar. 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-04-11staging: comedi: cb_pcidas64: tidy up the *phys_iobaseH Hartley Sweeten
This driver does not use the dev->iobase so don't bother initializing it. The plx9080_phys_iobase is not used in the driver. Remove it from the private data. Tidy up the initialization of the other phy_iobase variables. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-11staging: comedi: cb_pcidas64: use pci_ioremap_bar()H Hartley Sweeten
Use pci_ioremap_bar() to ioremap the PCI resources. That function just takes the pci device and a bar number. It also has some additional sanity checks to make sure the bar is actually a memory resource. 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-04-11staging: comedi: cb_pcidas64: remove the base_address_regions enumH Hartley Sweeten
This enum is only used in the ioremap of the PCI resources and it doesn't really help make the code any clearer. 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-04-11staging: comedi: s626: use pci_ioremap_bar()H Hartley Sweeten
Use pci_ioremap_bar() to ioremap the PCI resources. That function just takes the pci device and a bar number. It also has some additional sanity checks to make sure the bar is actually a memory resource. 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-04-11staging: comedi: me_daq: use pci_ioremap_bar()H Hartley Sweeten
Use pci_ioremap_bar() to ioremap the PCI resources. That function just takes the pci device and a bar number. It also has some additional sanity checks to make sure the bar is actually a memory resource. 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-04-11staging: comedi: gsc_hpdi: use pci_ioremap_bar()H Hartley Sweeten
Use pci_ioremap_bar() to ioremap the PCI resources. That function just takes the pci device and a bar number. It also has some additional sanity checks to make sure the bar is actually a memory resource. 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-04-11staging: comedi: gsc_hpdi: remove the base_address_regions enumH Hartley Sweeten
This enum is only used in the ioremap of the PCI resources and it doesn't really help make the code any clearer. 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-04-11staging: comedi: daqboard2000: use pci_ioremap_bar()H Hartley Sweeten
Use pci_ioremap_bar() to ioremap the PCI resources. That function just takes the pci device and a bar number. It also has some additional sanity checks to make sure the bar is actually a memory resource. 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-04-11staging: comedi: rti800: use comedi_request_region()H Hartley Sweeten
Use comedi_request_region() to request the I/O region used by this 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>
2013-04-11staging: comedi: acl7225b: use comedi_request_region()H Hartley Sweeten
Use comedi_request_region() to request the I/O region used by this 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>
2013-04-11staging: comedi: das1800: use __comedi_request_region()H Hartley Sweeten
Use __comedi_request_region() to request the additional I/O region used by this driver. Remove the error message when the request_region() fails, comedi_request_reqion() will output the error message if necessary. For aesthetic reasons, rename the local variable 'retval' to simply 'ret'. 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-11staging: comedi: ni_labpc: use comedi_request_region()H Hartley Sweeten
Use comedi_request_region() to request the I/O region used by this driver. 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-04-11staging: comedi: ni_labpc: only ISA boards need to request_region()H Hartley Sweeten
Currently this driver calls request_region() in labpc_common_attach() which is the common attach function for the ISA, PCMCIA, and PCI versions of the labpc board. The PCMCIA support is handled in a separate driver, ni_labpc_cs. That driver sets the dev->iobase after aquiring the resource and then just passes it to labpc_common_attach() which then sets dev->iobase again. The PCI support, currently in this driver, calls mite_setup() to aquire the resource and then passes it to labpc_common_attach() to set the dev->iobase. The ISA support, also in this driver, passes a user supplied configuration option to labpc_common_attach() which then does the request_region() before setting the dev->iobase. Move the request_region() to the ISA support code in labpc_attach() and set the dev->iobase there before calling the common attach code. For the PCI support, also set the dev->iobase before calling the common code. This allows removing the extra parameter from labpc_common_attach(). 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-04-11staging: comedi: ni_labpc: cleanup dev->board_name usageH Hartley Sweeten
The dev->board_name is initialized by the comedi core before calling the (*attach) or (*auto_attach) functions. It only needs to be updated if the driver does any additional probing and changes the dev->board_ptr. 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-04-11staging: comedi: ni_at_ao: use comedi_request_region()H Hartley Sweeten
Use comedi_request_region() to request the I/O region used by this driver. Remove the board attach noise as well as the error message when the request_region() fails, comedi_request_reqion() will output the error message if necessary. 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-04-11staging: comedi: ni_at_ao: cleanup dev->board_name usageH Hartley Sweeten
This legacy driver does no additional probing so the dev->board_name will already be properly initialized by the comedi core before calling the (*attach) function. Remove the unnecessary initialization of dev->board_name and use it when requesting the resources instead of the open-coded strings. 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-04-11staging: comedi: s526: use comedi_request_region()H Hartley Sweeten
Use comedi_request_region() to request the I/O region used by this driver. Remove the board attach noise as well as the error message when the request_region() fails, comedi_request_reqion() will output the error message if necessary. 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-04-11staging: comedi: unionxx5: refactor subdevice initH Hartley Sweeten
Change the parameters passed to __unioxx5_subdev_init(), we need the comedi_device pointer to call __comedi_request_region() and the 'minor' is only used in some kernel noise so remove it. Rename the parameters 'subdev' and 'subdev_iobase' to simply 's' and 'iobase'. Use __comedi_request_region() to request the I/O region needed by the subdevice. Remove the attach noise as well as the error message when the request_region() fails, comedi_request_reqion() will output the error message if necessary. Return -ENOMEM is the kzalloc fails instead of -1. Fix unioxx5_attach() to use the new parameters to __unioxx5_subdev_init(). Pass on any error codes instead of -1. 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>