Move these functions and remove their forward declarations:
pci230_ao_stop(), pci230_handle_ao_nofifo(), pci230_handle_ao_fifo().
Also move pci230_ao_cancel() for aesthetic reasons.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Implement the attach_pci() hook as function pci230_attach_pci(). This
is called by comedi_pci_auto_config() in preference to the old attach()
hook (implemented by pci230_attach() and still required for "manual"
configuration of comedi devices). The advantage of the attach_pci()
hook is that it avoids searching for the PCI device.
Refactor pci230_attach() and factor out code common to pci230_attach()
and pci230_attach_pci() into new functions pci230_match_pci_board(),
pci230_find_pci_board(), pci230_find_pci(), pci230_alloc_private() and
pci230_attach_common().
Finally, move pci230_attach() and pci230_detach() along with all the new
functions towards the bottom of the file as it makes the patch much
cleaner (though longer) and I plan to move things around soon to get
rid of the remaining forward references.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Fri, 1 Jun 2012 16:31:40 +0000 (17:31 +0100)]
staging: comedi: amplc_pci230: Remove thisboard and devpriv macros
The 'thisboard' and 'devpriv' macros rely on a local variable having a
specific name and yield pointers derived from that local variable.
Replace the macros with local variables wherever they occur.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Thu, 31 May 2012 15:02:05 +0000 (16:02 +0100)]
staging: comedi: amplc_pci224: Remove thisboard and devpriv macros
The 'thisboard' and 'devpriv' macros rely on a local variable having a
specific name and yield pointers derived from that local variable.
Replace the macros with local variables wherever they occur.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Thu, 31 May 2012 15:02:04 +0000 (16:02 +0100)]
staging: comedi: amplc_pci224: Change return type of pci224_find_pci()
pci224_find_pci() finds a supported PCI device, returning 0 on success
or -EIO on failure and returning the pointer to the PCI device via a
struct pci_dev ** parameter. Change it to return the struct pci_dev *
on success or NULL on failure.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Replace the printk calls with dev_info, dev_err, etc. There were some
consecutive printk calls without newlines which now scnprintf into a
temporary buffer and this bit of code has been factored out into new
function pci224_report_attach().
A couple of DPRINTK() macro calls which may result in printk() calls
have been left alone to be tackled en masse at a later date.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Implement the attach_pci() hook as function dio200_attach_pci(). This
is called by comedi_pci_auto_config() in preference to the old attach()
hook (implemented by dio200_attach()) and avoids searching for the
probed PCI device.
Factor out code common to dio200_find_pci() and dio200_attach_pci() into
new function dio200_find_pci_board(). Factor out most code common to
dio200_attach() and dio200_attach_pci() into new functions
dio200_pci_common_attach() and dio200_common_attach().
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Thu, 31 May 2012 13:08:36 +0000 (14:08 +0100)]
staging: comedi: amplc_dio200: Remove thisboard, thislayout and devpriv macros
The 'thisboard', 'thislayout' and 'devpriv' macros rely on a local
variable having a specific name and yield pointers derived from that
local variable. Replace the macros with local variables wherever they
occur.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Thu, 31 May 2012 13:08:35 +0000 (14:08 +0100)]
staging: comedi: amplc_dio200: Change return type of dio200_find_pci()
dio200_find_pci() finds a supported PCI device, returning 0 on success
or -EIO on failure and returning the pointer to the PCI device via a
struct pci_dev ** parameter. Change it to return the struct pci_dev *
on success or NULL on failure.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Replace the printk calls with dev_info, dev_err, etc. There were some
consecutive printk calls without newlines which now scnprintf into a
temporary buffer and this bit of code has been factored out into new
function dio200_report_attach().
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Thu, 31 May 2012 13:08:32 +0000 (14:08 +0100)]
staging: comedi: amplc_dio200: Use module_comedi_{pci,}_driver()
If PCI boards are supported, use the module_comedi_pci_driver() macro to
register the module as a comedi driver and a PCI driver. Otherwise,
only ISA boards are supported so use the module_comedi_driver() macro to
register the module as a comedi driver.
Renamed 'driver_amplc_dio200' to 'amplc_dio200_driver' and removed
'driver_' prefix from PCI related functions and variables, purely for
aesthetic reasons.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Thu, 31 May 2012 13:08:31 +0000 (14:08 +0100)]
staging: comedi: amplc_dio200: Use IS_ENABLED()
Change conditional compilation on kernel options to use the IS_ENABLED()
macro. Remove most of the #ifdef lines and add extra if
(IS_ENABLED(xxx)) tests so the compiler can remove unreachable code.
The pci_driver stuff and device table and some of the static const data
is still conditionally compiled.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Implement the attach_pci() hook as function pc263_attach_pci(). This is
called bu comedi_pci_auto_config() in preference to the old attach()
hook (implemented by pc263_attach()) and avoids searching for the probed
PCI device.
Factor out code common to pc263_find_pci() and pc263_attach_pci() into
new function pc263_find_pci_board(). Factor out most code common to
pc263_attach() and pc263_attach_pci() into new functions
pc263_pci_common_attach() and pc263_common_attach().
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Wed, 30 May 2012 18:04:44 +0000 (19:04 +0100)]
staging: comedi: amplc_pc263: Remove thisboard and devpriv macros
The 'thisboard' and 'devpriv' macros rely on a local variable having a
specific name and yield pointers derived from that local variable.
Replace the macros with local variables wherever they occur.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Wed, 30 May 2012 18:04:43 +0000 (19:04 +0100)]
staging: comedi: amplc_pc263: Change return type of pc263_find_pci()
pc263_find_pci() finds a supported PCI device, returning 0 on success
or -EIO on failure and returning the pointer to the PCI device via a
struct pci_dev ** parameter. Change it to return the struct pci_dev *
on success or NULL on failure.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Replace the printk calls with dev_info, dev_err, etc. There were some
consecutive printk calls without newlines which now snprintf into a
temporary buffer and this bit of code has been factored out into new
function pc263_report_attach().
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Wed, 30 May 2012 18:04:39 +0000 (19:04 +0100)]
staging: comedi: amplc_pc263: Use module_comedi_{pci, }_driver()
If PCI boards are supported, use the module_comedi_pci_driver() macro to
register the module as a comedi driver and a PCI driver. Otherwise,
only ISA boards are supported so use the module_comedi_driver() macro to
register the module as a comedi driver.
Renamed 'driver_amplc_pc263' to 'amplc_pc263_driver' and removed
'driver_' prefix from PCI related functions and variables, purely for
aesthetic reasons.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Wed, 30 May 2012 18:04:38 +0000 (19:04 +0100)]
staging: comedi: amplc_pc263: Use IS_ENABLED()
Change conditional compilation on kernel options to use the IS_ENABLED()
macro. Remove most of the #ifdef lines and add extra if
(IS_ENABLED(xxx)) tests so the compiler can remove unreachable code.
The pci_driver stuff and device table is still conditionally compiled.
In pc263_attach() move the call to alloc_private() as it is only used
for PCI devices. (In pc263_detach(), for ISA devices a non-zero
dev->iobase means the I/O region needs releasing.)
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Wed, 30 May 2012 18:04:36 +0000 (19:04 +0100)]
staging: comedi: amplc_pc263: Change DIO subdevice to DO
This is a relay output card with no inputs. It's single subdevice is
currently a digital input/output subdevice (COMEDI_SUBD_DIO). It should
really be a digital output subdevice (COMEDI_SUBD_DO). Change the
subdevice type and remove the insn_config() hook as it doesn't do
anything useful.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Wed, 30 May 2012 18:04:35 +0000 (19:04 +0100)]
staging: comedi: amplc_pc263: Correct initial state
The initial state of the relays is being read incorrectly. It's reading
a single 8-bit port twice, but should be reading two consecutive 8-bit
ports. Fix it.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Wed, 30 May 2012 13:37:52 +0000 (14:37 +0100)]
staging: comedi: amplc_pc236: Remove most #if lines
Remove most of the #if IS_ENABLED(xxx) lines, but add extra if
(IS_ENABLED(xxx)) tests so the compiler can remove unreachable code.
The pci_driver stuff and device table is still conditionally compiled.
Also made pc236_find_pci() static as it was accidentally made non-static
by an earlier patch, so the compiler wouldn't remove it when it was
unreachable.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Implement the attach_pci() hook as function pc236_attach_pci(). This is
called bu comedi_pci_auto_config() in preference to the old attach()
hook (implemented by pc236_attach()) and avoids searching for the probed
PCI device.
Factor out code common to pc236_find_pci() and pc236_attach_pci() into
new function pc236_find_pci_board(). Factor out most code common to
pc236_attach() and pc236_attach_pci() into new functions
pc236_pci_common_attach() and pc236_common_attach().
Also #if out member 'devid' from struct pc236_board unless PCI boards
are supported as it is not used for ISA boards.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Tue, 29 May 2012 13:49:34 +0000 (14:49 +0100)]
staging: comedi: amplc_pc236: Remove thisboard and devpriv macros
The 'thisboard' and 'devpriv' macros rely on a local variable having a
specific name and yield pointers derived from that local variable.
Replace the macros with local variables wherever they occur.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Tue, 29 May 2012 13:49:33 +0000 (14:49 +0100)]
staging: comedi: amplc_pc236: Change return type of pc236_find_pci()
pc236_find_pci() finds a supported PCI device, returning 0 on success
or -EIO on failure and returning the pointer to the PCI device via a
struct pci_dev ** parameter. Change it to return the struct pci_dev *
on success or NULL on failure.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Replace the printk calls with dev_info, dev_err, etc. There were some
consecutive printk calls without newlines which now scnprintf into a
temporary buffer and this bit of code has been factored out into new
function pc236_report_attach().
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Tue, 29 May 2012 13:49:29 +0000 (14:49 +0100)]
staging: comedi: amplc_pc236: Use module_comedi_{pci,}_driver()
If PCI boards are supported, use the module_comedi_pci_driver() macro to
register the module as a comedi driver and a PCI driver. Otherwise,
only ISA boards are supported so use the module_comedi_driver() macro to
register the module as a comedi driver.
Renamed 'driver_amplc_pc236' to 'amplc_pc236_driver' and removed
'driver_' prefix from PCI related functions and variables, purely for
aesthetic reasons.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: Make COMEDI_FC a hidden Kconfig option
The COMEDI_FC Kconfig option is selected by the relevant drivers
when needed. Since it only contains shared functions, selecting
it manually serves no purpose. Just make it a hidden selection.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Mori Hess <fmhess@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Thu, 24 May 2012 16:27:18 +0000 (17:27 +0100)]
staging: comedi: das08: Add attach_pci() hook
Implement the attach_pci() hook. This is called by
comedi_pci_auto_config() in preference to the old attach() hook and
avoids searching for the probed PCI device. Factor out some common code
used by both the attach() and attach_pci() hooks into a couple of new
functions, das08_pci_attach_common() and das08_find_pci_board().
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Thu, 24 May 2012 16:27:17 +0000 (17:27 +0100)]
staging: comedi: das08: Support multiple PCI card types in future
Rename the existing board entry named "das08" for the PCI-DAS08 board to
"pci-das08". Add a new wildcard board entry called "das08" that will
match any supported PCI board. If 'dev->board_ptr' points to the
wildcard board entry in the ->attach() routine, it will be replaced with
a supported PCI board entry if there are any (taking into account the
bus and slot specified by the device config options passed in to the
function).
Split the code that finds a matching PCI device into a new function
das08_find_pci().
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Thu, 24 May 2012 16:27:16 +0000 (17:27 +0100)]
staging: comedi: das08: Remove thisboard and devpriv macros
The 'thisboard' and 'devpriv' macros rely on a local variable having a
specific name and yield pointers derived from that local variable.
Replace the macros with local variables wherever they occur.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Thu, 24 May 2012 16:27:14 +0000 (17:27 +0100)]
staging: comedi: das08: Remove forward function declarations.
Moved some functions to avoid forward declarations. Moved a few other
bits at the same time to keep EXPORT_SYMBOL{,_GPL}() close to the symbol
being exported, and PCI table close to the code that refers to it.
Changed whitespace in das08_board[] and das08_cs_board[] initializers.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Thu, 24 May 2012 16:27:13 +0000 (17:27 +0100)]
staging: comedi: das08: Use module_comedi_{pci_, }driver
If PCI boards are supported, use the module_comedi_pci_driver() macro to
register the module as a comedi driver and a PCI driver. Otherwise, if
ISA (or PC/104) boards are supported, use the module_comedi_driver()
macro to register the module as a comedi driver. Otherwise, this is
only a helper module for an external comedi driver (das08_cs).
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Don't deal with allocation and deallocation of I/O resources and PCI
enabling/disabling in the exported functions das08_common_attach() and
das08_common_detach(). Do it in das08_attach() and new function
das08_detach() (which is now the comedi detach() hook for this driver).
This keeps things more symmetrical. Callers of das08_common_attach()
and das08_common_detach() are now responsible for allocation of their
own I/O resources and enabling of their own devices. The only external
caller of das08_common_attach() and das08_common_detach() is the
das08_cs module, which looks after its own I/O resources.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: adl_pci7296: factor out the PCI device code
Factor out the code that finds a matching PCI device from attach
function. This allows reducing the indent level of the remaining
code in the attach function.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Mori Hess <fmhess@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: adl_pci7432: factor out the PCI device code
Factor out the code that finds a matching PCI device from attach
function. This allows reducing the indent level of the remaining
code in the attach function.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Mori Hess <fmhess@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: adl_pci8164: factor out the PCI device code
Factor out the code that finds a matching PCI device from attach
function. This allows reducing the indent level of the remaining
code in the attach function.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Mori Hess <fmhess@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dan Carpenter [Sat, 26 May 2012 12:14:45 +0000 (15:14 +0300)]
staging: comedi: cleanup comedi_recognize()
This function is more complicated than it needs to be because of the
consts. It's not worth saving them when we drop the consts anyway
when we return (void *)name_ptr.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: remove this_board macro in the s526 driver
The 'thisboard' macro depends on having a local variable with
a magic name. The CodingStyle document suggests not doing this
to avoid confusion. Remove the macro and use the comedi_board()
inline helper to get the dev->board_ptr information.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Mori Hess <fmhess@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: remove this_board macro in the acl7225b driver
The 'this_board' macro depends on having a local variable with
a magic name. The CodingStyle document suggests not doing this
to avoid confusion. Remove the macro and use the comedi_board()
inline helper to get the dev->board_ptr information.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Mori Hess <fmhess@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: remove thisboard macro in the adq12b driver
The 'thisboard' macro depends on having a local variable with
a magic name. The CodingStyle document suggests not doing this
to avoid confusion. Remove the macro and use the comedi_board()
inline helper to get the dev->board_ptr information.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Mori Hess <fmhess@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: remove this_board macro in the aio_aio12_8 driver
The 'thisboard' macro depends on having a local variable with
a magic name. The CodingStyle document suggests not doing this
to avoid confusion. Remove the macro and use the comedi_board()
inline helper to get the dev->board_ptr information.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Mori Hess <fmhess@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: remove thisboard macro in the aio_iiro_16 driver
The 'thisboard' macro depends on having a local variable with
a magic name. The CodingStyle document suggests not doing this
to avoid confusion. Remove the macro and use the comedi_board()
inline helper to get the dev->board_ptr information.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Mori Hess <fmhess@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: remove thisboard macro in the comedi_test driver
The 'thisboard' macro depends on having a local variable with
a magic name. The CodingStyle document suggests not doing this
to avoid confusion. Remove the macro and use the comedi_board()
inline helper to get the dev->board_ptr information.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Mori Hess <fmhess@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: remove thisboard macro in the das16 driver
The 'thisboard' macro depends on having a local variable with
a magic name. The CodingStyle document suggests not doing this
to avoid confusion. Remove the macro and use the comedi_board()
inline helper to get the dev->board_ptr information.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Mori Hess <fmhess@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: remove thisboard macro in the das16m1 driver
The 'thisboard' macro depends on having a local variable with
a magic name. The CodingStyle document suggests not doing this
to avoid confusion. Remove the macro and use the comedi_board()
inline helper to get the dev->board_ptr information.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Mori Hess <fmhess@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: remove thisboard macro in the dmm32at driver
The 'thisboard' macro depends on having a local variable with
a magic name. The CodingStyle document suggests not doing this
to avoid confusion. Remove the macro and use the comedi_board()
inline helper to get the dev->board_ptr information.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Mori Hess <fmhess@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: remove this_board macro in the dt2811 driver
The 'this_board' macro depends on having a local variable with
a magic name. The CodingStyle document suggests not doing this
to avoid confusion. Remove the macro and use the comedi_board()
inline helper to get the dev->board_ptr information.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Mori Hess <fmhess@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: remove this_board macro in the dt282x driver
The 'this_board' macro depends on having a local variable with
a magic name. The CodingStyle document suggests not doing this
to avoid confusion. Remove the macro and use the comedi_board()
inline helper to get the dev->board_ptr information.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Mori Hess <fmhess@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: remove thisboard macro in the ni_at_ao driver
The 'thisboard' macro depends on having a local variable with
a magic name. The CodingStyle document suggests not doing this
to avoid confusion. Remove the macro and use the comedi_board()
inline helper to get the dev->board_ptr information.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Mori Hess <fmhess@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: remove boardtype macro in the ni_atmio16d driver
The 'boardtype' macro depends on having a local variable with
a magic name. The CodingStyle document suggests not doing this
to avoid confusion. Remove the macro and use the comedi_board()
inline helper to get the dev->board_ptr information.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Mori Hess <fmhess@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: remove this_board macro in the pcl711 driver
The 'this_board' macro depends on having a local variable with
a magic name. The CodingStyle document suggests not doing this
to avoid confusion. Remove the macro and use the comedi_board()
inline helper to get the dev->board_ptr information.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Mori Hess <fmhess@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: remove this_board macro in the pcl724 driver
The 'this_board' macro depends on having a local variable with
a magic name. The CodingStyle document suggests not doing this
to avoid confusion. Remove the macro and use the comedi_board()
inline helper to get the dev->board_ptr information.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Mori Hess <fmhess@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: remove this_board macro in the pcl726 driver
The 'this_board' macro depends on having a local variable with
a magic name. The CodingStyle document suggests not doing this
to avoid confusion. Remove the macro and use the comedi_board()
inline helper to get the dev->board_ptr information.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Mori Hess <fmhess@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: remove this_board macro in the pcl730 driver
The 'this_board' macro depends on having a local variable with
a magic name. The CodingStyle document suggests not doing this
to avoid confusion. Remove the macro and use the comedi_board()
inline helper to get the dev->board_ptr information.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Mori Hess <fmhess@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: remove this_board macro in the pcl812 driver
The 'this_board' macro depends on having a local variable with
a magic name. The CodingStyle document suggests not doing this
to avoid confusion. Remove the macro and use the comedi_board()
inline helper to get the dev->board_ptr information.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Mori Hess <fmhess@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: remove this_board macro in the pcl816 driver
The 'this_board' macro depends on having a local variable with
a magic name. The CodingStyle document suggests not doing this
to avoid confusion. Remove the macro and use the comedi_board()
inline helper to get the dev->board_ptr information.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Mori Hess <fmhess@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: remove this_board macro in the pcl818 driver
The 'this_board' macro depends on having a local variable with
a magic name. The CodingStyle document suggests not doing this
to avoid confusion. Remove the macro and use the comedi_board()
inline helper to get the dev->board_ptr information.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Mori Hess <fmhess@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: remove this_board macro in the pcm3724 driver
The 'this_board' macro depends on having a local variable with
a magic name. The CodingStyle document suggests not doing this
to avoid confusion. Remove the macro and use the comedi_board()
inline helper to get the dev->board_ptr information.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Mori Hess <fmhess@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: remove this_board macro in the pcmad driver
The 'this_board' macro depends on having a local variable with
a magic name. The CodingStyle document suggests not doing this
to avoid confusion. Remove the macro and use the comedi_board()
inline helper to get the dev->board_ptr information.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Mori Hess <fmhess@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: remove thisboard macro in the pcmda12 driver
The 'thisboard' macro depends on having a local variable with
a magic name. The CodingStyle document suggests not doing this
to avoid confusion. Remove the macro and use the comedi_board()
inline helper to get the dev->board_ptr information.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Mori Hess <fmhess@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: remove this_board macro in the pcmmio driver
The 'thisboard' macro depends on having a local variable with
a magic name. The CodingStyle document suggests not doing this
to avoid confusion. Remove the macro and use the comedi_board()
inline helper to get the dev->board_ptr information.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Mori Hess <fmhess@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: remove this_board macro in the pcmuio driver
The 'thisboard' macro depends on having a local variable with
a magic name. The CodingStyle document suggests not doing this
to avoid confusion. Remove the macro and use the comedi_board()
inline helper to get the dev->board_ptr information.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Mori Hess <fmhess@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: remove this_board macro in the poc driver
The 'this_board' macro depends on having a local variable with
a magic name. The CodingStyle document suggests not doing this
to avoid confusion. Remove the macro and use the comedi_board()
inline helper to get the dev->board_ptr information.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Mori Hess <fmhess@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: remove this_board macro in the rti800 driver
The 'this_board' macro depends on having a local variable with
a magic name. The CodingStyle document suggests not doing this
to avoid confusion. Remove the macro and use the comedi_board()
inline helper to get the dev->board_ptr information.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Mori Hess <fmhess@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: remove this_board macro in the serial2002 driver
The 'thisboard' macro depends on having a local variable with
a magic name. The CodingStyle document suggests not doing this
to avoid confusion. Remove the macro and use the comedi_board()
inline helper to get the dev->board_ptr information.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Mori Hess <fmhess@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: remove thisboard macro in the ssv_dnp driver
The 'thisboard' macro depends on having a local variable with
a magic name. The CodingStyle document suggests not doing this
to avoid confusion. Remove the macro and use the comedi_board()
inline helper to get the dev->board_ptr information.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Mori Hess <fmhess@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Linus Torvalds [Sun, 3 Jun 2012 00:39:40 +0000 (17:39 -0700)]
Merge tag 'dm-3.5-changes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-dm
Pull device-mapper updates from Alasdair G Kergon:
"Improve multipath's retrying mechanism in some defined circumstances
and provide a simple reserve/release mechanism for userspace tools to
access thin provisioning metadata while the pool is in use."
* tag 'dm-3.5-changes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-dm:
dm thin: provide userspace access to pool metadata
dm thin: use slab mempools
dm mpath: allow ioctls to trigger pg init
dm mpath: delay retry of bypassed pg
dm mpath: reduce size of struct multipath
Joe Thornber [Sat, 2 Jun 2012 23:30:01 +0000 (00:30 +0100)]
dm thin: provide userspace access to pool metadata
This patch implements two new messages that can be sent to the thin
pool target allowing it to take a snapshot of the _metadata_. This,
read-only snapshot can be accessed by userland, concurrently with the
live target.
Only one metadata snapshot can be held at a time. The pool's status
line will give the block location for the current msnap.
Since version 0.1.5 of the userland thin provisioning tools, the
thin_dump program displays the msnap as follows:
thin_dump -m <msnap root> <metadata dev>
Available here: https://github.com/jthornber/thin-provisioning-tools
Now that userland can access the metadata we can do various things
that have traditionally been kernel side tasks:
i) Incremental backups.
By using metadata snapshots we can work out what blocks have
changed over time. Combined with data snapshots we can ensure
the data doesn't change while we back it up.
A short proof of concept script can be found here: