linux-2.6
14 years agoStaging: w35und: move hal_init_hardware() and hal_halt() int wbusb.c
Pekka Enberg [Wed, 8 Apr 2009 08:13:57 +0000 (11:13 +0300)] 
Staging: w35und: move hal_init_hardware() and hal_halt() int wbusb.c

Impact: cleanup

The hal_init_hardware() and hal_halt() functions are only used in
wbusb.c so move them there.

Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: w35und: replace switch error handling with gotos in wb35_hw_init()
Pekka Enberg [Wed, 8 Apr 2009 08:13:56 +0000 (11:13 +0300)] 
Staging: w35und: replace switch error handling with gotos in wb35_hw_init()

Impact: cleanup

This patch replaces the switch-based error handling in wb35_hw_init()
with regular gotos.

Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: w35und: remove unused code from wbsoft_configure_filter()
Pekka Enberg [Fri, 27 Mar 2009 17:46:45 +0000 (19:46 +0200)] 
Staging: w35und: remove unused code from wbsoft_configure_filter()

We don't initialize hardware multicast filter in the driver nor do we know how
to do that. Therefore, remove some code that isn't actually used from
wbsoft_configure_filter().

Cc: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging winbond: boolean negation and bitwise operation in wrong order
Diego Liziero [Tue, 14 Apr 2009 02:33:54 +0000 (04:33 +0200)] 
Staging winbond: boolean negation and bitwise operation in wrong order

