Commit Graph

323885 Commits

Author SHA1 Message Date
Daniel Cotey 1bd5374dde Staging: silicom: checkpatch.pl cleanup: pretty pointers
More notation fixes

Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 05:37:58 -07:00
Daniel Cotey 01448bbb05 Staging: silicom: checkpatch.pl cleanup: pretty pointers
first chunk, straighten up the pointer notation

Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 05:37:58 -07:00
Daniel Cotey 86bc9ebb4d Staging: silicom: checkpatch cleanup: fix includes
checkpatch fixups

Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 05:37:57 -07:00
Daniel Cotey 25dd851204 Staging: silicom: checkpatch cleanup: header file whitespace
Finish trailing spaces in libbp_sd.h

Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 05:37:57 -07:00
Daniel Cotey f8402b6311 Staging: silicom: checkpatch cleanup: header file whitespace
Whack all the line ending spaces so checkpatch.pl is happy.

Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 05:37:57 -07:00
Daniel Cotey 65af0ae35a Staging: silicom: bypass.h: checkpatch whitespace
Remove trailing spaces, second chunk

Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 05:37:57 -07:00
Daniel Cotey b2774ed427 Staging: silicom: bypass.h: checkpatch whitespace
Remove trailing spaces, first chunk

Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 05:37:57 -07:00
Daniel Cotey 30f62902e3 Staging: silicom: bp_mod.h: checkpatch tab and space cleanup
twelfth chunk of bp_mod.h's cleanup

Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 05:37:56 -07:00
Daniel Cotey d5b4f42f8f Staging: silicom: bp_mod.h: checkpatch tab and space cleanup
eleventh chunk of bp_mod.h's cleanup

Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 05:37:56 -07:00
Daniel Cotey 97ef0a461b Staging: silicom: bp_mod.h: checkpatch tab and space cleanup
tenth chunk of bp_mod.h's cleanup

Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 05:37:56 -07:00
Daniel Cotey fab85699f3 Staging: silicom: bp_mod.h: checkpatch tab and space cleanup
ninth chunk of bp_mod.h's cleanup

Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 05:37:56 -07:00
Daniel Cotey 9088c8a993 Staging: silicom: bp_mod.h: checkpatch tab and space cleanup
eighth chunk of bp_mod.h's cleanup

Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 05:37:56 -07:00
Daniel Cotey 22f3504684 Staging: silicom: bp_mod.h: checkpatch tab and space cleanup
seventh chunk of bp_mod.h's cleanup

Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 05:37:55 -07:00
Daniel Cotey 0118f42af2 Staging: silicom: bp_mod.h: checkpatch tab and space cleanup
sixth chunk of bp_mod.h's cleanup

Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 05:37:55 -07:00
Daniel Cotey 2ea2ea4dab Staging: silicom: bp_mod.h: checkpatch tab and space cleanup
fifth chunk of bp_mod.h's cleanup

Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 05:37:55 -07:00
Daniel Cotey 0fe8f5d7a5 Staging: silicom: bp_mod.h: checkpatch tab and space cleanup
fourth chunk of bp_mod.h's cleanup

Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 05:37:55 -07:00
Daniel Cotey c2cf19334b Staging: silicom: bp_mod.h: checkpatch tab and space cleanup
third chunk of bp_mod.h's cleanup

Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 05:37:55 -07:00
Daniel Cotey 7cdaac387c Staging: silicom: bp_mod.h: checkpatch tab and space cleanup
second chunk of bp_mod.h's cleanup

Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 05:37:54 -07:00
Daniel Cotey 490deb7927 Staging: silicom: bp_mod.h: checkpatch tab and space cleanup
first chunk of bp_mod.h's cleanup

Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 05:37:54 -07:00
Ben Hutchings 40fe4f8967 staging: speakup_soft: Fix reading of init string
softsynth_read() reads a character at a time from the init string;
when it finds the null terminator it sets the initialized flag but
then repeats the last character.

Additionally, if the read() buffer is not big enough for the init
string, the next read() will start reading from the beginning again.
So the caller may never progress to reading anything else.

