staging: comedi: addi-data: remove irq parameter from i_pci_card_data()
The irq parameter passed to i_pci_card_data() is used to get the pci_dev
irq that is cached in the card data. This information can easily be found
when needed in i_ADDI_Attach() from the 'card' pointer to the card data.
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>
staging: comedi: addi-data: remove unused parameters from i_pci_card_data()
The pci_bus, pci_slot, and pci_func data returned by i_pci_card_data()
are not used. Remove them from the parameters to the function and also
remove the local variables in i_ADDI_Attach() that held the returned
data.
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>
Pull the module init code out of addi_common.c and add it to
each addi-data driver. Rename the data and functions so they
have namespace associated with the drivers.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This source file is #include'd when building the addi_apci_3200 and
addi_apci_3300 driver. All the functions in this file are actually
static and should not be exported to the kernel.
Move some of the functions to remove the need for the forward declarations
and make all of the functions in this file static. Note, this patch does
not try to fix any of the coding style issues in the functions.
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>
This source file is #include'd when building the addi_apci_1710 driver.
All the functions in this file are actually static and should not be
exported to the kernel.
Move some of the functions to remove the need for the forward declarations
and make all of the functions in this file static. Note, this patch does
not try to fix any of the coding style issues in the functions.
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>
This source file is #include'd when building the addi_apci_1710 driver.
All the functions in this file are actually static and should not be
exported to the kernel.
Move some of the functions to remove the need for the forward declarations
and make all of the functions in this file static. Note, this patch does
not try to fix any of the coding style issues in the functions.
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>
This source file is #include'd when building the addi_apci_1710 driver.
All the functions in this file are actually static and should not be
exported to the kernel.
Move some of the functions to remove the need for the forward declarations
and make all of the functions in this file static. Note, this patch does
not try to fix any of the coding style issues in the functions.
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>
This source file is #include'd when building the addi_apci_1710 driver.
All the functions in this file are actually static and should not be
exported to the kernel.
Move some of the functions to remove the need for the forward declarations
and make all of the functions in this file static. Note, this patch does
not try to fix any of the coding style issues in the functions.
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>
This source file is #include'd when building the addi_apci_3001 and
addi_apci_3120 drivers. All the functions in this file are actually
static and should not be exported to the kernel.
Move some of the functions to remove the need for the forward declarations
and make all of the functions in this file static. Note, this patch does
not try to fix any of the coding style issues in the functions.
Also, remove most of the big comment blocks preceding each function.
Leave the 'task' information for some of them to assist in later cleanup.
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>
Xiaotian Feng [Wed, 31 Oct 2012 10:56:48 +0000 (18:56 +0800)]
staging: ozwpan: use tasklet_kill in device remove/release process
Some driver uses tasklet_disable in device remove/release process,
tasklet_disable will inc tasklet->count and return. If the tasklet
is not handled yet under some softirq pressure, the tasklet will be
placed on the tasklet_vec, never have a chance to be excuted. This might
lead to a heavy loaded ksoftirqd, wakeup with pending_softirq, but
tasklet is disabled. tasklet_kill should be used in this case.
Signed-off-by: Xiaotian Feng <dannyfeng@tencent.com> Cc: Rupesh Gujare <rgujare@ozmodevices.com> Cc: Chris Kelly <ckelly@ozmodevices.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Wed, 31 Oct 2012 11:56:23 +0000 (11:56 +0000)]
staging: comedi: rtd520: use auto_attach instead of attach_pci
Change the rtd520 driver to use the new `auto_attach()` method in
`struct comedi_driver` instead of the `attach_pci()` method. I plan to
remove the `attach_pci()` and `attach_usb()` methods once nothing is
using them.
Tag the new `rtd520_auto_attach()` function definition with `__devinit`
as it is only called during PCI probe.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: zram: factor-out zram_decompress_page() function
zram_bvec_read() shared decompress functionality with zram_read_before_write() function.
Factor-out and make commonly used zram_decompress_page() function, which also simplified
error handling in zram_bvec_read().
Kevin McKinney [Wed, 31 Oct 2012 01:50:43 +0000 (21:50 -0400)]
Staging: bcm: Remove typedef for stLocalSFAddIndicationAlt and call directly.
This patch removes typedef for
stLocalSFAddIndicationAlt, changes the
name of the struct to bcm_add_indication_alt,
and removes a comment. In addition, any
calls to typedef stLocalSFAddIndicationAlt
are changed to call the struct directly.
Signed-off-by: Kevin McKinney <klmckinney1@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Devendra Naga [Tue, 30 Oct 2012 19:18:40 +0000 (15:18 -0400)]
staging: csr: os.c: remove col variable
theres no point in checking the col variable,
its always zero, and wont print a new line, actually
its better to have a new line after a set of characters
printed, instead of confusing with the concatenated
characters when called multiple times at a time.
The PHY registers are now being controlled from the connected phydev,
so there shouldn't be any reason for the et131x code to perform any
extra setup. Removing the interrupt setup code, and register defines
that are now unused.
On testing, no changes in behaviour were experienced.
Signed-off-by: Mark Einon <mark.einon@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
During a previous refactoring excerise, two NULL pointer assingments
were moved to their respective pointer declarations. Dan Carpenter
correctly points out that these assignments are not needed.
Removing them.
Also two small whitespace changes - rejoining split lines, as they are
now less than 80 chars.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Mark Einon <mark.einon@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Mark Einon [Tue, 30 Oct 2012 18:38:55 +0000 (18:38 +0000)]
staging: et131x: Refactor nic_rx_pkts() to remove indenting
In nic_rx_pkts() some large chunks of code are indented in 'if (len)'
sections. Refactor the code to remove these indents and re-join longer
split lines.
Signed-off-by: Mark Einon <mark.einon@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Tue, 30 Oct 2012 13:30:04 +0000 (13:30 +0000)]
staging: comedi/drivers: use auto_attach instead of attach_pci
Change comedi drivers for PCI boards to use the new `auto_attach()`
method instead of the `attach_pci()` method. I plan to remove the
`attach_pci()` and `attach_usb()` methods from `struct comedi_driver`
once nothing is using them.
Tag the functions with `__devinit` where they are not already so tagged,
as they are only called during PCI probe.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Tue, 30 Oct 2012 13:30:03 +0000 (13:30 +0000)]
staging: comedi/drivers: use auto_attach instead of attach_usb
Change the usbdux, usbduxfast and usbduxsigma drivers to use the new
`auto_attach()` method instead of the `attach_usb()` method. I plan to
remove the `attach_usb()` and `attach_pci()` methods from `struct
comedi_driver` once nothing is using them.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Add namespace by renaming this CamelCase function to
addi_eeprom_read_info().
Remove the 'type' parameter. This parameter is a char pointer to the
string name of the eeprom type used on the board. This can be found
when needed using the dev pointer.
Change the parameter order so that the comedi_device pointer is passed
first.
The return value is always 0 and it's never checked. Change it to void.
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>
Use this function to set the private data instead of doing it in the
i_EepromReadMainHeader() function. Keep the eeprom read code #if 0'ed
out for now.
Add namespace by renaming this CamelCase function to
addi_eeprom_read_timer_info().
Remove the unused str_TimerMainHeader and str_TimerDetails structs.
The return value is always 0 and it's never checked. Change it to void.
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>
Add namespace by renaming this CamelCase function to
addi_eeprom_read_ai_info().
Refactor the function so that it stores the data from the eeprom directly
in the private data instead of using the a struct to pass the data back
to i_EepromReadMainHeader(). This allows removing the str_AnalogInputHeader
struct.
The return value is always 0 and it's never checked. Change it to void.
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>
Add namespace by renaming this CamelCase function to
addi_eeprom_read_ao_info().
Refactor the function so that it stores the data from the eeprom directly
in the private data instead of using the a struct to pass the data back
to i_EepromReadMainHeader(). This allows removing the str_AnalogOutputHeader
struct.
The return value is always 0 and it's never checked. Change it to void.
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>
Add namespace by renaming this CamelCase function to
addi_eeprom_read_do_info().
Refactor the function so that it stores the data from the eeprom directly
in the private data instead of using the a struct to pass the data back
to i_EepromReadMainHeader(). This allows removing the str_DigitalOutputHeader
struct.
The return value is always 0 and it's never checked. Change it to void.
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>
Add namespace by renaming this CamelCase function to
addi_eeprom_read_di_info().
Refactor the function so that it stores the data from the eeprom directly
in the private data instead of using the a struct to pass the data back
to i_EepromReadMainHeader(). This allows removing the str_DigitalInputHeader
struct.
Leave the reads of the unused eeprom data for now.
The return value is always 0 and it's never checked. Change it to void.
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>
Consolidate the two loops used to read the main header data and the
individual function header data from the eeprom.
The structs used to read the main header are not used outside this
function so remove them by reading the eeprom data into local
variables used in the loop.
Consolidate the 'timer' function cases.
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>
staging: comedi: addi_eeprom: move the eeprom offset to addi_eeprom_readw()
All the addi_eeprom_readw() calls have the offset to the start of user
data (0x100) as part of the address calculation. Create a define for this
constant and move it's addition to the address into addi_eeprom_readw().
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>
staging: comedi: addi_eeprom: make v_EepromWaitBusy() static
This function is only used in this file. Move it to remove the need
for the forward declaration.
Also, remove the comment about an error in the data book. It's not
really an error just someones misunderstanding about doing a byte
read of a dword register.
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>