The semantic patch that makes this change is:
(http://www.emn.fr/x-info/coccinelle/)

@@ expression E; constant C; @@
(
- !E == C
+ E != C
)

Signed-off-by: Diego Liziero <diegoliz@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: otus: beyond ARRAY_SIZE of wd->ap.wds.encryMode
Roel Kluin [Wed, 20 May 2009 00:36:29 +0000 (02:36 +0200)] 
Staging: otus: beyond ARRAY_SIZE of wd->ap.wds.encryMode

Do not go beyond ARRAY_SIZE of wd->ap.wds.encryMode

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: otus: 80211core/ccmd.c: Fix Coding Style
Dragoslav Zaric [Sun, 26 Apr 2009 08:19:02 +0000 (10:19 +0200)] 
Staging: otus: 80211core/ccmd.c: Fix Coding Style

Signed-off-by: Dragoslav Zaric <dragoslav.zaric.kd@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: remove driver_data direct access of struct device
Greg Kroah-Hartman [Thu, 30 Apr 2009 21:43:31 +0000 (14:43 -0700)] 
Staging: remove driver_data direct access of struct device

In the near future, the driver core is going to not allow direct access
to the driver_data pointer in struct device.  Instead, the functions
dev_get_drvdata() and dev_set_drvdata() should be used.  These functions
have been around since the beginning, so are backwards compatible with
all older kernel versions.

Cc: Leon Woestenberg <leon@sidebranch.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: fix operator precedence errors
Roel Kluin [Thu, 16 Apr 2009 20:22:40 +0000 (22:22 +0200)] 
Staging: fix operator precedence errors

`!' has a higher precedence than `&' and `|' has a higher precedence than `?'

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: stlc45xx: replace print_mac with %pM
Alexander Beregalov [Sat, 11 Apr 2009 19:03:04 +0000 (23:03 +0400)] 
Staging: stlc45xx: replace print_mac with %pM

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: remove unused #include <linux/version.h>'s
Huang Weiyi [Mon, 6 Apr 2009 09:20:29 +0000 (17:20 +0800)] 
Staging: remove unused #include <linux/version.h>'s

Remove unused #include <linux/version.h>'s.

Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: rt3070: remove dupilcated #include
Huang Weiyi [Mon, 6 Apr 2009 09:20:23 +0000 (17:20 +0800)] 
Staging: rt3070: remove dupilcated #include

Remove dupilcated #include in drivers/staging/rt3070/rt_linux.h.

Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: rtl8187se: wmm_param[1].ac_aci_acm_aifsn tested twice
Roel Kluin [Mon, 18 May 2009 15:31:36 +0000 (17:31 +0200)] 
Staging: rtl8187se: wmm_param[1].ac_aci_acm_aifsn tested twice

wmm_param[1].ac_aci_acm_aifsn was tested twice, the second should have been
wmm_param[3].ac_aci_acm_aifsn.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: rtl8187se: convert to net_device_ops
Alexander Beregalov [Sat, 9 May 2009 23:06:54 +0000 (03:06 +0400)] 
Staging: rtl8187se: convert to net_device_ops

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: rtl8187se: Use to_delayed_work
Jean Delvare [Fri, 3 Apr 2009 15:46:49 +0000 (17:46 +0200)] 
Staging: rtl8187se: Use to_delayed_work

Use the recently added to_delayed_work() helper function.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: rt2870: Don't call sprintf() with overlapping input and output.
Anders Kaseorg [Tue, 24 Mar 2009 20:41:55 +0000 (16:41 -0400)] 
Staging: rt2870: Don't call sprintf() with overlapping input and output.

The use of sprintf() to append to a buffer, as in
  sprintf(buf, "%sEntry: %d\n", buf, i)
is not valid according to C99 ("If copying takes place between objects
that overlap, the behavior is undefined.").  It breaks at least in
userspace under gcc -D_FORTIFY_SOURCE.  Replace this construct with
  sprintf(buf + strlen(buf), "Entry: %d\n", i)

This patch was automatically generated using
  perl -0pe 's/(sprintf\s*\(\s*([^,]*))(\s*,\s*")%s((?:[^"\\]|\\.)*"\s*,)\s*\2\s*,/$1 + strlen($2)$3$4/g'
  perl -0pe 's/(snprintf\s*\(\s*([^,]*))(\s*,[^,]*?)(\s*,\s*")%s((?:[^"\\]|\\.)*"\s*,)\s*\2\s*,/$1 + strlen($2)$3 - strlen($2)$4$5/g'

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: rt2860: Don't call sprintf() with overlapping input and output.
Anders Kaseorg [Tue, 24 Mar 2009 20:40:41 +0000 (16:40 -0400)] 
Staging: rt2860: Don't call sprintf() with overlapping input and output.

The use of sprintf() to append to a buffer, as in
  sprintf(buf, "%sEntry: %d\n", buf, i)
is not valid according to C99 ("If copying takes place between objects
that overlap, the behavior is undefined.").  It breaks at least in
userspace under gcc -D_FORTIFY_SOURCE.  Replace this construct with
  sprintf(buf + strlen(buf), "Entry: %d\n", i)

This patch was automatically generated using
  perl -0pe 's/(sprintf\s*\(\s*([^,]*))(\s*,\s*")%s((?:[^"\\]|\\.)*"\s*,)\s*\2\s*,/$1 + strlen($2)$3$4/g'
  perl -0pe 's/(snprintf\s*\(\s*([^,]*))(\s*,[^,]*?)(\s*,\s*")%s((?:[^"\\]|\\.)*"\s*,)\s*\2\s*,/$1 + strlen($2)$3 - strlen($2)$4$5/g'

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: rt3070: replace __FUNCTION__ usages
Alessio Igor Bogani [Tue, 24 Mar 2009 18:30:26 +0000 (19:30 +0100)] 
Staging: rt3070: replace __FUNCTION__ usages

__FUNCTION__ is gcc-specific, use __func__

Signed-off-by: Alessio Igor Bogani <abogani@texware.it>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: sxg: Add missing __devexit_p()
Jean Delvare [Thu, 4 Jun 2009 11:35:15 +0000 (13:35 +0200)] 
Staging: sxg: Add missing __devexit_p()

The remove function uses __devexit, so the .remove assignment needs
__devexit_p() to fix a build error with hotplug disabled.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: sxg: replace __FUNCTION__ usages
Alessio Igor Bogani [Tue, 24 Mar 2009 18:29:45 +0000 (19:29 +0100)] 
Staging: sxg: replace __FUNCTION__ usages

__FUNCTION__ is gcc-specific, use __func__

Signed-off-by: Alessio Igor Bogani <abogani@texware.it>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: meilhaus: fix build warnings
Greg Kroah-Hartman [Thu, 4 Jun 2009 18:29:54 +0000 (11:29 -0700)] 
Staging: meilhaus: fix build warnings

This fixes some build warnings in the meilhaus driver.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: meilhaus: Remove long-deprecated SA_* interrupt macros.
Robert P. J. Day [Sat, 9 May 2009 13:40:14 +0000 (09:40 -0400)] 
Staging: meilhaus: Remove long-deprecated SA_* interrupt macros.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agostaging: meilhaus, move tables to .c
Jiri Slaby [Thu, 26 Mar 2009 08:34:13 +0000 (09:34 +0100)] 
staging: meilhaus, move tables to .c

Remove pci and usb tables from the header and place them directly in
the code.

While at it, use PCI_VDEVICE() to shorten the code.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: David Kiliani <mail@davidkiliani.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agostaging: meilhaus, annotate cpi functions
Jiri Slaby [Thu, 26 Mar 2009 08:34:12 +0000 (09:34 +0100)] 
staging: meilhaus, annotate cpi functions

Add __devinit and __devexit to pci probe/remove. Also make pci_driver
static.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: David Kiliani <mail@davidkiliani.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agostaging: meilhaus, switch to misc device
Jiri Slaby [Thu, 26 Mar 2009 08:34:11 +0000 (09:34 +0100)] 
staging: meilhaus, switch to misc device

There is no need to occupy one major number because of one device.

Switch to misc device, which also emits uevent, so that the dev node
is also created by udev.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: David Kiliani <mail@davidkiliani.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: agnx: fix build warnings
Greg Kroah-Hartman [Thu, 4 Jun 2009 18:29:54 +0000 (11:29 -0700)] 
Staging: agnx: fix build warnings

This fixes some build warnings in the agnx driver.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: agnx: replace print_mac with %pM
Alexander Beregalov [Sat, 11 Apr 2009 19:01:21 +0000 (23:01 +0400)] 
Staging: agnx: replace print_mac with %pM

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agostaging: agnx, fix bssid compiler warnings
Jiri Slaby [Thu, 26 Mar 2009 08:34:10 +0000 (09:34 +0100)] 
staging: agnx, fix bssid compiler warnings

conf->bssid is const. Propagate const to not get compiler warnings:
agnx/pci.c: In function ‘agnx_config_interface’:
agnx/pci.c:319: warning: passing argument 2 of ‘agnx_set_bssid’ discards qualifiers from pointer target type
agnx/pci.c:321: warning: passing argument 2 of ‘hash_write’ discards qualifiers from pointer target type

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agostaging: agnx, fix fail paths in probe
Jiri Slaby [Thu, 26 Mar 2009 08:34:09 +0000 (09:34 +0100)] 
staging: agnx, fix fail paths in probe

Return error on fail paths instead of 0.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agostaging: agnx, remove memlens from probe
Jiri Slaby [Thu, 26 Mar 2009 08:34:08 +0000 (09:34 +0100)] 
staging: agnx, remove memlens from probe

Pass 0 to pci_iomap instead. It will cope with that per se.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agostaging: agnx, probe cleanup
Jiri Slaby [Thu, 26 Mar 2009 08:34:07 +0000 (09:34 +0100)] 
staging: agnx, probe cleanup

- switch printks to dev_*
- remove useless comments
- remove useless prints (for info we can obtain from lspci or /sys)

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: comedi: uses udelay, needs delay.h
Randy Dunlap [Fri, 5 Jun 2009 18:10:42 +0000 (11:10 -0700)] 
Staging: comedi: uses udelay, needs delay.h

comedi driver(s) use udelay() so they need to #include delay.h.

drivers/staging/comedi/drivers/adq12b.c: In function 'adq12b_ai_rinsn':
drivers/staging/comedi/drivers/adq12b.c:328: error: implicit declaration of function 'udelay'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: comedi: cb_pcidas.c: Fix build warning (type mismatch)
Gerard Lledo [Wed, 27 May 2009 14:35:19 +0000 (17:35 +0300)] 
Staging: comedi: cb_pcidas.c: Fix build warning (type mismatch)

spin_lock_irqsave expects flags to be unsigned long, not unsigned int.

Signed-off-by: Gerard Lledo <gerard.lledo@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: comedi: usbdux: buffer overflow error handling
Bernd Porr [Sun, 24 May 2009 19:36:09 +0000 (20:36 +0100)] 
Staging: comedi: usbdux: buffer overflow error handling

These changes guarantee that the URBs are not resubmitted in case of a
comedi buffer overflow.  Otherwise this runs in the background even when
the userspace program has terminated.

From: Bernd Porr <BerndPorr@f2s.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agostaging: comedi: Move pcm do_cmdtest function into a single source file
Bill Pemberton [Thu, 14 May 2009 19:24:29 +0000 (15:24 -0400)] 
staging: comedi: Move pcm do_cmdtest function into a single source file

Many of the comedi source code has functions that were created with
cut and paste, this moves the do_cmdtest function into a single file.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agostaging: comedi: Remove MIN macro
Bill Pemberton [Thu, 14 May 2009 19:24:28 +0000 (15:24 -0400)] 
staging: comedi: Remove MIN macro

Remove the MIN() macro and instead use the min() provided by kernel.h

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agostaging: comedi: fix missing parentheses
Roel Kluin [Thu, 14 May 2009 11:58:26 +0000 (13:58 +0200)] 
staging: comedi: fix missing parentheses

Add missing parentheses.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: comedi: data.c should include delay.h
Alexander Beregalov [Wed, 13 May 2009 13:23:42 +0000 (17:23 +0400)] 
Staging: comedi: data.c should include delay.h

Fix this build error:
.../data.c:86: error: implicit declaration of function 'udelay'

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: comedi: comedi_test.c should include timer.h
Alexander Beregalov [Wed, 13 May 2009 13:00:47 +0000 (17:00 +0400)] 
Staging: comedi: comedi_test.c should include timer.h

Fix this build error:
.../comedi_test.c:82: error: field timer has incomplete type
.../comedi_test.c: In function waveform_ai_interrupt:
.../comedi_test.c:188: error: implicit declaration of function mod_timer
.../comedi_test.c:188: error: jiffies undeclared (first use in this function)

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agostaging: comedi: fix pcmcia build breakage
Greg Kroah-Hartman [Tue, 2 Jun 2009 18:51:04 +0000 (11:51 -0700)] 
staging: comedi: fix pcmcia build breakage

Add PCCARD dependancy to the PCMCIA drivers to fix build breakage.

Reported-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: Comedi: vmk80xx: Add k8061 support
Manuel Gebele [Sun, 10 May 2009 10:00:43 +0000 (12:00 +0200)] 
Staging: Comedi: vmk80xx: Add k8061 support

This patch adds support for the Velleman K8061 USB board
http://www.velleman.be/ot/en/product/view/?id=364910

Signed-off-by: Manuel Gebele <forensixs@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: comedi: simply read and write functions in adl_pci8164
Bill Pemberton [Sun, 26 Apr 2009 18:45:12 +0000 (14:45 -0400)] 
Staging: comedi: simply read and write functions in adl_pci8164

There are several read and write functions in adl_pci8164 that are
essentially the same thing.  They were created with a cut and paste.
Change them to use a common function.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: comedi: replace for loop with msleep()
Bill Pemberton [Sun, 26 Apr 2009 18:45:11 +0000 (14:45 -0400)] 
Staging: comedi: replace for loop with msleep()

Replace 2 attempts to use a for loop as a sleep with a call to msleep().

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: comedi: remove some RT code that lingered
Greg Kroah-Hartman [Mon, 27 Apr 2009 22:15:30 +0000 (15:15 -0700)] 
Staging: comedi: remove some RT code that lingered

This removes some pieces of RT code that was part of the main code
paths.

Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: comedi: remove RT code
Greg Kroah-Hartman [Mon, 27 Apr 2009 22:14:34 +0000 (15:14 -0700)] 
Staging: comedi: remove RT code

This removes the unused RT code from the comedi subsystem.

A lot of drivers needed to then include interrupt.h on their own, as they
were picking it up through the comedi_rt.h inclusion.

Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: comedi: remove comedi-specific wrappers
Greg Kroah-Hartman [Mon, 27 Apr 2009 21:44:31 +0000 (14:44 -0700)] 
Staging: comedi: remove comedi-specific wrappers

There are a number of comedi "wrappers" for some RT functions that are
about to go away.  This patch removes all of the wrapper calls within
the comedi drivers and core in order to prepare for removing the RT
comedi code.

Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: comedi: convert usbdux* to use firmware_request
Bernd Porr [Fri, 17 Apr 2009 20:21:46 +0000 (21:21 +0100)] 
Staging: comedi: convert usbdux* to use firmware_request

The firmware is now in the linux-firmware tree, so we can move these two
drivers to use the proper request_firmware infrastructure.

From: Bernd Porr <BerndPorr@f2s.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: comedi: move while to same line as } in do loops
Bill Pemberton [Thu, 23 Apr 2009 19:54:58 +0000 (15:54 -0400)] 
Staging: comedi: move while to same line as } in do loops

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: comedi: comment out useless if
Bill Pemberton [Thu, 23 Apr 2009 19:54:57 +0000 (15:54 -0400)] 
Staging: comedi: comment out useless if

This if test doesn't do anything, so comment it out.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: comedi: make use of ARRAY_SIZE macro
Bill Pemberton [Thu, 23 Apr 2009 19:54:56 +0000 (15:54 -0400)] 
Staging: comedi: make use of ARRAY_SIZE macro

Replace instances of computing number of elements in an array with
sizeof(foo)/sizeof(struct footype) with the ARRAY_SIZE macro.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: comedi: more fix the way structs are initialized.
Bill Pemberton [Thu, 23 Apr 2009 19:54:55 +0000 (15:54 -0400)] 
Staging: comedi: more fix the way structs are initialized.

Change from the foo: bar format to the .foo = bar format.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: comedi: more fix "foo * bar" should be "foo *bar"
Bill Pemberton [Thu, 23 Apr 2009 19:54:54 +0000 (15:54 -0400)] 
Staging: comedi: more fix "foo * bar" should be "foo *bar"

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: comedi: remove space after ampersand
Bill Pemberton [Thu, 23 Apr 2009 19:54:53 +0000 (15:54 -0400)] 
Staging: comedi: remove space after ampersand

Change calses of & foo to &foo as suggested by checkpatch.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: comedi: more remove C99 comments
Bill Pemberton [Thu, 23 Apr 2009 19:54:52 +0000 (15:54 -0400)] 
Staging: comedi: more remove C99 comments

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: comedi: fix the way structs are initialized.
Bill Pemberton [Thu, 23 Apr 2009 01:11:49 +0000 (21:11 -0400)] 
Staging: comedi: fix the way structs are initialized.

Change from the foo: bar format to the .foo = bar format.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: comedi: Remove parens around return values
Bill Pemberton [Thu, 23 Apr 2009 01:11:48 +0000 (21:11 -0400)] 
Staging: comedi: Remove parens around return values

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: comedi: remove assignment in conditionals
Bill Pemberton [Thu, 23 Apr 2009 01:11:47 +0000 (21:11 -0400)] 
Staging: comedi: remove assignment in conditionals

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: comedi: non working tests on unsigned cmd->convert_arg
Roel Kluin [Thu, 23 Apr 2009 10:23:14 +0000 (12:23 +0200)] 
Staging: comedi: non working tests on unsigned cmd->convert_arg

Remove tests for negative unsigned.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: comedi: Makefile changes
Manuel Gebele [Sun, 19 Apr 2009 12:46:01 +0000 (14:46 +0200)] 
Staging: comedi: Makefile changes

this patch will sort the 'Comedi USB drivers' section in the
staging/comedi/drivers/Makefile in alphabetical order, and add the
vmk80xx.c driver to the build.

From: Manuel Gebele <forensixs@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: comedi: vmk80xx.c: get the driver to build properly
Greg Kroah-Hartman [Wed, 22 Apr 2009 17:29:33 +0000 (10:29 -0700)] 
Staging: comedi: vmk80xx.c: get the driver to build properly

There have been changes in the comedi core, this fixes the vmk80xx.c
driver to work properly with them, so it now will build properly.

Cc: Manuel Gebele <forensixs@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: comedi: add vmk80xx USB driver
Manuel Gebele [Wed, 22 Apr 2009 17:28:18 +0000 (10:28 -0700)] 
Staging: comedi: add vmk80xx USB driver

The k80xx module was completely revised again. The update contains the
following new main features:
- support for digital input
- support for digital output
- support for pulse counters
- support up to 16 boards (by the way, the windows driver and the k8055
  library (libk8055) has support for only 4 boards)

The driver can now manage all features what the board has to offer:
- analog input/output
- digital input/output
- pulse counters (read, reset, set debounce time)

I've also fixed some mistaken in the drivers source code/logic.

By testing all of the driver features i got no errors or something else.
The driver works fine....

From: Manuel Gebele <forensixs@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: Comedi: change space indentation to tabs
Bill Pemberton [Thu, 9 Apr 2009 20:07:27 +0000 (16:07 -0400)] 
Staging: Comedi: change space indentation to tabs

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging Comedi: fix spacing around parens
Bill Pemberton [Thu, 9 Apr 2009 20:07:21 +0000 (16:07 -0400)] 
Staging Comedi: fix spacing around parens

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: comedi: Add spaces after commas
Bill Pemberton [Thu, 9 Apr 2009 20:07:16 +0000 (16:07 -0400)] 
Staging: comedi: Add spaces after commas

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: comedi: fix "foo * bar" should be "foo *bar"
Bill Pemberton [Thu, 9 Apr 2009 20:07:03 +0000 (16:07 -0400)] 
Staging: comedi: fix "foo * bar" should be "foo *bar"

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: comedi: remove dupilcated #include
Huang Weiyi [Mon, 6 Apr 2009 09:20:17 +0000 (17:20 +0800)] 
Staging: comedi: remove dupilcated #include

Remove dupilcated #include in drivers/staging/comedi/drivers/8253.h.

Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: comedi: replace __FUNCTION__ usages
Alessio Igor Bogani [Tue, 24 Mar 2009 18:30:57 +0000 (19:30 +0100)] 
Staging: comedi: replace __FUNCTION__ usages

__FUNCTION__ is gcc-specific, use __func__

Signed-off-by: Alessio Igor Bogani <abogani@texware.it>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: comedi: jr3_pci: Use struct device from pci_dev for firmware loading.
Frank Mori Hess [Tue, 14 Apr 2009 16:59:47 +0000 (12:59 -0400)] 
Staging: comedi: jr3_pci: Use struct device from pci_dev for firmware loading.

Signed-off-by: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: comedi: Added sysfs attribute files for setting and querying subdevice buffe...
Frank Mori Hess [Tue, 14 Apr 2009 15:21:41 +0000 (11:21 -0400)] 
Staging: comedi: Added sysfs attribute files for setting and querying subdevice buffer sizes.

Signed-off-by: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: comedi: amplc_pc236: Corrected documentation.
Ian Abbott [Tue, 14 Apr 2009 15:06:27 +0000 (11:06 -0400)] 
Staging: comedi: amplc_pc236: Corrected documentation.

Interrupt is triggered by rising edge on port C bit 3 (not bit 7).

From: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: comedi: Undo stupid commit made 3 months ago
Ian Abbott [Tue, 14 Apr 2009 15:04:24 +0000 (11:04 -0400)] 
Staging: comedi: Undo stupid commit made 3 months ago

Undo stupid commit made 3 months ago :
 "Fix redefinition of macro comedi_rt_task_context_t".
 It wasn't being redefined, it was being defined for RTLinux.

From: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: comedi: Work around malformed RTAI_VERSION_CODE.
Ian Abbott [Tue, 14 Apr 2009 15:01:50 +0000 (11:01 -0400)] 
Staging: comedi: Work around malformed RTAI_VERSION_CODE.

Signed-off-by: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: Comedi: ni_600x: Added support for comedi_poll.
Frank Mori Hess [Tue, 14 Apr 2009 14:55:09 +0000 (10:55 -0400)] 
Staging: Comedi: ni_600x: Added support for comedi_poll.

Signed-off-by: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: comedi: pcl818: Tidy up AI command after channel dropout or similar error.
Ian Abbott [Tue, 14 Apr 2009 14:39:53 +0000 (10:39 -0400)] 
Staging: comedi: pcl818: Tidy up AI command after channel dropout or similar error.

It was causing subsequent commands to fail with -EBUSY.

From: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: comedi: pcl818: Fix option handling for FIFO mode (hopefully!).
Ian Abbott [Tue, 14 Apr 2009 14:33:42 +0000 (10:33 -0400)] 
Staging: comedi: pcl818: Fix option handling for FIFO mode (hopefully!).

Signed-off-by: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: comedi: Fixed Kconfig option for COMEDI_PCMCIA_DRIVERS
Frank Mori Hess [Mon, 6 Apr 2009 18:01:19 +0000 (14:01 -0400)] 
Staging: comedi: Fixed Kconfig option for COMEDI_PCMCIA_DRIVERS

Signed-off-by: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: comedi: set PCI and PCMCIA defines
Greg Kroah-Hartman [Fri, 17 Apr 2009 16:51:01 +0000 (09:51 -0700)] 
Staging: comedi: set PCI and PCMCIA defines

The comedi drivers are looking for CONFIG_COMEDI_PCI and
CONFIG_COMEDI_PCMCIA, not the current config items.  This creates a
define so that things build properly when these options are selected.
Long term goal is to fix up the drivers to not need any defines.

Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: comedi: fix build errors in pcmcia comedi drivers
Greg Kroah-Hartman [Fri, 17 Apr 2009 16:50:08 +0000 (09:50 -0700)] 
Staging: comedi: fix build errors in pcmcia comedi drivers

This fixes a few minor build errors that were previously undetected in
the comedi pcmcia drivers.

Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: comedi: 'pcmcia_parse_tuple()' now has two arguments, not three.
Ian Abbott [Mon, 6 Apr 2009 19:10:30 +0000 (15:10 -0400)] 
Staging: comedi: 'pcmcia_parse_tuple()' now has two arguments, not three.

This fixes the build error in the cv_das16_cs driver

From: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: comedi: Finish removing ni_private typedef
Frank Mori Hess [Mon, 6 Apr 2009 19:13:04 +0000 (15:13 -0400)] 
Staging: comedi: Finish removing ni_private typedef

This fixes compilation of ni_mio_cs.c that was broken.

Signed-off-by: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: comedi: Remove C99 comments
Bill Pemberton [Fri, 27 Mar 2009 15:29:34 +0000 (11:29 -0400)] 
Staging: comedi: Remove C99 comments

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agostaging: comedi, remove interrupt.h
Jiri Slaby [Thu, 26 Mar 2009 08:34:06 +0000 (09:34 +0100)] 
staging: comedi, remove interrupt.h

Remove interrupt wraparound. Use defines from linux/interrupt.h
instead.

Change also parameter types of functions taking ISR to irq_handler_t.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Cc: David Schleef <ds@schleef.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: comedi: remove C99 comments in s526.c
Bill Pemberton [Fri, 27 Mar 2009 15:31:27 +0000 (11:31 -0400)] 
Staging: comedi: remove C99 comments in s526.c

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: comedi: remove C99 comments in pcl816.c
Bill Pemberton [Fri, 27 Mar 2009 15:31:22 +0000 (11:31 -0400)] 
Staging: comedi: remove C99 comments in pcl816.c

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: comedi: remove C99 comments in pcl724.c
Bill Pemberton [Fri, 27 Mar 2009 15:31:16 +0000 (11:31 -0400)] 
Staging: comedi: remove C99 comments in pcl724.c

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: comedi: remove C99 comments in ni_labpc.c
Bill Pemberton [Fri, 27 Mar 2009 15:31:11 +0000 (11:31 -0400)] 
Staging: comedi: remove C99 comments in ni_labpc.c

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: comedi: remove C99 comments in ni_at_a2150.c
Bill Pemberton [Fri, 27 Mar 2009 15:31:06 +0000 (11:31 -0400)] 
Staging: comedi: remove C99 comments in ni_at_a2150.c

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: comedi: remove C99 comments in mpc624.c
Bill Pemberton [Fri, 27 Mar 2009 15:31:00 +0000 (11:31 -0400)] 
Staging: comedi: remove C99 comments in mpc624.c

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: comedi: remove C99 comments in gsc_hpdi.c
Bill Pemberton [Fri, 27 Mar 2009 15:30:55 +0000 (11:30 -0400)] 
Staging: comedi: remove C99 comments in gsc_hpdi.c

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: comedi: remove C99 comments in cb_pcimdas.c
Bill Pemberton [Fri, 27 Mar 2009 15:30:50 +0000 (11:30 -0400)] 
Staging: comedi: remove C99 comments in cb_pcimdas.c

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: comedi: remove C99 comments in cb_pcidas.c
Bill Pemberton [Fri, 27 Mar 2009 15:30:44 +0000 (11:30 -0400)] 
Staging: comedi: remove C99 comments in cb_pcidas.c

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: comedi: remove C99 comments in cb_pcidas64.c
Bill Pemberton [Fri, 27 Mar 2009 15:30:39 +0000 (11:30 -0400)] 
Staging: comedi: remove C99 comments in cb_pcidas64.c

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: comedi: remove C99 comments in c6xdigio.c
Bill Pemberton [Fri, 27 Mar 2009 15:30:34 +0000 (11:30 -0400)] 
Staging: comedi: remove C99 comments in c6xdigio.c

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: comedi: remove C99 comments in adv_pci1723.c
Bill Pemberton [Fri, 27 Mar 2009 15:30:28 +0000 (11:30 -0400)] 
Staging: comedi: remove C99 comments in adv_pci1723.c

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: comedi: remove C99 comments in adl_pci9118.c
Bill Pemberton [Fri, 27 Mar 2009 15:30:23 +0000 (11:30 -0400)] 
Staging: comedi: remove C99 comments in adl_pci9118.c

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: comedi: remove C99 comments in adl_pci6208.c
Bill Pemberton [Fri, 27 Mar 2009 15:30:18 +0000 (11:30 -0400)] 
Staging: comedi: remove C99 comments in adl_pci6208.c

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: comedi: remove C99 comments in hwdrv_apci3120.c
Bill Pemberton [Fri, 27 Mar 2009 15:30:12 +0000 (11:30 -0400)] 
Staging: comedi: remove C99 comments in hwdrv_apci3120.c

This replaces C99 comments with traditional C comments.  This
also removes 3 blocks of code that were already commented out.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: comedi: remove C99 comments in hwdrv_apci3200.c
Bill Pemberton [Fri, 27 Mar 2009 15:30:07 +0000 (11:30 -0400)] 
Staging: comedi: remove C99 comments in hwdrv_apci3200.c

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: comedi: remove C99 comments in hwdrv_apci1564.c
Bill Pemberton [Fri, 27 Mar 2009 15:30:01 +0000 (11:30 -0400)] 
Staging: comedi: remove C99 comments in hwdrv_apci1564.c

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: comedi: remove C99 comments in APCI1710_Pwm.c
Bill Pemberton [Fri, 27 Mar 2009 15:29:56 +0000 (11:29 -0400)] 
Staging: comedi: remove C99 comments in APCI1710_Pwm.c

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: comedi: remove C99 comments in hwdrv_apci1500.c
Bill Pemberton [Fri, 27 Mar 2009 15:29:51 +0000 (11:29 -0400)] 
Staging: comedi: remove C99 comments in hwdrv_apci1500.c

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>