Replace the simple initialized flag with the current position in
the init string, carried over between calls.  Switch to reading
real data once this reaches the null terminator.

(This assumes that the length of the init string can't change, which
seems to be the case.  Really, the string and position belong together
in a per-file private struct.)

Tested-by: Samuel Thibault <sthibault@debian.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 05:32:50 -07:00
Devendra Naga 0c4a9f6e0a staging: silicom: fix a comparing proc_dir_entry pointer against 0
we should be using the NULL macro, not 0 to compare against
a pointer value, and also remove braces around the single
if conditional after the create_proc_entry

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 05:31:33 -07:00
Devendra Naga ad139634c5 staging: ft1000: replace c99 comments with c88
replace some of the c99 comments to the structures with c88 comment style
no code change is done here.

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 05:31:32 -07:00
Dan Carpenter 82e6bb0398 Staging: silicom: use kstrtoint_from_user()
The main problem with the hand rolled code was that there weren't any
range checks so you could corrupt memory by writing too much data to
the proc file.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 05:22:09 -07:00
Dan Carpenter e4c536b72f Staging: silicom: add some range checks to proc functions
If you tried to cat more than 255 characters (the last character is for
the terminator) to these proc files then it would corrupt kernel memory.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 05:22:09 -07:00
Ian Abbott a09b027882 staging: comedi: mite: use module_init()/module_exit()
Rename the standard `init_module()` and `cleanup_module()` functions and
make them static.  Use `module_init()` and `module_exit()` to mark the
renamed functions as the module init and exit functions.

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-17 05:09:10 -07:00
Ian Abbott 551e2c3cf7 staging: comedi: mite: remove list of devices
All the drivers that use the "mite" module now allocate a `struct
mite_struct` dynamically instead of searching the `mite_devices` list
populated during initialization of the "mite" module.

Remove the list of devices and the function that prints available NI
devices on the list (`mite_list_devices()`).  The list node and `used`
members in `struct mite_struct` are now redundant, so remove them.

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-17 05:09:10 -07:00
Ian Abbott a5cf79e3ac staging: comedi: ni_pcimio: use mite_alloc()
Allocate `struct mite_device` dynamically instead of searching for
one on the `mite_devices` list constructed by the "mite" module.

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-17 05:09:10 -07:00
Ian Abbott f822a6a1a1 staging: comedi: ni_pcidio: use mite_alloc()
Allocate `struct mite_device` dynamically instead of searching for
one on the `mite_devices` list constructed by the "mite" module.

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-17 05:09:09 -07:00
Ian Abbott e4ff75b58a staging: comedi: ni_labpc: use mite_alloc()
Allocate `struct mite_device` dynamically instead of searching for
one on the `mite_devices` list constructed by the "mite" module.

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-17 05:09:09 -07:00
Ian Abbott 604d66ce56 staging: comedi: ni_670x: remove spurious free_irq() call
This driver's comedi `detach` handler (`ni_670x_detach()`) calls
`free_irq()` but the driver doesn't call `request_irq()` anywhere.
Remove the spurious call.

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-17 05:09:09 -07:00
Ian Abbott 6bc42c2228 staging: comedi: ni_670x: use mite_alloc()
Allocate `struct mite_device` dynamically instead of searching for
one on the `mite_devices` list constructed by the "mite" module.

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-17 05:09:09 -07:00
Ian Abbott 05ac0635a5 staging: comedi: ni_660x: use mite_alloc()
Allocate `struct mite_device` dynamically instead of searching for
one on the `mite_devices` list constructed by the "mite" module.

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-17 05:09:08 -07:00
Ian Abbott 2967d0ae4c staging: comedi: ni_65xx: use mite_alloc()
Allocate `struct mite_device` dynamically instead of searching for
one on the `mite_devices` list constructed by the "mite" module.

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-17 05:09:08 -07:00
Ian Abbott 6dc71205fc staging: comedi: ni_6527: use mite_alloc()
Allocate `struct mite_device` dynamically instead of searching for
one on the `mite_devices` list constructed by the "mite" module.

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-17 05:09:08 -07:00
Ian Abbott ca8eb8d5c8 staging: comedi: mite: add mite_alloc() and mite_free()
Add `mite_alloc()` to allow drivers to allocate and initialize a `struct
mite_struct` dynamically and export it.  Add `mite_free()`, which is
currently just an inline wrapper for `kfree()`.

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-17 05:09:08 -07:00
Ian Abbott d799773f68 staging: comedi: mite: replace printk() calls
Replace the `printk()` calls in this module with `dev_...()` calls where
possible or `pr_...()` calls otherwise.

