Commit graph

1747 commits

Author SHA1 Message Date
Robert P. J. Day
fe4f699c6f Staging: vt6655: Remove Makefile refs to EXPORT_SYMTAB
Given that EXPORT_SYMTAB was removed long ago, remove the Makefile
references to it.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:37 -07:00
Alexander Beregalov
6fdc7f80c9 Staging: wlan-ng: remove dependency on WIRELESS_EXT version
As the driver is in mainline now we can remove such dependency.
WIRELESS_EXT is 22 now and it is always defined.

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:37 -07:00
Alexander Beregalov
b63768681f Staging: at76_usb: replace mac2str() with %pM
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:37 -07:00
Alexander Beregalov
bbff696ede Staging: at76_usb: fix !CONFIG_WIRELESS_EXT build
Fix this build error when CONFIG_WIRELESS_EXT is not set
at76_usb.c:5322: error: 'struct net_device' has no member named 'wireless_data'
at76_usb.c:5325: error: 'struct net_device' has no member named 'wireless_handlers'

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:36 -07:00
Alexander Beregalov
e882335bb1 Staging: vt665x: depend on WIRELESS_EXT
Make vt665x depended on WIRELESS_EXT and remove remain ifdef's

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:36 -07:00
Alexander Beregalov
70f38b1053 Staging: vt6656: remove dependency on WIRELESS_EXT version
As the driver is in mainline now we can remove such dependency.
WIRELESS_EXT is 22 now and it is always defined.

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Acked-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:36 -07:00
Alexander Beregalov
edb3a9507c Staging: vt6656: remove dependency on kernel version
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Acked-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:36 -07:00
Richard Ash
560a9be832 Staging: quatech_usb2: Improvements to set_termios method
This patch implements several improvements to the set_termios method
suggested by Alan Cox:
* Correct check for whether any changes are being requested.
* Inform callers that mark/space parity isn't supported by always
clearing the bit.
* Pass back the actual used baud rate in case it doesn't match what was
requested.

Remaining known issues are that IXANY flow control is not supported, but
we don't tell the caller that, and input and output XON/XOFF flow
control are either both on or both off, but we don't indicate that back
to the caller either.

Signed-off-by: Richard Ash <richard@audacityteam.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:36 -07:00
Richard Ash
eba1aaddc0 Staging: quatech_usb2: Improve debug output and fix write_room
This patch contains changes made in the course of successfully reading
data from the device. These consist of a number of corrections and
additions to debug messages, and a fix for incorrect calculation of the
number of characters in the device FIFO which affected the operation of
the write_room method.
The use of semaphores to control access to port settings is replaced by
the preferred use of mutexes as this is the only code that uses them.