Rework the normally ifdefed out (by the `DEBUG_MITE` macro)
`mite_dump_regs()` to dump register offsets instead of remapped
addresses.

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-17 05:09:08 -07:00
Ian Abbott d6f015b6ad staging: comedi: mite: use ilog2()
The static inline functions `MITE_IODWBSR_1_WSIZE_bits()` and `CR_RL()`
in "mite.h" work out a base-2 logarithm using a `while` loop.  Change
them to use `ilog2()`.  Also change `CR_RL()` to clamp the maximum value
instead of printing an error.

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-17 05:09:07 -07:00
Ian Abbott 7d24e1ac00 staging: comedi: mite: export mite_alloc_ring() and mite_free_ring()
The `mite_alloc_ring()` and `mite_free_ring()` static inline functions
in "mite.h" are reasonably large.  Transfer them to "mite.c" and export
them.

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-17 05:09:07 -07:00
Ian Abbott ae0318019f staging: comedi: mite: make internal functions static
Declare some non-exported functions in "mite.c" `static` and remove
their declarations from "mite.h".

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-17 05:09:07 -07:00
Ian Abbott b021367487 staging: comedi: ni_pcimio: Use comedi attach_pci callback
Convert this PCI driver to use the comedi `attach_pci` callback instead
of the `attach` callback for PCI auto-configuration.  There is no need
to support manual attachment of PCI devices supported by this driver, so
remove the `attach` callback altogether.