Aug 18 17:09:32 [kernel] BUG: unable to handle kernel paging request at f82f122c
Aug 18 17:09:32 [kernel] IP: [<c11e1a63>] tty_port_close_start+0x8c/0x15e
Aug 18 17:09:32 [kernel] *pde = 00000000 
Aug 18 17:09:32 [kernel] Modules linked in: snd_seq snd_seq_device snd_pcm_oss snd_mixer_oss nls_iso8859_1 cifs xt_limit xt_NFLOG nfnetlink_log nfnetlink xt_tcpudp nf_conntrack_ipv4 nf_defrag_ipv4 xt_state nf_conntrack iptable_filter ip_tables x_tables i915 fb drm i2c_algo_bit cfbcopyarea i2c_core video backlight output cfbimgblt cfbfillrect quatech_usb2(C) usbserial uhci_hcd ehci_hcd snd_intel8x0 snd_ac97_codec ac97_bus usbcore tg3 snd_pcm snd_timer libphy snd intel_agp psmouse evdev ohci1394 soundcore ide_cd_mod cdrom ieee1394 snd_page_alloc agpgart floppy
Aug 18 17:09:32 [kernel] Pid: 4192, comm: cat Tainted: G         C (2.6.31-rc6-gkh #9) HP Compaq dc5100 MT(PW097ET)
Aug 18 17:09:32 [kernel] EIP: 0060:[<c11e1a63>] EFLAGS: 00010046 CPU: 0
Aug 18 17:09:32 [kernel] EIP is at tty_port_close_start+0x8c/0x15e
Aug 18 17:09:32 [kernel] EAX: 00000000 EBX: 00000246 ECX: ebacc380 EDX: 00000000
Aug 18 17:09:32 [kernel] ESI: f72f1204 EDI: e6073000 EBP: e60b3ce4 ESP: e60b3ccc
Aug 18 17:09:32 [kernel]  DS: 007b ES: 007b FS: 0000 GS: 00e0 SS: 0068
Aug 18 17:09:32 [kernel]  bcc17886 e60b3d2c bcc17886 f72f1200 f72f1204 e6073000 e60b3d10 f8b01a67
Aug 18 17:09:32 [kernel] <0> 00000000 e60b3d10 c11d9343 e60730a0 ebacc380 bcc17886 e6073000 00000000
Aug 18 17:09:32 [kernel] <0> ebacc380 e60b3d90 c11da71c 00000000 f7802480 bcc17886 ebacc380 00000000
Aug 18 17:09:32 [kernel]  [<f8b01a67>] ? serial_close+0x3c/0x9a [usbserial]
Aug 18 17:09:32 [kernel]  [<c11d9343>] ? tty_fasync+0x63/0xe3
Aug 18 17:09:32 [kernel]  [<c11da71c>] ? tty_release_dev+0x159/0x47d
Aug 18 17:09:32 [kernel]  [<c11804c5>] ? prio_tree_remove+0x6c/0xc5
Aug 18 17:09:32 [kernel]  [<c1081c5f>] ? put_object+0x46/0x5e
Aug 18 17:09:32 [kernel]  [<c11daa59>] ? tty_release+0x19/0x35
Aug 18 17:09:32 [kernel]  [<c1086836>] ? __fput+0xed/0x1e4
Aug 18 17:09:32 [kernel]  [<c1086951>] ? fput+0x24/0x39
Aug 18 17:09:32 [kernel]  [<c108375e>] ? filp_close+0x4c/0x7b
Aug 18 17:09:32 [kernel]  [<c1028076>] ? put_files_struct+0xc3/0xd2
Aug 18 17:09:32 [kernel]  [<c10280b1>] ? exit_files+0x2c/0x40
Aug 18 17:09:32 [kernel]  [<c1028551>] ? do_exit+0xd0/0x5f5
Aug 18 17:09:32 [kernel]  [<c1031751>] ? recalc_sigpending+0x1b/0x4b
Aug 18 17:09:32 [kernel]  [<c1031b8b>] ? dequeue_signal+0x96/0x154
Aug 18 17:09:32 [kernel]  [<c1028ab1>] ? do_group_exit+0x3b/0x77
Aug 18 17:09:32 [kernel]  [<c1032ec3>] ? get_signal_to_deliver+0x140/0x31b
Aug 18 17:09:32 [kernel]  [<c11d90af>] ? tty_put_char+0x43/0x4b
Aug 18 17:09:32 [kernel]  [<c1002633>] ? do_notify_resume+0xae/0x7fb
Aug 18 17:09:32 [kernel]  [<c11dabcd>] ? tty_read+0x8f/0xb5
Aug 18 17:09:32 [kernel]  [<c11dd0be>] ? n_tty_read+0x0/0x5d2
Aug 18 17:09:32 [kernel]  [<c1085560>] ? vfs_read+0xb4/0x178
Aug 18 17:09:32 [kernel]  [<c11dab3e>] ? tty_read+0x0/0xb5
Aug 18 17:09:32 [kernel]  [<c10856e4>] ? sys_read+0x52/0x8b
Aug 18 17:09:32 [kernel]  [<c1002f6a>] ? work_notifysig+0x13/0x19
Aug 18 17:09:32 [kernel] ---[ end trace 16f434ec7e2925bc ]---
Aug 18 17:09:32 [kernel] Fixing recursive fault but reboot is needed!

My guess is that my driver is doing something "wrong" in terms of it's
interface to the higher level layers and so is causing the oops. Are
there any mechanisms to turn on more checking / debugging in the layers
above the usb-serial layer to try and catch the cause of the problem?
I've already got USB_DEBUG enabled, what others might be relevant
(presumably USB_SERIAL_DEBUG isn't)?

Signed-off-by: Richard Ash <richard@audacityteam.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:36 -07:00
Richard Ash
d3f0e10a70 Staging: quatech_usb2: vendor implementation of break_ctl
This patch imports the implementation of the break_ctl, throttle and
unthrottle methods from the vendor driver into the staging driver. This
compiles but is not yet tested.

Signed-off-by: Richard Ash <richard@audacityteam.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:36 -07:00
Richard Ash
2715dd6a93 Staging: quatech_usb2: vendor implementation of set_termios method
This patch imports the implementation of the set_termios method from the
vendor driver into the staging driver. The common terminal setting
changes should be supported.

Signed-off-by: Richard Ash <richard@audacityteam.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:36 -07:00
Richard Ash
2feb633d65 Staging: quatech_usb2: chars_in_buffer() fix
It seems I can't count.

Patch to fix chars_in_buffer() method (broken in vendor driver), and
subsequently simplify the close() method, making it somewhat less
broken. There is quite a bit more improvement to do on this method
though.

Signed-off-by: Richard Ash <richard@audacityteam.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:36 -07:00
Richard Ash
dbe2481580 Staging: quatech_usb2: TIOCMGET and TIOCMSET removal
Patch to remove TIOCMGET and TIOCMSET from the driver ioctl method, as
they never get used (error in vendor driver).

Signed-off-by: Richard Ash <richard@audacityteam.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:36 -07:00
Richard Ash
89b5098d8e Staging: quatech_usb2: write_room rewrite
The following patch re-writes the write_room method to work in the
obvious sort of way, so it keeps it's promises to the layers above.
Based on feedback from Alan Cox.

Signed-off-by: Richard Ash <richard@audacityteam.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:36 -07:00
Richard Ash
713e5f69d0 Staging: quatech_usb2: close, read, and some ioctl support
This patch implements close(), read(), write() and some ioctls, and
fixes some implementation issues in open(). Compared to the previous
patch it doesn't suffer an oops in the module code, however if you try
to open any of the serial devices a second time then an oops occurs in
tty_open(), presumably because my code isn't playing nicely on the
previous close():

Aug 13 11:44:01 [kernel] WARNING: at drivers/char/tty_io.c:1268 tty_open+0x3e5/0x46d()
Aug 13 11:44:01 [kernel] Hardware name: HP Compaq dc5100 MT(PW097ET)
Aug 13 11:44:01 [kernel] Modules linked in: quatech_usb2(C) usbserial snd_seq snd_seq_device snd_pcm_oss snd_mixer_oss nls_iso8859_1 cifs xt_limit xt_NFLOG nfnetlink_log nfnetlink xt_tcpudp nf_conntrack_ipv4 nf_defrag_ipv4 xt_state nf_conntrack iptable_filter ip_tables x_tables i915 fb drm i2c_algo_bit cfbcopyarea i2c_core video backlight output cfbimgblt cfbfillrect snd_intel8x0 snd_ac97_codec ehci_hcd ac97_bus uhci_hcd snd_pcm snd_timer usbcore snd ohci1394 psmouse ide_cd_mod cdrom tg3 soundcore snd_page_alloc ieee1394 libphy intel_agp agpgart floppy evdev [last unloaded: usbserial]
Aug 13 11:44:01 [kernel] Pid: 26765, comm: stty Tainted: G         C 2.6.31-rc5-git3-gkh #7
Aug 13 11:44:01 [kernel] Call Trace:
Aug 13 11:44:01 [kernel]  [<c11dbef8>] ? tty_open+0x3e5/0x46d
Aug 13 11:44:01 [kernel]  [<c10264e2>] warn_slowpath_common+0x88/0xb0
Aug 13 11:44:01 [kernel]  [<c11dbef8>] ? tty_open+0x3e5/0x46d
Aug 13 11:44:01 [kernel]  [<c102652b>] warn_slowpath_null+0x21/0x3b
Aug 13 11:44:01 [kernel]  [<c11dbef8>] tty_open+0x3e5/0x46d
Aug 13 11:44:01 [kernel]  [<c10883d1>] chrdev_open+0x77/0x113
Aug 13 11:44:01 [kernel]  [<c1083a5d>] __dentry_open+0xb8/0x230
Aug 13 11:44:01 [kernel]  [<c108835a>] ? chrdev_open+0x0/0x113
Aug 13 11:44:01 [kernel]  [<c1084993>] nameidata_to_filp+0x61/0x6a
Aug 13 11:44:01 [kernel]  [<c1091144>] do_filp_open+0x248/0x7cd
Aug 13 11:44:01 [kernel]  [<c106f14f>] ? __do_fault+0x2ba/0x3b2
Aug 13 11:44:01 [kernel]  [<c109a337>] ? alloc_fd+0x6a/0xf1
Aug 13 11:44:01 [kernel]  [<c1083804>] do_sys_open+0x5f/0x12b
Aug 13 11:44:01 [kernel]  [<c1083947>] sys_open+0x2e/0x47
Aug 13 11:44:01 [kernel]  [<c1002e4f>] sysenter_do_call+0x12/0x26
Aug 13 11:44:01 [kernel] ---[ end trace 1d6b9e2cd7636394 ]---
Aug 13 11:44:01 [kernel] BUG: unable to handle kernel NULL pointer dereference at 00000004
Aug 13 11:44:01 [kernel] IP: [<c1086538>] file_move+0x26/0x47
Aug 13 11:44:01 [kernel] *pde = 00000000 
Aug 13 11:44:01 [kernel] Modules linked in: quatech_usb2(C) usbserial snd_seq snd_seq_device snd_pcm_oss snd_mixer_oss nls_iso8859_1 cifs xt_limit xt_NFLOG nfnetlink_log nfnetlink xt_tcpudp nf_conntrack_ipv4 nf_defrag_ipv4 xt_state nf_conntrack iptable_filter ip_tables x_tables i915 fb drm i2c_algo_bit cfbcopyarea i2c_core video backlight output cfbimgblt cfbfillrect snd_intel8x0 snd_ac97_codec ehci_hcd ac97_bus uhci_hcd snd_pcm snd_timer usbcore snd ohci1394 psmouse ide_cd_mod cdrom tg3 soundcore snd_page_alloc ieee1394 libphy intel_agp agpgart floppy evdev [last unloaded: usbserial]
Aug 13 11:44:01 [kernel] Pid: 26765, comm: stty Tainted: G        WC (2.6.31-rc5-git3-gkh #7) HP Compaq dc5100 MT(PW097ET)
Aug 13 11:44:01 [kernel] EIP: 0060:[<c1086538>] EFLAGS: 00010282 CPU: 0
Aug 13 11:44:01 [kernel] EIP is at file_move+0x26/0x47
Aug 13 11:44:01 [kernel] EAX: 00000000 EBX: e593b508 ECX: ea7e9900 EDX: f734a888
Aug 13 11:44:01 [kernel] ESI: 00000000 EDI: 0bc00004 EBP: d8923e10 ESP: d8923e08
Aug 13 11:44:01 [kernel]  DS: 007b ES: 007b FS: 0000 GS: 00e0 SS: 0068
Aug 13 11:44:01 [kernel]  2ba6efc8 c8c93180 d8923e48 c11dbca7 ea7e9900 eed37e6c 00000000 00008800
Aug 13 11:44:01 [kernel] <0> 00000000 e593b400 e593b400 00000004 2ba6efc8 c8c93188 00000000 eed37e6c
Aug 13 11:44:01 [kernel] <0> d8923e68 c10883d1 ea7e9900 2ba6efc8 2ba6efc8 ea7e9900 eed37e6c ffffffe9
Aug 13 11:44:01 [kernel]  [<c11dbca7>] ? tty_open+0x194/0x46d
Aug 13 11:44:01 [kernel]  [<c10883d1>] ? chrdev_open+0x77/0x113
Aug 13 11:44:01 [kernel]  [<c1083a5d>] ? __dentry_open+0xb8/0x230
Aug 13 11:44:01 [kernel]  [<c108835a>] ? chrdev_open+0x0/0x113
Aug 13 11:44:01 [kernel]  [<c1084993>] ? nameidata_to_filp+0x61/0x6a
Aug 13 11:44:01 [kernel]  [<c1091144>] ? do_filp_open+0x248/0x7cd
Aug 13 11:44:01 [kernel]  [<c106f14f>] ? __do_fault+0x2ba/0x3b2
Aug 13 11:44:01 [kernel]  [<c109a337>] ? alloc_fd+0x6a/0xf1
Aug 13 11:44:01 [kernel]  [<c1083804>] ? do_sys_open+0x5f/0x12b
Aug 13 11:44:01 [kernel]  [<c1083947>] ? sys_open+0x2e/0x47
Aug 13 11:44:01 [kernel]  [<c1002e4f>] ? sysenter_do_call+0x12/0x26
Aug 13 11:44:01 [kernel] ---[ end trace 1d6b9e2cd7636395 ]---

Read and Write also do not work at the moment, and I'm fairly sure that
the URB completion callbacks are not running. Why this is I don't know,
and haven't tried to investigate.

Signed-off-by: Richard Ash <richard@audacityteam.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:35 -07:00
Richard Ash
72ba94ec61 Staging: quatech_usb2: implement open functionality
Part two of the driver implementation has finally got done. It
implements the rest of open and the callback for reads from the box. I
seem to have finally found a structure that can be made to work, with a
single set of URBs for bulk read and write for the whole device, which
are used by all the ports. I've rationalised a few things, but there
will still be a lot of clean-up needed.

This one definitely can panic the kernel when a port is opened for
reading, but I'm off on holiday so I thought I'd post where I have got
to so far. I haven't tried to debug why it panics with a null pointer
dereference yet.

Signed-off-by: Richard Ash <richard@audacityteam.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:35 -07:00
Richard Ash
c4f3020fc4 Staging: add Support for Quatech ESU2-100 USB 2.0 8-port serial adaptor
The patch is of the "works as far as it goes" variety, in that the
module compiles and loads, the device nodes are registered and the unit
switched on, but nothing actually works. On the other hand, it doesn't
panic the kernel, as far as I know.

Signed-off-by: Richard Ash <richard@audacityteam.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:35 -07:00
Karl Relton
d89505998e Staging: wlan-ng: Convert firmware loading to load binary ihex format
Convert prism2_usb firmware loading to load firmware in pre-compiled
binary 'ihex' format rather than ascii 'srec' format. This moves the
srec processing and sorting of records out of kernel space into a
pre-compiler. The driver now just works with the binary image, but
still does the 'pda plugging' of that image at runtime, as required
by the prism hardware.

Some Notes:

- The firmware is now expected to be in the same 'ihex' (.fw) format
  used by other drivers.

- The now driver assumes the data records are already sorted into ascending
  address order.

- Plug and crc records are still recognised by special address locations
  as in original srec processing.

- The srec S7 start address record is assumed to have been converted
  into a data record with another special address location (0xff400000),
  with the original start address being stored as a 4 byte data word
  (little endian).

Signed-off-by: Karl Relton <karllinuxtest.relton@ntlworld.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:35 -07:00
Moritz Muehlenhoff
c4004175eb Staging: wlan-ng: Remove more superflous comments
Signed-off-by: Moritz Muehlenhoff <jmm@debian.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:35 -07:00
Moritz Muehlenhoff
84d9bd7d55 Staging: wlan-ng: Drop the special case handling of older wireless extensions, WIRELESS_EXT is at 22 for the current kernel.
Signed-off-by: Moritz Muehlenhoff <jmm@debian.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:34 -07:00
Moritz Muehlenhoff
2f5851917c Staging: wlan-ng: Use kzfree() to securely zero-out the WEP key when freeing it
Signed-off-by: Moritz Muehlenhoff <jmm@debian.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:34 -07:00
Moritz Muehlenhoff
0d0202fd88 Staging: wlan-ng: Remove some superflous comments
Signed-off-by: Moritz Muehlenhoff <jmm@debian.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:34 -07:00
Huang Weiyi
f60f79e05a Staging: cpc-usb: remove unused #include <linux/version.h>
Remove unused #include <linux/version.h>'s in
drivers/staging/cpc-usb/cpc-usb_drv.c.

Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:34 -07:00
Roel Kluin
4ff863b1db Staging: comedi: s626: Possible read buffer overflow fix
If `cmd->chanlist_len' is 0, then we write ppl[-1].

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:34 -07:00
Robert P. J. Day
88a28c828f Staging: comedi: Remove references to dead EXPORT_SYMTAB
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:33 -07:00
Figo.zhang
b455073c88 Staging: comedi: no need for checking vfree call
vfree() does it's own NULL checking,so no need for check before
calling it.

'pages' is local variable argment,so in v2, it is no need assignment
 to NULL.

Signed-off-by: Figo.zhang <figo1802@gmail.com>
Acked-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:33 -07:00
Mithlesh Thukral
0a85b6f0ab Staging: Comedi: Lindent changes to comdi driver in staging tree
Lindent changes to comdi driver in staging tree.
This patch is followed by the checkpatch.pl error fixes.
Did not make them part of this patch as the patch size is already huge.

Signed-off-by: Mithlesh Thukral <mithlesh@linsyssoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:33 -07:00
Julia Lawall
df6785681b Staging: otus: Drop an unnecessary NULL test
Apparently, the NULL test is not necessary at this point.

The semantic patch that finds this problem is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@@
type T;
expression E;
identifier i,fld;
statement S;
@@

- T i = E->fld;
+ T i;
  ... when != E
      when != i
  if (E == NULL) S
+ i = E->fld;
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Acked-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:33 -07:00
Alexander Beregalov
92e6765f40 Staging: otus: remove dependency on WIRELESS_EXT version
As the driver is in mainline now we can remove such dependency.
WIRELESS_EXT is 22 now and it is always defined.

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:33 -07:00
Pranith Kumar
4a5629b92e Staging: otus: Fix warnings in staging/otus/ioctl.c
This fixes a number of warnings in the otus driver.

Signed-off-by: D Pranith Kumar <bobby.prani@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:33 -07:00
Alexander Beregalov
4c47b34cd6 Staging: vt6655: remove dependency on WIRELESS_EXT version
As the driver is in mainline now we can remove such dependencies.
WIRELESS_EXT is 22 now.

Cc: Forest Bond <forest@alittletooquiet.net>
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:33 -07:00
Alexander Beregalov
761e954939 Staging: vt6655: fix build when !CONFIG_WIRELESS_EXT
Fix this build error when CONFIG_WIRELESS_EXT is not set:
drivers/staging/vt6655/device_main.c:1153: error: 'struct net_device'
	has no member named 'wireless_handlers'

Cc: Forest Bond <forest@alittletooquiet.net>
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:32 -07:00
Forest Bond
5d1fe0c98f Staging: vt6656: Integrate vt6656 into build system.
Integrate drivers/staging/vt6656 into build system.

Signed-off-by: Forest Bond <forest@alittletooquiet.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:32 -07:00
Forest Bond
f4a8df9971 Staging: vt6656: replace call to info with printk call.
vt6656: replace call to info with printk call.

Signed-off-by: Forest Bond <forest@alittletooquiet.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:32 -07:00
Forest Bond
dd8db704ad Staging: vt6656: use net_device_ops for management functions
vt6656: use net_device_ops for management functions

Signed-off-by: Forest Bond <forest@alittletooquiet.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:32 -07:00
Forest Bond
1e28efa3eb Staging: vt6656: Replace net_device->priv accesses with netdev_priv calls.
vt6656: Replace net_device->priv accesses with netdev_priv calls.

Signed-off-by: Forest Bond <forest@alittletooquiet.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:32 -07:00
Forest Bond
8f9c466f29 Staging: vt6656: main_usb.c: Drop obsolete fsuid/fsgid accesses.
drivers/staging/vt6656/main_usb.c: Drop obsolete fsuid/fsgid accesses.

Signed-off-by: Forest Bond <forest@alittletooquiet.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:32 -07:00
Forest Bond
f02a8cbc50 Staging: vt6656: Build vt6656.ko, not vntwusb.ko.
Build vt6656.ko, not vntwusb.ko.

Signed-off-by: Forest Bond <forest@alittletooquiet.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:32 -07:00
Forest Bond
66252c3a27 Staging: vt6656: Add includes to drivers/staging/vt6656.
Add includes to drivers/staging/vt6656.  These came from the includes directory
in the upstream source archive.  Trailing whitespace was stripped.  This is
GPL-licensed code.

Signed-off-by: Forest Bond <forest@alittletooquiet.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:32 -07:00
Forest Bond
92b9679711 Staging: Add pristine upstream vt6656 driver sources to drivers/staging/vt6656.
Add pristine upstream vt6656 driver sources to drivers/staging/vt6656.  These
files were copied from the driver directory in the upstream source archive,
available here:

  http://www.viaarena.com/Driver/VT6656_Linux_src_v1.19_12_x86.zip

After copying, trailing whitespace was stripped.  This is GPL-licensed code.

Signed-off-by: Forest Bond <forest@alittletooquiet.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:32 -07:00
Bartlomiej Zolnierkiewicz
36c7928c3e Staging: add rt3090 wireless driver
This is the vendor driver for the Ralink RT3090 chipset.

It should be later cleaned and ported to use the existing rt2x00
infrastructure or just replaced by the proper version.

[ Unfortunately since it follows the same design/implementation like
  rt{286,287,307}0 drivers (already present in the staging tree)
  it is highly unlikely that it will see much love from the wireless
  development community.. ]

However since the development of the cleaner/proper version can take
significant time lets give distros (i.e. openSUSE seems to already
have the package with the original vendor driver) and users "something"
to use in the meantime.

I forward ported it to 2.6.31-rc1, ported to the Linux build system
and did some initial cleanups.  More fixes/cleanups to come later
(it seems that the driver can be made to share most of its code with
the other Ralink drivers already present in the staging tree).

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:31 -07:00
Bartlomiej Zolnierkiewicz
fd882783ab Staging: rtl8187se: cleanup r8180_core.c
* remove commented out code
* remove useless comments
* beautify code

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:31 -07:00
Bartlomiej Zolnierkiewicz
22eec79469 Staging: rtl8187se: cleanup r8180_rtl8225z2.c
* make read_rtl8225() static
* make tables static const
* remove commented out code
* remove useless comments
* beautify code

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:31 -07:00
Bartlomiej Zolnierkiewicz
02236f3fd5 Staging: rtl8187se: remove unused definitions from r8180.h
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:31 -07:00
Bartlomiej Zolnierkiewicz
7abb66eba4 Staging: rtl8187se: remove unused definitions from r8180_hw.h
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:31 -07:00
Bartlomiej Zolnierkiewicz
b6d11c07e5 Staging: rtl8187se: merge r8180_pm.c with r8180_core.c
* merge r8180_pm.c with r8180_core.c
* make functions static

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:31 -07:00
Bartlomiej Zolnierkiewicz
b72490a5f9 Staging: rtl8187se: cleanup r8180_pm.c
* remove unused rtl8180_{save_state,enable_wake}()
* remove commented out code
* beautify code

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:31 -07:00
Bartlomiej Zolnierkiewicz
44a7dcbc49 Staging: rtl8187se: merge r8180_rtl8225.c with r8180_rtl8225z2.c
* merge r8180_rtl8225.c with r8180_rtl8225z2.c
* make functions static
* make tables static const
* remove unused rtl8225_set_gain()

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:31 -07:00
Bartlomiej Zolnierkiewicz
322f3f2fa7 Staging: rtl8187se: cleanup r8180_rtl8225.c
* remove empty rtl8225_host_usb_init()
* remove commented out code
* remove useless comments
* beautify code

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:31 -07:00
Bartlomiej Zolnierkiewicz
e99b82d558 Staging: rtl8187se: remove unused rtl8225_rf_* functions
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:31 -07:00
Bartlomiej Zolnierkiewicz
ff95485305 Staging: rtl8187se: remove debugging code from r8180_core.c
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:30 -07:00
Bartlomiej Zolnierkiewicz
6dc1585fe4 Staging: rtl8187se: remove unused radio frontends
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:30 -07:00
Bartlomiej Zolnierkiewicz
5521a513e5 Staging: rtl8187se: remove dead code
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:30 -07:00
Bartlomiej Zolnierkiewicz
6a9a9e42b6 Staging: rtl8187se: remove CONFIG_RTL8180_IO_MAP ifdefs
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:29 -07:00
Bartlomiej Zolnierkiewicz
f19fd33577 Staging: rtl8187se: remove CONFIG_RTL8185B ifdefs
CONFIG_RTL8185B is defined in drivers/staging/rtl8187se/r8180_hw.h.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:29 -07:00
Bartlomiej Zolnierkiewicz
5474405fd6 Staging: rtl8187se: remove CONFIG_RTL818x_S ifdefs
CONFIG_RTL818x_S is defined in drivers/staging/rtl8187se/r8180_hw.h.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:29 -07:00
Bartlomiej Zolnierkiewicz
9a5aabffd1 Staging: rtl8187se: remove THOMAS_TURBO ifdefs
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:29 -07:00
Bartlomiej Zolnierkiewicz
2e0baea977 Staging: rtl8187se: remove CONFIG_RTL8180_PM ifdefs
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:28 -07:00
Bartlomiej Zolnierkiewicz
5212499a7a Staging: rtl8187se: remove ENABLE_DOT11D ifdefs
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:28 -07:00
Bartlomiej Zolnierkiewicz
0bd2f8efe9 Staging: rtl8187se: add TODO
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:28 -07:00
Bartlomiej Zolnierkiewicz
9d7a9fa8be Staging: rtl8192su: add TODO
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:28 -07:00
Bartlomiej Zolnierkiewicz
b4fcc8a24f Staging: rtl8192su/ieee80211: switch to use <linux/ieee80211.h>
* s/WLAN_AUTH_LEAP/RTL_WLAN_AUTH_LEAP/g
* s/struct ieee80211_hdr/struct rtl_ieee80211_hdr/g
* switch to use <linux/ieee80211.h>

There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:28 -07:00
Bartlomiej Zolnierkiewicz
68da8fcd50 Staging: rtl8192su/ieee80211: remove unused _ReasonCode enums
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:28 -07:00
Bartlomiej Zolnierkiewicz
3bd709f28f Staging: rtl8192su: remove support for older wireless extensions
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:28 -07:00
Bartlomiej Zolnierkiewicz
1ec9e48dbf Staging: rtl8192su: remove kernel version compatibility wrappers
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:28 -07:00
Bartlomiej Zolnierkiewicz
7fdb78d097 Staging: rtl8187se/ieee80211: remove superfluous JOHN_* ifdefs
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:28 -07:00
Bartlomiej Zolnierkiewicz
8f75675c3a Staging: rtl8187se/ieee80211: remove unused dump_chnl_map()
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:28 -07:00
Bartlomiej Zolnierkiewicz
c6e43bc83f Staging: rtl8187se/ieee80211: remove superfluous ieee80211_* defines
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:27 -07:00
Bartlomiej Zolnierkiewicz
30bb89f333 Staging: rtl8187se/ieee80211: remove dead _RTL8187_EXT_PATCH_ code
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:27 -07:00
Bartlomiej Zolnierkiewicz
8efff1758a Staging: rtl8187se: remove support for older wireless extensions
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:27 -07:00
Bartlomiej Zolnierkiewicz
0370453f6c Staging: rtl8187se: remove kernel version compatibility wrappers
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:27 -07:00
Bartlomiej Zolnierkiewicz
f8450cf62c Staging: rtl8192su: remove unused ieee80211_crypt.h
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:27 -07:00
Bartlomiej Zolnierkiewicz
a974762356 Staging: rtl8187se: remove unused ieee80211_crypt.h
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:27 -07:00
Bartlomiej Zolnierkiewicz
2a7d71ad57 Staging: rtl8192su: remove duplicate dot11d.h and ieee80211.h includes
Always use includes from ieee80211/ subdirectory.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:27 -07:00
Bartlomiej Zolnierkiewicz
fd9b8d6e29 Staging: rtl8187se: remove duplicate dot11d.h and ieee80211.h includes
Always use includes from ieee80211/ subdirectory.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:27 -07:00
Bartlomiej Zolnierkiewicz
3380121b2a Staging: rtl8192su/ieee80211: remove unused files
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:26 -07:00
Bartlomiej Zolnierkiewicz
015ffd82da Staging: rtl8187se/ieee80211: remove unused files
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:26 -07:00
Bartlomiej Zolnierkiewicz
db80ba562b Staging: rt28[67]0: remove unused md4.h
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:26 -07:00
Alan Cox
64f930361b Staging: et1310: Fix the coding style
UTF-8 for copyright symbols etc included. Typedefs and anything else which
would cause actual code changes skipped.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:26 -07:00
Mithlesh Thukral
297f06cea6 staging: wlan-ng: scripts/checkpatch.pl error fixes.
scripts/checkpatch.pl error fixes. This is a TODO item.
This patch fixes most of the errors reported by checkpatch.pl in
wlan-ng directory of staging tree.

Signed-off-by: Mithlesh Thukral <mithlesh@linsyssoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:26 -07:00
Randy Dunlap
0984e56a65 Staging: android: lowmemorykiller: fix module param errors
Move module_params to near the end of the source file so that
their references are already known/defined.  Fixes build errors:

drivers/staging/android/lowmemorykiller.c: In function '__check_cost':
drivers/staging/android/lowmemorykiller.c:60: error: 'lowmem_shrinker' undeclared (first use in this function)
drivers/staging/android/lowmemorykiller.c: At top level:
drivers/staging/android/lowmemorykiller.c:60: error: 'lowmem_shrinker' undeclared here (not in a function)
drivers/staging/android/lowmemorykiller.c:60: warning: type defaults to 'int' in declaration of 'type name'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:26 -07:00
Daniel Walker
10626434f4 Staging: android: binder: partial checkpatch cleanup
Clean up 3 or so checkpatch errors from one of my prior patches.

Signed-off-by: Daniel Walker <dwalker@fifo99.com>
Cc: Arve Hjønnevåg <arve@android.com>
Cc: Brian Swetland <swetland@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:26 -07:00
Daniel Walker
272bb3d875 Staging: android: lowmemorykiller: delete the decription file
Move the lowmemorykiller.txt into the actual source file which is really the
correct place for it, and delete lowmemorykiller.txt.

Signed-off-by: Daniel Walker <dwalker@fifo99.com>
Cc: Arve Hjønnevåg <arve@android.com>
Cc: Brian Swetland <swetland@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:26 -07:00
Daniel Walker
edd540ea92 Staging: android: lowmemorykiller: remove a predefine
I moved the struct shrinker down so that the predefine isn't needed.

Signed-off-by: Daniel Walker <dwalker@fifo99.com>
Cc: Arve Hjønnevåg <arve@android.com>
Cc: Brian Swetland <swetland@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:26 -07:00
Daniel Walker
707636ff4b Staging: android: binder: cleanup some long lines
This file has a lot of long line problems due to the massive indent issues
that exist. This just cleans up some of the really really long ones.

Signed-off-by: Daniel Walker <dwalker@fifo99.com>
Cc: Arve Hjønnevåg <arve@android.com>
Cc: Brian Swetland <swetland@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:26 -07:00
Daniel Walker
8683b98728 staging: android: binder: clean up for all the stat statments
An initial cleanup of all the binder_stat statements. The binder
command and return stats still need some assistance tho.

Signed-off-by: Daniel Walker <dwalker@fifo99.com>
Cc: Brian Swetland <swetland@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:25 -07:00
Daniel Walker
39e420e0a9 staging: android: binder: global variable cleanup.
Replaced a manual hlist_head declaration with a macro based one.
Also reorganized the globals to be grouped better.

Signed-off-by: Daniel Walker <dwalker@fifo99.com>
Cc: Brian Swetland <swetland@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:25 -07:00
Daniel Walker
fd0a2f07d9 staging: android: binder: add enum usage in function arguments
Declare the binder_deferred_state enum, and use the new enum
for one of the binder_defer_work function arguments. This
should keep the argument within the confines of the enum
instead of the whole int range.

Signed-off-by: Daniel Walker <dwalker@fifo99.com>
Cc: Brian Swetland <swetland@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:25 -07:00
Daniel Walker
9980318e54 staging: android: binder: remove a predefine
I removed the binder_transaction_buffer_release predefine, and put
the actual function in place of it.

Signed-off-by: Daniel Walker <dwalker@fifo99.com>
Cc: Brian Swetland <swetland@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:25 -07:00
Daniel Walker
df56cb1f37 staging: android: binder: move debugging mask into a macro
I moved the continual,

if (binder_debug_mask & mask)
	printk()

into a single macro so it's all in one place. It could be refined further
from there.

Signed-off-by: Daniel Walker <dwalker@fifo99.com>
Cc: Brian Swetland <swetland@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:25 -07:00
Linus Torvalds
355bbd8cb8 Merge branch 'for-2.6.32' of git://git.kernel.dk/linux-2.6-block
* 'for-2.6.32' of git://git.kernel.dk/linux-2.6-block: (29 commits)
  block: use blkdev_issue_discard in blk_ioctl_discard
  Make DISCARD_BARRIER and DISCARD_NOBARRIER writes instead of reads
  block: don't assume device has a request list backing in nr_requests store
  block: Optimal I/O limit wrapper
  cfq: choose a new next_req when a request is dispatched
  Seperate read and write statistics of in_flight requests
  aoe: end barrier bios with EOPNOTSUPP
  block: trace bio queueing trial only when it occurs
  block: enable rq CPU completion affinity by default
  cfq: fix the log message after dispatched a request
  block: use printk_once
  cciss: memory leak in cciss_init_one()
  splice: update mtime and atime on files
  block: make blk_iopoll_prep_sched() follow normal 0/1 return convention
  cfq-iosched: get rid of must_alloc flag
  block: use interrupts disabled version of raise_softirq_irqoff()
  block: fix comment in blk-iopoll.c
  block: adjust default budget for blk-iopoll
  block: fix long lines in block/blk-iopoll.c
  block: add blk-iopoll, a NAPI like approach for block devices
  ...
2009-09-14 17:55:15 -07:00
Linus Torvalds
4142e0d1de Merge branch 'osync_cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs-2.6
* 'osync_cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs-2.6:
  fsync: wait for data writeout completion before calling ->fsync
  vfs: Remove generic_osync_inode() and sync_page_range{_nolock}()
  fat: Opencode sync_page_range_nolock()
  pohmelfs: Use new syncing helper
  xfs: Convert sync_page_range() to simple filemap_write_and_wait_range()
  ocfs2: Update syncing after splicing to match generic version
  ntfs: Use new syncing helpers and update comments
  ext4: Remove syncing logic from ext4_file_write
  ext3: Remove syncing logic from ext3_file_write
  ext2: Update comment about generic_osync_inode
  vfs: Introduce new helpers for syncing after writing to O_SYNC file or IS_SYNC inode
  vfs: Rename generic_file_aio_write_nolock
  ocfs2: Use __generic_file_aio_write instead of generic_file_aio_write_nolock
  pohmelfs: Use __generic_file_aio_write instead of generic_file_aio_write_nolock
  vfs: Remove syncing from generic_file_direct_write() and generic_file_buffered_write()
  vfs: Export __generic_file_aio_write() and add some comments
  vfs: Introduce filemap_fdatawait_range
2009-09-14 14:36:47 -07:00
Linus Torvalds
d7e9660ad9 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1623 commits)
  netxen: update copyright
  netxen: fix tx timeout recovery
  netxen: fix file firmware leak
  netxen: improve pci memory access
  netxen: change firmware write size
  tg3: Fix return ring size breakage
  netxen: build fix for INET=n
  cdc-phonet: autoconfigure Phonet address
  Phonet: back-end for autoconfigured addresses
  Phonet: fix netlink address dump error handling
  ipv6: Add IFA_F_DADFAILED flag
  net: Add DEVTYPE support for Ethernet based devices
  mv643xx_eth.c: remove unused txq_set_wrr()
  ucc_geth: Fix hangs after switching from full to half duplex
  ucc_geth: Rearrange some code to avoid forward declarations
  phy/marvell: Make non-aneg speed/duplex forcing work for 88E1111 PHYs
  drivers/net/phy: introduce missing kfree
  drivers/net/wan: introduce missing kfree
  net: force bridge module(s) to be GPL
  Subject: [PATCH] appletalk: Fix skb leak when ipddp interface is not loaded
  ...

Fixed up trivial conflicts:

 - arch/x86/include/asm/socket.h

   converted to <asm-generic/socket.h> in the x86 tree.  The generic
   header has the same new #define's, so that works out fine.

 - drivers/net/tun.c

   fix conflict between 89f56d1e9 ("tun: reuse struct sock fields") that
   switched over to using 'tun->socket.sk' instead of the redundantly
   available (and thus removed) 'tun->sk', and 2b980dbd ("lsm: Add hooks
   to the TUN driver") which added a new 'tun->sk' use.

   Noted in 'next' by Stephen Rothwell.
2009-09-14 10:37:28 -07:00
Jan Kara
aa3caafe53 pohmelfs: Use new syncing helper
Use new generic_write_sync() helper instead of sync_page_range().

Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Jan Kara <jack@suse.cz>
2009-09-14 17:08:17 +02:00
Jan Kara
b04f932171 pohmelfs: Use __generic_file_aio_write instead of generic_file_aio_write_nolock
Use new helper __generic_file_aio_write(). Since the fs takes care of syncing
by itself afterwards, there are no more changes needed.

CC: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Jan Kara <jack@suse.cz>
2009-09-14 17:08:15 +02:00
Linus Torvalds
a12e4d304c Merge branch 'writeback' of git://git.kernel.dk/linux-2.6-block
* 'writeback' of git://git.kernel.dk/linux-2.6-block:
  writeback: check for registered bdi in flusher add and inode dirty
  writeback: add name to backing_dev_info
  writeback: add some debug inode list counters to bdi stats
  writeback: get rid of pdflush completely
  writeback: switch to per-bdi threads for flushing data
  writeback: move dirty inodes from super_block to backing_dev_info
  writeback: get rid of generic_sync_sb_inodes() export
2009-09-11 09:17:05 -07:00
Jens Axboe
1f98a13f62 bio: first step in sanitizing the bio->bi_rw flag testing
Get rid of any functions that test for these bits and make callers
use bio_rw_flagged() directly. Then it is at least directly apparent
what variable and flag they check.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2009-09-11 14:33:31 +02:00
Jens Axboe
d8a8559cd7 writeback: get rid of generic_sync_sb_inodes() export
This adds two new exported functions:

- writeback_inodes_sb(), which only attempts to writeback dirty inodes on
  this super_block, for WB_SYNC_NONE writeout.
- sync_inodes_sb(), which writes out all dirty inodes on this super_block
  and also waits for the IO to complete.

Acked-by: Jan Kara <jack@suse.cz>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2009-09-11 09:20:25 +02:00
Stephen Hemminger
0fc0b732ea netdev: drivers should make ethtool_ops const
No need to put ethtool_ops in data, they should be const.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-09-02 01:03:33 -07:00
Eric Paris
a8f80e8ff9 Networking: use CAP_NET_ADMIN when deciding to call request_module
The networking code checks CAP_SYS_MODULE before using request_module() to
try to load a kernel module.  While this seems reasonable it's actually
weakening system security since we have to allow CAP_SYS_MODULE for things
like /sbin/ip and bluetoothd which need to be able to trigger module loads.
CAP_SYS_MODULE actually grants those binaries the ability to directly load
any code into the kernel.  We should instead be protecting modprobe and the
modules on disk, rather than granting random programs the ability to load code
directly into the kernel.  Instead we are going to gate those networking checks
on CAP_NET_ADMIN which still limits them to root but which does not grant
those processes the ability to load arbitrary code into the kernel.

Signed-off-by: Eric Paris <eparis@redhat.com>
Acked-by: Serge Hallyn <serue@us.ibm.com>
Acked-by: Paul Moore <paul.moore@hp.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: James Morris <jmorris@namei.org>
2009-08-14 11:18:34 +10:00
David S. Miller
aa11d958d1 Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
	arch/microblaze/include/asm/socket.h
2009-08-12 17:44:53 -07:00
Roel Kluin
749d00dbf1 Staging: rspiusb: Fix buffer overflow
usb_buffer_map_sg() may return -1. This will result in a read from
pdx->PixelUrb[frameInfo][-1]

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-08-07 16:12:03 -07:00
Jeff Mahoney
5fb4d2525b staging: add dependencies on PCI for drivers that require it
This patch adds PCI dependencies to staging drivers that require it.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-08-07 16:12:03 -07:00
Greg Kroah-Hartman
ce9c010c5c Staging: rtl8192su: fix build error
This fixes a build error when selecting the rtl8192su driver as a
module.  This has been reported by me, and the opensuse kernel developer
team, and I finally tracked it down.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-08-07 16:12:03 -07:00
Mike Galbraith
2c63abf9e8 Staging: rt2870: Revert d44ca7 Removal of kernel_thread() API
Staging: rt2870: Revert d44ca7 Removal of kernel_thread() API

The sanity check this patch introduced triggers on shutdown, apparently due to
threads having already exited by the time BUG_ON() is reached.

Signed-off-by: Mike Galbraith <efault@gmx.de>
Cc: Peter Teoh <htmldeveloper@gmail.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-08-07 16:12:02 -07:00
Jakob Gruber
4d2da07bc8 Staging: rt2870: Add USB ID for Linksys, Planex Communications, Belkin
Linksys WUSB100, Belkin F5D8053 N, Planex Communications unknown model.

Signed-off-by: Jakob Gruber <jakob.gruber@kabelnet.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-08-07 16:12:02 -07:00
Amit Kucheria
fb29900217 staging: udlfb: Add vmalloc.h include
Required for vmalloc_32 and vfree declarations on non-x86 platforms.

Signed-off-by: Amit Kucheria <amit.kucheria@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-07-28 14:07:11 -07:00
Greg Kroah-Hartman
0bfc240575 staging: remove aten2011 driver
This driver is not needed, as the existing mos7840 driver works
properly for this device.

Thanks to Russell Lang for doing the work to figure this out.

Cc: Russell Lang <gsview@ghostgum.com.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-07-28 14:07:11 -07:00
David Rientjes
a6a9f81ccc Staging: android: lowmemorykiller.c: fix it for "oom: move oom_adj value from task_struct to mm_struct"
I'm about to merge "oom: move oom_adj value from task_struct to
mm_struct", and this fixup is needed to repair linux-next's
drivers/staging/android/lowmemorykiller.c.

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-07-28 14:07:10 -07:00
Oliver Neukum
de8f8bd633 Staging: serqt_usb2: fix memory leak in error case
a standard memory leak, as later allocations may fail even if prior
allocations did not. Then the prior allocations must be undone.

Signed-off-by: Oliver Neukum <oliver@neukum.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-07-28 14:07:10 -07:00
Bill Pemberton
f3a756883a Staging: serqt_usb2: add missing calls to tty_kref_put()
tty_port_tty_get() was called without a corresponding tty_kref_put()
in qt_read_bulk_callback() and qt_close().

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-07-28 14:07:10 -07:00
Mike Frysinger
0741241c6b connector: make callback argument type explicit
The connector documentation states that the argument to the callback
function is always a pointer to a struct cn_msg, but rather than encode it
in the API itself, it uses a void pointer everywhere.  This doesn't make
much sense to encode the pointer in documentation as it prevents proper C
type checking from occurring and can easily allow people to use the wrong
pointer type.  So convert the argument type to an explicit struct cn_msg
pointer.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-07-17 10:13:21 -07:00
Linus Torvalds
4a390e07fc Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6:
  Staging: stlc45xx: convert config_interface to bss_info_changed, fixing a build error
  Staging: comedi: s626: use subvendor:subdevice ids for SAA7146 board
  Staging: prevent rtl8192su from crashing dev_ioctl in SIOCGIWNAME
  Staging: prevent rtl8187se from crashing dev_ioctl() in SIOCGIWNAME
  Staging: rtl8192su: convert to net_device_ops
  Staging: serqt_usb2: declare qt_open static in serqt_usb2
  Staging: serqt_usb2: fix qt_close parameters in serqt_usb2
  Staging: comedi: jr3_pci.c: add required includes
  Staging: meilhaus: add email address to TODO
  Staging: rspiusb: use NULL virtual address instead of a bogus one
  Staging: vt6655: compile fix
  Staging: rt2870: Add USB ID for Sitecom WL-608
2009-07-13 10:24:43 -07:00
Jean Delvare
1d03d2bd6e Fix staging drivers after smp_lock.h redux
Commit 405f55712d ("headers: smp_lock.h
redux") broke the build of two staging drivers. Fix them.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-07-13 09:09:08 -07:00
Alexander Beregalov
f6387184f5 Staging: stlc45xx: convert config_interface to bss_info_changed, fixing a build error
See commit 2d0ddec5b2 (mac80211: unify config_interface and
bss_info_changed)

This fixes a build error.

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-07-12 13:21:45 -07:00
Herton Ronaldo Krzesinski
8231eb5672 Staging: comedi: s626: use subvendor:subdevice ids for SAA7146 board
The current s626 comedi driver in staging conflicts with philips SAA7146
media/dvb based cards, because it claims the same vendor:device pci id
for all subdevice/subvendor ids. What happens is that for people that have a
philips SAA7146 media/dvb based card, s626 if available gets loaded by udev
and makes system freeze (https://qa.mandriva.com/show_bug.cgi?id=51445).

The s626 driver shouldn't claim all 1131:7146 devices. Fix this by
specifying specific known subvendor:subdevice ids in its pci id table
list.

Also s626_attach is modified to use now pci_get_subsys instead of
pci_get_device as reported by Ian Abbott, and now we loop over pci id
table entries in case more ids are added in the future.

Reference: http://lkml.org/lkml/2009/6/16/552

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-07-12 13:21:45 -07:00
Dan Aloni
91fca6da38 Staging: prevent rtl8192su from crashing dev_ioctl in SIOCGIWNAME
(adapted from the rtl8187se patch)

ieee80211_wx_get_name() ignores sizeof(wrqu->name) which is IFNAMSIZ (16), and
on certain conditions, the concatenated string will be larger than IFNAMSIZ
including the terminating zero.

    length ("802.11" ++ "b" ++ "/g" ++ " linked" ++ "\x00") == 17

This fix uses strl{cpy,cat} in addition to the reduction of the total
possible length of the output string by a char.

It can be applied to 2.6.30-stable as well.

Signed-off-by: Dan Aloni <dan@aloni.org>
Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-07-12 13:21:45 -07:00
Dan Aloni
02c8baecf5 Staging: prevent rtl8187se from crashing dev_ioctl() in SIOCGIWNAME
I repeatedly get __stack_chk_fail panic()s with this driver before
applying the attached fix.

ieee80211_wx_get_name() ignores sizeof(wrqu->name) which is IFNAMSIZ (16), and
on certain conditions, the concatenated string will be larger than IFNAMSIZ
including the terminating zero.

    length ("802.11" ++ "b" ++ "/g" ++ " linked" ++ "\x00") == 17

This fix uses strl{cpy,cat} in addition to the reduction of the total
possible length of the output string by a char.

It can be applied to 2.6.30-stable as well.

Signed-off-by: Dan Aloni <dan@aloni.org>
Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-07-12 13:21:45 -07:00
Bartlomiej Zolnierkiewicz
77b9288197 Staging: rtl8192su: convert to net_device_ops
commit e3804cbebb removed
COMPAT_NET_DEV_OPS so this change is needed to make rtl8192su
buildable again.

Loosely based on Alexander's patch for rtl8187se, untested.

Cc: Alexander Beregalov <a.beregalov@gmail.com>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-07-12 13:21:45 -07:00
Bill Pemberton
35e2bed559 Staging: serqt_usb2: declare qt_open static in serqt_usb2
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-07-12 13:21:45 -07:00
Bill Pemberton
d9dea3c1c0 Staging: serqt_usb2: fix qt_close parameters in serqt_usb2
The parameter list for qt_close() was from the old non usb-serial
driver.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-07-12 13:21:45 -07:00
Alexander Beregalov
9b5de0a0a7 Staging: comedi: jr3_pci.c: add required includes
Fix this build errors:
jr3_pci.c:739: error: 'jiffies' undeclared
jr3_pci.c:748: error: implicit declaration of function 'msecs_to_jiffies'
jr3_pci.c:763: error: implicit declaration of function 'add_timer'
jr3_pci.c:790: error: implicit declaration of function 'init_timer'
jr3_pci.c:951: error: implicit declaration of function 'del_timer_sync'

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-07-12 13:21:45 -07:00
Greg Kroah-Hartman
e5a85d2179 Staging: meilhaus: add email address to TODO
Meilhaus Support also wants to be notified of changes to these drivers.

Cc: David Kiliani <mail@davidkiliani.de>
Cc: Meilhaus Support <support@meilhaus.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-07-12 13:21:44 -07:00
Pete Zaitcev
aea0d43bde Staging: rspiusb: use NULL virtual address instead of a bogus one
The main problem here is that I just cannot see how this could ever
be correct:

	usb_fill_bulk_urb(pdx->PixelUrb[frameInfo][i], pdx->udev, epAddr,
		(dma_addr_t *) sg_dma_address(&pdx->sgl[frameInfo][i]),
 		sg_dma_len(&pdx->sgl[frameInfo][i]),

You cannot take a DMA address, cast it to a _pointer to_ a DMA address,
and then regard it as a virtual address of the transfer buffer.
However, finding the right virtual address was too hard for me,
so I just stubbed it with NULL. At least usbmon won't oops then
(it will not show any data but it's better than crashing).

Also, too big a buffer was allocated elsewhere.

And since we're at it, drop clearly unnecessary usb_buffer_alloc too,
leaving it where it may be useful.

Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-07-12 13:21:44 -07:00
Alan Cox
f408adeb51 Staging: vt6655: compile fix
At least make it compile

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-07-12 13:21:44 -07:00
Jorrit Schippers
8dfb005718 Staging: rt2870: Add USB ID for Sitecom WL-608
Add the USB id 0x0DF6,0x003F to the rt2870.h file such that the
Sitecom WL-608 device will be recognized by this driver.

Signed-off-by: Jorrit Schippers <jorrit@ncode.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-07-12 13:21:44 -07:00
Johannes Berg
f1d58c2521 mac80211: push rx status into skb->cb
Within mac80211, we often need to copy the rx status into
skb->cb. This is wasteful, as drivers could be building it
in there to start with. This patch changes the API so that
drivers are expected to pass the RX status in skb->cb, now
accessible as IEEE80211_SKB_RXCB(skb). It also updates all
drivers to pass the rx status in there, but only by making
them memcpy() it into place before the call to the receive
function (ieee80211_rx(_irqsafe)). Each driver can now be
optimised on its own schedule.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-07-10 14:57:54 -04:00
Patrick McHardy
ec634fe328 net: convert remaining non-symbolic return values in ndo_start_xmit() functions
This patch converts the remaining occurences of raw return values to their
symbolic counterparts in ndo_start_xmit() functions that were missed by the
previous automatic conversion.

Additionally code that assumed the symbolic value of NETDEV_TX_OK to be zero
is changed to explicitly use NETDEV_TX_OK.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-07-05 19:23:38 -07:00
Patrick McHardy
6ed106549d net: use NETDEV_TX_OK instead of 0 in ndo_start_xmit() functions
This patch is the result of an automatic spatch transformation to convert
all ndo_start_xmit() return values of 0 to NETDEV_TX_OK.

Some occurences are missed by the automatic conversion, those will be
handled in a seperate patch.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-07-05 19:16:04 -07:00
Florian Westphal
0e8635a8e1 net: remove NET_RX_BAD and NET_RX_CN* defines
almost no users in the tree; and the few that use them treat them
like NET_RX_DROP.

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-07-05 19:15:35 -07:00
David Daney
a620c16326 Staging: octeon-ethernet: Fix race freeing transmit buffers.
The existing code had the following race:

Thread-1                       Thread-2

inc/read in_use
                               inc/read in_use
inc tx_free_list[qos].len
                               inc tx_free_list[qos].len

The actual in_use value was incremented twice, but thread-1 is going
to free memory based on its stale value, and will free one too many
times.  The result is that memory is freed back to the kernel while
its packet is still in the transmit buffer.  If the memory is
overwritten before it is transmitted, the hardware will put a valid
checksum on it and send it out (just like it does with good packets).
If by chance the TCP flags are clobbered but not the addresses or
ports, the result can be a broken TCP stream.

The fix is to track the number of freed packets in a single location
(a Fetch-and-Add Unit register).  That way it can never get out of sync
with itself.

We try to free up to MAX_SKB_TO_FREE (currently 10) buffers at a time.
If fewer are available we adjust the free count with the difference.
The action of claiming buffers to free is atomic so two threads cannot
claim the same buffers.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2009-06-24 18:34:41 +01:00
David Daney
f696a10838 Staging: octeon-ethernet: Convert to use net_device_ops.
Convert the driver to use net_device_ops as it is now mandatory.

Also compensate for the removal of struct sk_buff's dst field.

The changes are mostly mechanical, the content of ethernet-common.c
was moved to ethernet.c and ethernet-common.{c,h} are removed.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2009-06-24 18:34:41 +01:00
Alan Cox
94362fd7fb tty: fix some bogns in the serqt_usb2 driver
Remove the replicated urban legends from the comments and fix a couple of
other silly calls

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-22 11:32:24 -07:00
Greg Kroah-Hartman
c7a5d70796 Staging: comedi: fix build errors
Some of the comedi drivers need timer.h to build properly, so put it
in the comedidev.h file to fix these errors.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19 11:04:32 -07:00
Roberto De Ioris
7316bc55ed Staging: udlfb: update to version 0.2.3
This updates the udlfb to the 0.2.3 version.

From: Roberto De Ioris <roberto@unbit.it>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19 11:00:57 -07:00
Greg Kroah-Hartman
4b6a4856c6 Staging: udlfb: fix some sparse warnings.
There are others remaining due to the __iomem namespace of the
framebuffer data pointer.

Cc: Roberto De Ioris <roberto@unbit.it>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19 11:00:57 -07:00
Greg Kroah-Hartman
f05e0575ed Staging: udlfb: clean up checkpatch warnings in udlfb.c
This cleans up a bunch of checkpatch.pl warnings in the udlfb.c file.

Cc: Roberto De Ioris <roberto@unbit.it>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19 11:00:57 -07:00
Greg Kroah-Hartman
39e7df5d17 Staging: udlfb: clean up checkpatch warnings in udlfb.h
This cleans up a bunch of checkpatch.pl warnings in the udlfb.h file.

Cc: Roberto De Ioris <roberto@unbit.it>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19 11:00:57 -07:00
Greg Kroah-Hartman
9a82e6df79 Staging: udlfb: add udlfb driver to build
This adds the udlfb driver to the build system

Cc: Roberto De Ioris <roberto@unbit.it>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19 11:00:57 -07:00
Roberto De Ioris
88e58b1a42 Staging: add udlfb driver
This adds the udlfb driver, a framebuffer driver for DisplayLink devices.


From: Roberto De Ioris <roberto@unbit.it>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19 11:00:57 -07:00
Greg Kroah-Hartman
0f218ee2b7 Staging: pata_rdc: remove pointless comments
These comments contribute nothing to the code, and most were just cut
and pasted from another driver.

Cc: Kevin Huang  <Kevin.Huang@rdc.com.tw>
Cc: Tomy Wang <Tomy.Wang@rdc.com.tw>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19 11:00:57 -07:00
Greg Kroah-Hartman
0b77ca66a6 Staging: pata_rdc: remove DRIVER macros
They are not needed, and the version one was pointless now that the code
is merged into the tree.

Cc: Kevin Huang  <Kevin.Huang@rdc.com.tw>
Cc: Tomy Wang <Tomy.Wang@rdc.com.tw>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19 11:00:56 -07:00
Greg Kroah-Hartman
da9dbc0059 Staging: pata_rdc: remove dbgprintf macro
Use dev_dbg() instead.

Cc: Kevin Huang  <Kevin.Huang@rdc.com.tw>
Cc: Tomy Wang <Tomy.Wang@rdc.com.tw>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19 11:00:56 -07:00
Greg Kroah-Hartman
c7a8c592c1 Staging: pata_rdc: remove broken flag
The "in_module_init" flag was wrong, so just remove it, it's not needed.


Cc: Kevin Huang  <Kevin.Huang@rdc.com.tw>
Cc: Tomy Wang <Tomy.Wang@rdc.com.tw>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19 11:00:56 -07:00
Greg Kroah-Hartman
6b23e3104d Staging: pata_rdc: fix build warnings
struct ata_port_info shouldn't be const, so remove that which fixes up
the compiler warnings.

Cc: Kevin Huang  <Kevin.Huang@rdc.com.tw>
Cc: Tomy Wang <Tomy.Wang@rdc.com.tw>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19 11:00:56 -07:00
Greg Kroah-Hartman
1a24bda261 Staging: pata_rdc: use PCI_DEVICE
Use the PCI_DEVICE macro, that's what it is there for...

Cc: Kevin Huang  <Kevin.Huang@rdc.com.tw>
Cc: Tomy Wang <Tomy.Wang@rdc.com.tw>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19 11:00:56 -07:00
Greg Kroah-Hartman
c0a5962f76 Staging: pata_rdc: remove function prototypes
Move code around so we do not need the function prototypes anymore.

Cc: Kevin Huang  <Kevin.Huang@rdc.com.tw>
Cc: Tomy Wang <Tomy.Wang@rdc.com.tw>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19 11:00:56 -07:00
Greg Kroah-Hartman
482612afc6 Staging: pata_rdc: coding style fixes
This fixes a number of coding style issues in the pata_rdc.h file

Cc: Kevin Huang  <Kevin.Huang@rdc.com.tw>
Cc: Tomy Wang <Tomy.Wang@rdc.com.tw>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19 11:00:56 -07:00
Greg Kroah-Hartman
b079fa27d9 Staging: pata_rdc: convert code to work in 2.6.29
This fixes build problems in the pata_rdc driver due to api changes in
the libata layer.


Cc: Kevin Huang  <Kevin.Huang@rdc.com.tw>
Cc: Tomy Wang <Tomy.Wang@rdc.com.tw>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19 11:00:56 -07:00
Greg Kroah-Hartman
89a2c2085b Staging: pata_rdc: add driver to the build system
Cc: Kevin Huang  <Kevin.Huang@rdc.com.tw>
Cc: Tomy Wang <Tomy.Wang@rdc.com.tw>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19 11:00:56 -07:00
Kevin Huang
ad41a8a58e Staging: add pata_rdc driver
This is our IDE Source code. This is base on kernel 2.6.28.  pata_rdc.h
and pata_rdc.c

From: Kevin Huang <Kevin.Huang@rdc.com.tw>
Cc: Tomy Wang <Tomy.Wang@rdc.com.tw>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19 11:00:56 -07:00
Greg Kroah-Hartman
ba49d59ac4 Staging: remove obsolete serqt_usb driver
Now that Bill rewrote the driver "properly", this old thing can be removed.

Cc: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19 11:00:56 -07:00
Bill Pemberton
8ba911c793 Staging: serqt_usb2 add the driver to the build
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19 11:00:56 -07:00
Bill Pemberton
d75662e164 Staging: Add serqt_usb2, a rewrite of serqt_usb for the usb-serial layer
This is the serqt_usb driver rewritten to use usb-serial.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19 11:00:56 -07:00
Greg Kroah-Hartman
0d99b6eb85 Staging: asus_oled: fix build warnings
This fixes some build warnings in the asus_oled driver.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19 11:00:55 -07:00
Greg Kroah-Hartman
04b17c935b Staging: slicoss: fix build warnings
This fixes some build warnings in the slicoss driver.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19 11:00:55 -07:00
Jean Delvare
b0f434a7e9 Staging: slicoss: 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>
2009-06-19 11:00:55 -07:00
Greg Kroah-Hartman
602bd07313 Staging: altpciechdma: fix build warnings
This fixes some build warnings in the altpciechdma driver.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19 11:00:55 -07:00
Jean Delvare
24f5063d3f Staging: altpciechdma: 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>
2009-06-19 11:00:55 -07:00
Dongxiao Xu
afcf462a1f Staging: heci: fix the problem that file_ext->state should be protected by device_lock
While access file_ext->state, we should use device_lock to protect it. The
original codes miss this in some places.

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19 11:00:55 -07:00
Dongxiao Xu
8d1c50e982 Staging: heci: do not print error when heci_bh_handler is already on workqueue
schedule_work returns 0, if the work is already on the work_queue, else
returns non-zero. Do not print error message if heci_bh_handlerwork was
already on queue.

Signed-off-by: Nikanth Karthikesan <knikanth@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19 11:00:55 -07:00
Dongxiao Xu
ad914a3ec5 Staging: heci: fix setting h_is bit in h_csr register
Host software could issue interrupts to ME firmware, using H_IG bit. While
Setting H_IG bit, host software should preserve all the other bits in H_CSR
unchanged. In the original function which sets H_CSR register, they first read
the register, then set some bits, and write the whole 32bits back to the
register. And that the special behavior of H_IS (write-one-to-zero) causes problem.
This patch fixes the issue in the following ways:

 - Modify heci_set_csr_register() function so that it doesn't change H_IS bit.
 - Add interface heci_csr_clear_his() to clear H_IS bit. This function is called
   after H_IS checking (dev->host_hw_state & H_IS == H_IS).
 - In original heci_csr_disable_interrupts() function, it not only clears H_IE
   bit, sometimes it also clears H_IS bit. This patch separates the two parts.
 - Avoid calling write_heci_register() function to set H_CSR register directly,
   and instead using heci_set_csr_register() function

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19 11:00:55 -07:00
Dongxiao Xu
52b855600c Staging: heci: fix typos and add wait after disconnect
- Fix typo for enum HECI_WRITE.
 - Fix timeout issue. If the time period is greater or equal 15s, it's timeout.
 - Add 10ms wait time after disconnect, to ensure that hardware is ready.
   Otherwise in the next time connection, hardware resource may be busy.

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19 11:00:55 -07:00
Dongxiao Xu
58b25a63a1 Staging: heci: fix softirq safe to unsafe spinlock issue
When spinlock is nested, and the outside one is spin_lock_bh, the inner
spinlock should also be spin_lock_bh, otherwise it will bring softirq-safe
to softirq-unsafe lock conversion.

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19 11:00:55 -07:00
Dongxiao Xu
72abd22883 Staging: heci: fix spinlock order mess of device_lock and read_io_lock
In orginal code, the device_lock and read_io_lock is mess order when nested,
which may bring dead lock. This patch unify the spinlock order of device_lock
and read_io_lock. First acquire device_lock, then read_io_lock.

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19 11:00:55 -07:00
Dongxiao Xu
171df63819 Staging: heci: fix wrong order of device_lock and file_lock
When the two locks are nested, the code should always first acquire file_lock,
and then acquire device_lock in order not to generate dead-lock race.

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19 11:00:55 -07:00
Dongxiao Xu
36e844671c Staging: heci: fix userspace pointer mess
Fix userspace pointer mess.
 - In memcmp(), dest and src pointer should be both in kernel space.
 - Add (void __user *) modification before userspace pointer.

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19 11:00:54 -07:00
vibi sreenivasan
7a80bfcd1f Staging: rspiusb: copy_to/from_user related fixes
The patch does copy_to/from_user related fixes

*) __copy_from/to_user is enough for user space data buffer checked by access_ok.
*) return -EFAULT if __copy_from/to_user fails.
*) Do not use memcpy to copy from user space.

Signed-off-by: Vibi Sreenivasan <vibi_sreenivasan@cms.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19 11:00:54 -07:00
vibi sreenivasan
8d2db5169d Staging: rspiusb: Fix a bunch of warnings.
The patch fixes the following warnings.

drivers/staging/rspiusb/rspiusb.c: In function ‘pixel_data’:
drivers/staging/rspiusb/rspiusb.c:267: warning: passing argument 1 of ‘SetPageDirty’ makes
pointer from integer without a cast
drivers/staging/rspiusb/rspiusb.c: In function ‘UnMapUserBuffer’:
drivers/staging/rspiusb/rspiusb.c:500: warning: passing argument 1 of ‘put_page’ makes
pointer from integer without a cast
drivers/staging/rspiusb/rspiusb.c: In function ‘MapUserBuffer’:
drivers/staging/rspiusb/rspiusb.c:662: warning: assignment makes integer from pointer without a cast
drivers/staging/rspiusb/rspiusb.c:670: warning: assignment makes integer from pointer without a cast

Signed-off-by: Vibi Sreenivasan <vibi_sreenivasan@cms.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19 11:00:54 -07:00
Richard Genoud
14e8bcd086 Staging: rspiusb: duplicate code in pixis_io
It seems that pixis_io and pixis_io2 should do the same thing.


Signed-off-by: Richard Genoud <richard.genoud@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19 11:00:54 -07:00
Richard Genoud
c854b5e58f Staging: rspiusb.c: break the huge piusb_ioctl function into several ones
This makes the code more readable, makes checkpatch really happy and factorize some code.

Signed-off-by: Richard Genoud <richard.genoud@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19 11:00:54 -07:00
Richard Genoud
f2d46e248a Staging: rspiusb: clean rspiusb code
This first patch makes checkpatch happier

Signed-off-by: Richard Genoud <richard.genoud@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19 11:00:54 -07:00
J.R. Mauro
6546f08d21 Staging: rspiusb: make driver compile
Convert undefined info() function calls to dev_err, making rspiusb compile

Signed-off-by: J.R. Mauro <jrm8005@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19 11:00:54 -07:00
Serge E. Hallyn
f82ebea5c8 staging: p9auth: prevent some oopses and memory leaks
Before all testcases, do:
	mknod /dev/caphash c 253 0
	mknod /dev/capuse c 253 1

This patch does the following:

1. caphash write of > CAP_NODE_SIZE bytes overruns node_ptr->data
	(test: cat /etc/mime.types > /dev/caphash)
2. make sure we don't dereference a NULL cap_devices[0].head
	(test: cat serge@root@abab > /dev/capuse)
3. don't let strlen dereference a NULL target_user etc
	(test: echo ab > /dev/capuse)
4. Don't leak a bunch of memory in cap_write().  Note that
   technically node_ptr is not needed for the capuse write case.
   As a result I have a much more extensive patch splitting up
   cap_write(), but I thought a smaller patch that is easier to test
   and verify would be a better start.  To test:
	cnt=0
	while [ 1 ]; do
		echo /etc/mime.types > /dev/capuse
		if [ $((cnt%25)) -eq 0 ]; then
			head -2 /proc/meminfo
		fi
		cnt=$((cnt+1))
		sleep 0.3
	done
   Without this patch, it MemFree steadily drops.  With the patch,
   it does not.

I have *not* tested this driver (with or without these patches)
with factotum or anything - only using the tests described above.

Signed-off-by: Serge E. Hallyn <serue@us.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19 11:00:54 -07:00
David Rowe
0f51010e87 Staging: oslec bug fix
I have just had a bug fix submitted for Oslec which I have applied to
Oslec SVN. The bug can potentially stops the echo canceller adapting
after a few seconds, although it hasn't caused many problems in
practice.

Signed-off-by: David Rowe <david@rowetel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19 11:00:54 -07:00
Andre Lopes
99dc2a7f12 staging: b3dfg: clean up MODULE_PARM_DESC newline
Remove incorrect MODULE_PARM_DESC newline.

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19 11:00:54 -07:00
Roel Kluin
315d7fa9d6 staging: wis-sony-tuner.c: fix &&/|| error
Fix &&/|| typo

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19 11:00:54 -07:00
Julia Lawall
385269885f Staging: rtl8192su: Correct use of ! and &
Correct priority problem in the use of ! and &.

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

// <smpl>
@@ expression E; constant C; @@
- !E & C
+ !(E & C)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19 11:00:54 -07:00
Greg Kroah-Hartman
36dbd40139 Staging: rtl8192su: fix build warnings
This fixes some build warnings in the rtl8192su driver.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19 11:00:53 -07:00
Jerry Chuang
5f53d8ca3d Staging: add rtl8192SU wireless usb driver
Driver from Realtek for the Realtek RTL8192 USB wifi device

Based on the r8187 driver from Andrea Merello <andreamrl@tiscali.it> and
others.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19 11:00:53 -07:00
Greg Kroah-Hartman
d01c3c8e13 Staging: cpc-usb: fix build warnings
This fixes some build warnings in the cpc-usb driver.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19 11:00:53 -07:00
Alexander Beregalov
5e23f3e962 Staging: cpc-usb: fix printk format warnings
Fix this warnings:
cpc-usb_drv.c:478: warning: format '%d' expects type 'int',
	but argument 4 has type 'size_t'
cpc-usb_drv.c:1034: warning: format '%d' expects type 'int',
	but argument 3 has type 'long unsigned int'

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19 11:00:53 -07:00
Alexander Beregalov
c32a4e066c Staging: cpc-usb: depends on PROC_FS
Fix this build error when PROC_FS is not enabled:
cpc-usb_drv.c:61:2: error: #error "PROCFS needed"
cpc-usb_drv.c:1159: error: implicit declaration of function 'proc_mkdir'

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19 11:00:53 -07:00
Julia Lawall
a3d97c9b19 Staging: cpc-usb: Adjust NULL test
Since card must already be non-NULL, it seems that what was intended
was to test the result of kmalloc.

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

// <smpl>
@@
expression E,E1;
identifier f,fld,fld1;
statement S1,S2;
@@

E->fld = f(...);
... when != E = E1
    when != E->fld1 = E1
if (
-   E
+   E->fld
           == NULL) S1 else S2
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19 11:00:53 -07:00
Greg Kroah-Hartman
562bf4845f Staging: cpc-usb: add TODO file
List what needs to be done to get this driver merged into
the main part of the kernel tree.

Cc: Sebastian Haas <haas@ems-wuensche.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19 11:00:53 -07:00
Greg Kroah-Hartman
240f3ee0c8 Staging: cpc-usb: fix checkpatch warnings in sja2m16c.h
This fixes most of the coding style issues in sja2m16c.h

Cc: Sebastian Haas <haas@ems-wuensche.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19 11:00:53 -07:00
Greg Kroah-Hartman
0f064b52ce Staging: cpc-usb: fix up checkpatch errors in cpc-usb_drv.c
This resolves the checkpatch errors in cpc-usb_drv.c

Cc: Sebastian Haas <haas@ems-wuensche.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19 11:00:53 -07:00
Greg Kroah-Hartman
936b623053 Staging: cpc-usb: add driver to the build
This adds the cpc-usb driver to the kernel build

Cc: Sebastian Haas <haas@ems-wuensche.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19 11:00:53 -07:00
Greg Kroah-Hartman
84a209d01c Staging: cpc-usb: fix some build problems in the driver
It will now build properly on the latest kernel tree.

Cc: Sebastian Haas <haas@ems-wuensche.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19 11:00:53 -07:00
Sebastian Haas
e0ce8a7265 Staging: add cpc-usb driver to the staging tree
This is a CPC CAN USB driver.

Just some comments:
cpcusb.h and cpc-usb_drv.c: Essential driver source code
sja2m16c_2.c: Helper for converting bitrate timings
cpc.h: Structures and definition needed to communicate with the device

From: Sebastian Haas <haas@ems-wuensche.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19 11:00:52 -07:00
Oleg Nesterov
6456f0b768 Staging: epl: do not use CLONE_SIGHAND with allow_signal()
Not sure this patch is really needed since kernel_thread() is deprecated
(and checkpatch.pl complains).

But we should not use kernel_thread(CLONE_SIGHAND) if we are going to play
with signals.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19 11:00:52 -07:00
Greg Kroah-Hartman
d604fc995e Staging: android: fix Kconfig issues
Wrap all ANDROID config items with a #if to keep from asking if you want
specific Android drivers even if you say N to CONFIG_ANDROID

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19 11:00:52 -07:00
Greg Kroah-Hartman
3dffc8271f Staging: android: binder: fix up some checkpatch warnings
This cleans up the majority of the checkpatch warnings in the android
binder driver.  All that is left now is a bunch of too-long-line stuff.


Cc: San Mehat <san@android.com>
Cc: Arve Hjønnevåg <arve@android.com>
Cc: David Rientjes <rientjes@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19 11:00:52 -07:00
Greg Kroah-Hartman
e93daf9f8d Staging: android: ram_console: fix up remaining checkpatch warnings
This cleans up the last of the checkpatch warnings in the android
ram_console driver.


Cc: San Mehat <san@android.com>
Cc: Arve Hjønnevåg <arve@android.com>
Cc: David Rientjes <rientjes@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19 11:00:52 -07:00
Greg Kroah-Hartman
66b20608c9 Staging: android: logger: fix up remaining checkpatch warnings
This cleans up the last of the checkpatch warnings in the android logger
driver.


Cc: San Mehat <san@android.com>
Cc: Arve Hjønnevåg <arve@android.com>
Cc: David Rientjes <rientjes@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19 11:00:52 -07:00
Greg Kroah-Hartman
1dbb5765ac Staging: android: lowmemorykiller: fix up remaining checkpatch warnings
This cleans up the last of the checkpatch warnings in the android
lowmemorykiller driver.


Cc: San Mehat <san@android.com>
Cc: Arve Hjønnevåg <arve@android.com>
Cc: David Rientjes <rientjes@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19 11:00:52 -07:00
Mike Lockwood
241e12879b Staging: android: timed_gpio: Separate timed_output class into a separate driver.
Signed-off-by: Mike Lockwood <lockwood@android.com>
Signed-off-by: Arve Hjønnevåg <arve@android.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19 11:00:52 -07:00
David Rientjes
5d14a573a4 Staging: android: lowmemorykiller: fix possible android low memory killer NULL pointer
get_mm_rss() atomically dereferences the actual without checking for a
NULL pointer, which is possible since task_lock() is not held.

Cc: San Mehat <san@android.com>
Cc: Arve Hjønnevåg <arve@android.com>
Signed-off-by: David Rientjes <rientjes@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19 11:00:52 -07:00
David Rientjes
34006e11ee Staging: android: lowmemorykiller: cleanup android low memory killer
Clean up the code in lowmem_shrink() for the Android low memory killer so
that it follows the kernel coding style.

It's unnecessary to check for p->oomkilladj >= min_adj if the selected
task's oomkilladj score is stored since get_mm_rss() will always be
greater than zero.

Cc: San Mehat <san@android.com>
Cc: Arve Hjønnevåg <arve@android.com>
Signed-off-by: David Rientjes <rientjes@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19 11:00:52 -07:00
Arve Hjønnevåg
31d59a4198 Staging: android: lowmemorykiller: Don't count free space unless it meets the specified limit by itself
From: Arve Hjønnevåg <arve@android.com>

This allows processes to be killed when the kernel evict cache pages in
an attempt to get more contiguous free memory.

Signed-off-by: Arve Hjønnevåg <arve@android.com>
Cc: David Rientjes <rientjes@google.com>
Cc: San Mehat <san@android.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19 11:00:52 -07:00