Note that this driver still uses the list of PCI "mite" devices created
by the "mite" module.  This will be dealt with by a later patch once
dynamic allocation of "mite" structures has been implemented.

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-17 05:09:07 -07:00
Ian Abbott 9c4aef95d2 staging: comedi: ni_pcimio: Add semicolon to module_comedi_pci_driver()
Add a semi-colon after the macro call
`module_comedi_pci_driver(ni_pcimio_driver, ni_pcimio_pci_driver)`.  It
compiles with or without the semicolon but it ought to have 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>
2012-09-17 05:09:07 -07:00
Ian Abbott 5b6137d880 staging: comedi: ni_mio_common: don't pass config options to ni_E_init()
`ni_E_init()` doesn't use the second parameter pointing to a `struct
comedi_devconfig` passed from a comedi `attach` handler, so remove the
parameter.

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-17 05:09:06 -07:00
Ian Abbott 21b74c2785 staging: comedi: ni_pcidio: use comedi attach_pci callback
Convert this PCI driver to use the comedi `attach_pci` callback instead
of the `attach` callback for PCI auto-configuration.  There is no need
to support manual attachment of PCI devices supported by this driver, so
remove the `attach` callback altogether.

Note that this driver still uses the list of PCI "mite" devices created
by the "mite" module.  This will be dealt with by a later patch once
dynamic allocation of "mite" structures has been implemented.

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-17 05:09:06 -07:00
Ian Abbott 9fb5c14ceb staging: comedi: ni_pcidio: use request_firmware()
The PCI-6534 needs three firmware files loading to work with the driver.
That is currently done by passing the firmware data using the
`COMEDI_DEVCONFIG` ioctl that uses the comedi `attach()` hook in the
driver.  This doesn't work for auto-configured PCI devices (which also
currently use the `attach()` hook in this driver, but doesn't have the
firmware-loading options set in the `struct comedi_devconfig *`
parameter).

Change the driver to request the firmware files using
`request_firmware()`, ignoring any firmware-loading options set in the
`struct comedi_devconfig`.

The PCI-6534 has a main FPGA which needs to be loaded first, and two
"scarabs".  Scarab A is loaded with firmware to support digital input
mode, and scarab B is loaded with firmware to support digital output
mode.

I don't think the order of loading the scarab firmwares matters as long
as they are loaded with the correct firmware files.  This update loads
scarab B first, whereas the original code loaded scarab A first.  The
firmware files are loaded in the following order:

A) main FPGA: "ni6534a.bin" (FW_PCI_6534_MAIN)
B) scarab B: "niscrb02.bin" (FW_PCI_6534_SCARAB_DO)
C) scarab A: "niscrb01.bin" (FW_PCI_6534_SCARAB_DI)

The required firmware files can be found in the
"comedi-nonfree-firmware" tar-ball at
<http://www.comedi.org/download/comedi-nonfree-firmware-2007.06.22.tar.gz>.

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-17 05:09:06 -07:00
Ian Abbott 6b26ecf047 staging: comedi: ni_pcidio: convert printk() calls
Convert the `printk()` calls in this driver to use the `dev_...()` calls
where possible, or the `pr_...()` calls otherwise.  Combine
non-line-terminated prints into single-line prints.

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-17 05:09:06 -07:00
Ian Abbott 7e2716cdc3 staging: comedi: ni_labpc: use comedi attach_pci callback
Convert this PCI driver to use the comedi `attach_pci` callback instead
of the `attach` callback for PCI auto-configuration.  Remove support for
manual attachment of PCI boards supported by this driver.  The `attach`
callback is still needed to manually attach ISA boards, but print an
error if an attempt is made to manually attach a PCI board.

Note that this driver still uses the list of PCI "mite" devices created
by the "mite" module.  This will be dealt with by a later patch once
dynamic allocation of "mite" structures has been implemented.

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-17 05:09:05 -07:00
Ian Abbott 5e51f0db14 staging: comedi: ni_labpc: move labpc_driver and labpc_pci_table
Move the `labpc_driver` and `labpc_pci_table` variables nearer the
module initialization code near the bottom of the module for aesthetic
reasons and to avoid a forward declaration of `labpc_attach()`.

As a consequence, to avoid having to add a forward declaration of the
`labpc_driver` variable, change code that uses
`labpc_driver.driver_name` to use `DRV_NAME` instead, and change code
that uses `labpc_driver.num_names` to use `ARRAY_SIZE(labpc_boards)`
instead.

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-17 05:09:05 -07:00
Ian Abbott 3faeeecbc8 staging: comedi: ni_labpc: use module_comedi_pci_driver()
Use the macro `module_comedi_pci_driver(comedi_driver, pci_driver)` to
register the module as a Comedi PCI driver if the module supports PCI
devices, otherwise use `module_comedi_driver(comedi_driver)` to register
it as an ordinary Comedi driver.  Rename variables and functions that
have prefix `driver_` for consistency.  Set the `name` member of the
`struct pci_driver` variable in its initializer instead of initializing
it in the module initialization function.

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-17 05:09:05 -07:00
Ian Abbott 1cabcd3164 staging: comedi: ni_labpc: convert printk() to dev_...()
Convert the `printk()` calls in this driver to use the `dev_...()` calls
where possible, or the `pr_...()` calls otherwise.  Remove the ifdefed
out code that prints the EEPROM contents.

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-17 05:09:05 -07:00
Ian Abbott c33e23f776 staging: comedi: ni_670x: use comedi attach_pci callback
Convert this PCI driver to use the comedi `attach_pci` callback instead
of the `attach` callback for PCI auto-configuration.  There is no need
to support manual attachment of PCI devices supported by this driver, so
remove the `attach` callback altogether.

Note that this driver still uses the list of PCI "mite" devices created
by the "mite" module.  This will be dealt with by a later patch once
dynamic allocation of "mite" structures has been implemented.

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-17 05:09:05 -07:00