Commit Graph

1829 Commits

Author SHA1 Message Date
Jiri Slaby 140e92abe2 [PATCH] Char: istallion, fix enabling
Enable ISA cards before pci_register_driver and then, enable each PCI card in
probe function.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:29:00 -08:00
Jiri Slaby 8f8f5a5808 [PATCH] Char: istallion, correct fail paths
Check more retvals and react somehow.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:29:00 -08:00
Jiri Slaby 390141728f [PATCH] Char: istallion, free only isa
Only ISA cards should be freed in module exit.  Pci probed are freed in
pci_remove.  Define a flag, where we store this info a what to check against.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:29:00 -08:00
Jiri Slaby b103b5cfcb [PATCH] Char: istallion, brdnr locking
Kill possible race when getting brdnr by locking.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:29:00 -08:00
Jiri Slaby a00f33f3ab [PATCH] Char: istallion, ifdef eisa code
Disable compiling eisa stuff if STLI_EISAPROBE == 0.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:29:00 -08:00
Jiri Slaby 1328d737f5 [PATCH] Char: istallion, variables cleanup
- wipe gcc -W warnings by int -> uint conversion
- move 2 global variables into their local place

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:29:00 -08:00
Jiri Slaby 1f8ec435e3 [PATCH] Char: istallion, eliminate typedefs
Use only struct <name> instead of defining a new type <name_t>.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:29:00 -08:00
Jiri Slaby a3f8d9d5e1 [PATCH] Char: istallion, remove the mess
- remove unneeded license text
- remove functions, that are implemented in kernel -- call them (strtoul,
  min, tolower)
- do not cast NULL
- there is no static table, throw away code, which takes care of it --
  find module param cards in that place instead.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:28:59 -08:00
Jiri Slaby 845bead4c3 [PATCH] Char: istallion, convert to pci probing
Use probing for pci devices.  Change some __inits to __devinits to use these
functions in probe function.  Create stli_cleanup_ports and move there cleanup
code from module_exit() code to not have duplicite cleanup code.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:28:59 -08:00
Jiri Slaby aeaccfe425 [PATCH] Char: stallion, use dynamic dev
Use dynamic tty device registering depending on board's port count.  (i ->
retval change is relevant, since gcc complains about signedness of i)

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:28:59 -08:00
Jiri Slaby 6b2c9457bb [PATCH] Char: stallion, variables cleanup
- fix `gcc -W' un/signed warnings by converting some ints -> uints.
- move 3 global variables into functions, where are they used.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:28:59 -08:00
Jiri Slaby c62429d93e [PATCH] Char: stallion, remove syntactic sugar
Remove useless parenthesis and brackets.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:28:59 -08:00
Jiri Slaby 79cfe7ab54 [PATCH] Char: stallion, brd struct locking
Since assigning of stl_brds[brdnr] is racy, add locking to this critical
section.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:28:59 -08:00
Jiri Slaby fc06b5cf85 [PATCH] Char: stallion, fix fail paths
Release everything what was allocated and check return value of isa probing.
Release only ISA boards in module exit, since pci have their own
pci-probing-remove.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:28:59 -08:00
Jiri Slaby 843b568cf0 [PATCH] Char: stallion, functions cleanup
Delete macros and functions, that are implemented in kernel yet (strtoul, min,
tolower).  Expand one function body in place, where it is called from.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:28:59 -08:00
Jiri Slaby 705c186241 [PATCH] Char: stallion, correct __init macros
Some functions are now called from pci probing functiuon which is __devinit,
not __init, correct this to not free functions after init if hotplug enabled.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:28:59 -08:00
Jiri Slaby 3b85b3413d [PATCH] Char: stallion, implement fail paths
This driver expect everything to work.  Implement fail paths logic to release
regions, irq hangler, memory...  if something is in bad state.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:28:59 -08:00
Jiri Slaby fefaf9a789 [PATCH] Char: stallion, prints cleanup
Too many information is printed out (they may be easily obtained through
sysfs), wipe them out in probe function.  Convert rest of them to dev_
variants.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:28:59 -08:00
Jiri Slaby b1b84fe0d7 [PATCH] Char: stallion, convert to pci probing
Convert stallion driver to pci probing instead of pci_dev_get iteration.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:28:59 -08:00
Jiri Slaby 30f4218ffc [PATCH] Char: sx, request regions
Check regions if they are free before we touch them.  Release them in
failpaths.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:28:59 -08:00
Jiri Slaby 39103494fd [PATCH] Char: sx, use pci_iomap
Use pci_ friends for memory remapping of pci devices.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:28:58 -08:00
Jiri Slaby 7eb9976f10 [PATCH] Char: sx, fix return in module init
If pci_register_driver fails, but eisa_driver_register doesn't, we don't call
misc_deregister, but returns error.  Return OK in such cases.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:28:58 -08:00
Jiri Slaby c9594643c0 [PATCH] Char: sx, simplify timer logic
Use kernel helpers for changing timer internals.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:28:58 -08:00
Jiri Slaby 15b611f63f [PATCH] Char: sx, whitespace cleanup
Use Lindent to cleanup whitespace.  Wrap long lines by hand.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:28:58 -08:00
Jiri Slaby 55e7071a3c [PATCH] Char: sx, remove duplicite code
sx_remove_code contents were used twice.  Call this function instead.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:28:58 -08:00
Jiri Slaby 42f6384fe4 [PATCH] Char: sx, lock boards struct
Fix race condition which may occurs when multiple cards are probed at the same
time.  Add mutex to critical sections to avoid this situation.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:28:58 -08:00
Jiri Slaby 927a6f9dd0 [PATCH] Char: sx, ifdef ISA code
Most users won't need old probe code -- make it depndent on CONFIG_(E)ISA.

Cc: <R.E.Wolff@BitWizard.nl>
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:28:58 -08:00
Jiri Slaby 18f813ee69 [PATCH] Char: sx, use eisa probing
Instead of finding eisa directly, use eisa probing.

Cc: <R.E.Wolff@BitWizard.nl>
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:28:58 -08:00
Jiri Slaby cda5265e7c [PATCH] Char: sx, mark functions as devinit
Mark as much as possible functions as __devinit to free them after driver
initialization (if no hotplug).

Cc: <R.E.Wolff@BitWizard.nl>
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:28:58 -08:00
Jiri Slaby 4a7cb69bad [PATCH] Char: sx, use kcalloc
Convert self-implemented kzalloc to kernel kcalloc.

Cc: <R.E.Wolff@BitWizard.nl>
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:28:58 -08:00
Jiri Slaby 5572e10323 [PATCH] Char: sx, convert to pci probing
Convert old pci code to pci probing.

Cc: <R.E.Wolff@BitWizard.nl>
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:28:58 -08:00
Jiri Slaby 17c4edf0c8 [PATCH] Char: isicom, fix tty index check
Since tty->index is signed and may be < 0, we should assign this to int not
uint.  There is already a check to ensure if it is not negative, but gcc
complains with -W flag enabled and it is perfectly correct:
drivers/char/isicom.c:953: warning: comparison of unsigned expression < 0
is always false

Fix this issue by converting `line' variable from uint to int.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:28:58 -08:00
Jiri Slaby 11c838772d [PATCH] Char: isicom, remove cvs stuff
We don't need RCS_ID & co. Extract them from the code and define only one
macro -- SX_VERSION.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:28:58 -08:00
Jiri Slaby 34b55b865e [PATCH] Char: isicom, simplify timer
Don't init timer in such complicated way. Use DEFINE_TIMER and then only
mod_timer to reset the expiration.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:28:58 -08:00
Jiri Slaby 906cdecbed [PATCH] Char: isicom, use completion
Use wait_for_completion+complete instead of variables+msleep hack.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:28:58 -08:00
Jiri Slaby f067137842 [PATCH] Char: isicom, check kmalloc retval
Value returned from kamlloc may be NULL, we should check if ENOMEM occured.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:28:57 -08:00
Jiri Slaby 78028da91e [PATCH] Char: isicom, use pci_request_region
Use pci_request_region in pci probing function instead of request_region.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:28:57 -08:00
Jiri Slaby 938a7023bb [PATCH] Char: isicom, move to tty_register_device
Instead of registering all devices in register_tty_driver, register devices in
probe function and register only port_count devices.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:28:57 -08:00
Jiri Slaby 8acef8fcab [PATCH] Char: isicom, remove unneeded memset
Memsetting of global static variables is not needed in the init code.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:28:57 -08:00
Jiri Slaby 18234f88bc [PATCH] Char: isicom, remove isa code
ISA is not supported by this driver, remove parts, that take care of this.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:28:57 -08:00
Jiri Slaby ca26200511 [PATCH] Char: isicom, rename init function
Rename init function from setup to init and mark it as __init, not __devinit.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:28:57 -08:00
Jiri Slaby 09a4a11255 [PATCH] Char: isicom, expand function
Simple functions (those, that calls reuest_irq, request_region et al) may be
expanded directly in code.  It makes probe function more readable and
transparent.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:28:57 -08:00
Alan Cox 64bb6c5e1d [PATCH] tty_ioctl: use termios for the old structure and termios2 for the new
Having split out the user and kernel structures it turns out that some non
glibc C libraries pull their termios struct from the kernel headers
directly or indirectly.  This means we must keep "struct termios" as the
library sees it correct for the old ioctls.  Not a big problem just shuffle
the names and ifdef around a bit

[akpm@osdl.org: build fix]
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:28:57 -08:00
Alan Cox 606d099cdd [PATCH] tty: switch to ktermios
This is the grungy swap all the occurrences in the right places patch that
goes with the updates.  At this point we have the same functionality as
before (except that sgttyb() returns speeds not zero) and are ready to
begin turning new stuff on providing nobody reports lots of bugs

If you are a tty driver author converting an out of tree driver the only
impact should be termios->ktermios name changes for the speed/property
setting functions from your upper layers.

If you are implementing your own TCGETS function before then your driver
was broken already and its about to get a whole lot more painful for you so
please fix it 8)

Also fill in c_ispeed/ospeed on init for most devices, although the current
code will do this for you anyway but I'd like eventually to lose that extra
paranoia

[akpm@osdl.org: bluetooth fix]
[mp3@de.ibm.com: sclp fix]
[mp3@de.ibm.com: warning fix for tty3270]
[hugh@veritas.com: fix tty_ioctl powerpc build]
[jdike@addtoit.com: uml: fix ->set_termios declaration]
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Martin Peschke <mp3@de.ibm.com>
Acked-by: Peter Oberparleiter <oberpar@de.ibm.com>
Cc: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:28:57 -08:00
Alan Cox edc6afc549 [PATCH] tty: switch to ktermios and new framework
This is the core of the switch to the new framework.  I've split it from the
driver patches which are mostly search/replace and would encourage people to
give this one a good hard stare.

The references to BOTHER and ISHIFT are the termios values that must be
defined by a platform once it wants to turn on "new style" ioctl support.  The
code patches here ensure that providing

1. The termios overlays the ktermios in memory
2. The only new kernel only fields are c_ispeed/c_ospeed (or none)

the existing behaviour is retained.  This is true for the patches at this
point in time.

Future patches will define BOTHER, ISHIFT and enable newer termios structures
for each architecture, and once they are all done some of the ifdefs also
vanish.

[akpm@osdl.org: warning fix]
[akpm@osdl.org: IRDA fix]
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:28:56 -08:00
Jiri Slaby 96b066b85c [PATCH] Char: stallion, remove many prototypes
Many prototypes are useless, since functions are declared before they are
called.  Also some code was easy to move to resolve this dependency and delete
prototypes.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:28:55 -08:00
Jiri Slaby 40e8265212 [PATCH] Char: stallion, mark functions as init
Use __init macro for functions, that may be freed after initialization.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:28:55 -08:00
Jiri Slaby 60be481089 [PATCH] Char: stallion, uninline functions
- Do not inline such long functions, it won't speed up anything.
- Remove prototypes of these functions.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:28:55 -08:00
Jiri Slaby 23b85a152b [PATCH] Char: stallion, move init/deinit
- Move code from stl_init into module init function, because calling it was the
  only one thing, that it did.
- Move this code to the end of the driver (usual place for this) to resolve
  dependencies simply -- without prototypes.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:28:55 -08:00
Jiri Slaby ca7ed0f22f [PATCH] Char: stallion, kill typedefs
Typedefs are considered ugly in the kernel. Eliminate them.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:28:55 -08:00
Jiri Slaby 615e4a71ec [PATCH] Char: stallion, remove unneeded casts
casts of NULL are unnecessary. And so casts to (void *) are.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:28:55 -08:00
Jiri Slaby a0564e1455 [PATCH] Char: stallion, use pr_debug macro
Use pr_debug kernel macro instead of #ifdef DEBUG | printk() | #endif

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:28:55 -08:00
Andrew Morton 95a7b8b9a6 [PATCH] mxser-workqueue-fixes
Cc: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:28:55 -08:00
Jiri Slaby e930790d2b [PATCH] mxser_new: correct tty driver name
Mxser tty driver name should be ttyMI, not ttyM.  Correct this in mxser_new to
avoid conflicts with isicom driver, which is ttyM.

Acked-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:28:55 -08:00
Jiri Slaby a8b74de92e [PATCH] Char: mxser_new, clean macros
Celan redundant macros.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:28:55 -08:00
Jiri Slaby 2094e757af [PATCH] Char: mxser_new, pci probing
Finally, the intention of the patch serie: PCI probing for this driver.  add
pci_driver structure, (un)register it and add some stuff, which this needs.
Remove pdev pointer from board structure, because it's no longer needed.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:28:54 -08:00
Jiri Slaby 5dbda701fe [PATCH] Char: mxser_new, delete ttys and termios
- Driver uses global tty_struct array, which tries to assign to the
  tty_driver's ttys.
- the very same thing for termios
- the same for termios_locked

Kill such constructions.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:28:54 -08:00
Jiri Slaby b1d1c8dd35 [PATCH] Char: mxser_new, correct intr handler proto
Prototype of the driver's interrupt handler is old-fashioned, past changes
tell us, we won't get pt_regs as the 3rd argument.  There are only 2 params.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:28:54 -08:00
Jiri Slaby e079f495b7 [PATCH] Char: mxser_new, comments cleanup
mxser_new, comments cleanup

- Remove commented code, since we have version control.
- Remove comments containing "following added by..." and "above added by,..".
  It's useless.
- Align other comments.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:28:54 -08:00
Jiri Slaby 925e9c1c08 [PATCH] Char: mxser_new, reverse if-else-paths patch
This patch was intorduced in mxser to 1.9.1 conversion, but causes endless
sleep in tcdrain userspace call.

Thanks to Sergei Organov <osv@javad.com> for testing and pointing this out.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:28:54 -08:00
Jiri Slaby cd7ed64e15 [PATCH] Char: mxser_new, compact structures, round2
Too many structures are in the driver for each type of card.  Make only one
for all cards and appropriate alter the code.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:28:54 -08:00
Jiri Slaby 938ef18040 [PATCH] Char: mxser_new, register tty devices on the fly
Register tty indexes only for real devices, udev then creates nodes for them
(and only for them).  Move tty_register_driver before probing, to be correct
when calling tty_register_device.  Also tell tty layer by tty_driver flags,
that we are registering devices.

Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:28:54 -08:00
Jiri Slaby eae4436a4e [PATCH] Char: mxser_new, compress isa finding
ISA cards finding was too complex -- 2 (module params + predefined) absolutely
same routines, join them together with one for loop, one if and one indent
level.

Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:28:54 -08:00
Jiri Slaby ead568c9cd [PATCH] Char: mxser_new, don't check tty_unregister retval
Like other drivers silently unregister_tty_driver and put_tty_driver.  It
shouldn't be busy when module release function is called, since we are not
bsd, no refs shouldn't be held.

Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:28:54 -08:00
Jiri Slaby 171d3a8678 [PATCH] Char: mxser_new, correct fail paths
Resources were not released in some fail paths.  Correct this behaviour by
implementing function and calling it when something fails.

Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:28:54 -08:00
Jiri Slaby 214efebba8 [PATCH] Char: mxser_new, testbit for bit testing
Use testbit like in tty subsystem for TTY_IO_ERROR testing.

Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:28:54 -08:00
Jiri Slaby 7e8bcf9add [PATCH] Char: mxser_new, eliminate tty ldisc deref
Use tty_ldisc_flush and tty_wakeup helpers for accessing ldisc internals.

Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:28:54 -08:00
Jiri Slaby 6faa3778ff [PATCH] char: remove unneded termbits redefinitions (mxser_new)
No need to redefine termbits in char tree.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:28:54 -08:00
Jiri Slaby e1241f34eb [PATCH] Char: mxser_new, CMSPAR is defined
There is no need to have another (ifndeffed) definition of CMSPAR.  It's
defined in includes.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:28:54 -08:00
Jiri Slaby a8dea4ec80 [PATCH] Char: mxser_new, code upside down
Reorder functions upside down not to have too many prototypes of each function
and have some order (similar to other drivers).

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:28:54 -08:00
Jiri Slaby c88cb8f952 [PATCH] Char: mxser_new, alter license terms
- We don't need useless paragraphs in license terms.

- Add me to copyright.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:28:53 -08:00
Jiri Slaby 7f5899252b [PATCH] Char: mxser_new, debug printk dependent on DEBUG
Print some debug info only when DEBUG is enabled (use pr_debug macro).
Eliminate verbose kernel parameter which takes care of this.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:28:53 -08:00
Jiri Slaby e7eafa3245 [PATCH] Char: mxser_new, remove request for testers line
Remove printk with info we are looking for a tester.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:28:53 -08:00
Jiri Slaby eba529ecf7 [PATCH] Char: mxser_new, revert spin_lock changes
Some spinlock changes were introduced in 1.9.1 original moxa driver.  Revert
them, since they cause machine not responding.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:28:53 -08:00
Jiri Slaby 06cc86b5bd [PATCH] Char: mxser_new, kill unneeded memsets
mxser_new, kill unneeded memsets

There is no need to re-zero static global variables' memory, hence memsets
doing this are useless.  alloc_tty_struct also zeroes allocated memory:
another candidate for removing.

This fixes also a bug -- global structures are cleaned up after
initialization of some its parts.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:28:53 -08:00
Jiri Slaby 7a7a5c3303 [PATCH] char: mxser_new, check request_region retvals
mxser_new, check request_region retvals

Return values of (pci_)request_region should be checked and error should be
returned if something is in bad state.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:28:53 -08:00
Jiri Slaby 596280156a [PATCH] char: mxser_new, pci_request_region for pci regions
mxser_new, pci_request_region for pci regions

Use pci_request_region instead of standard request_region for pci device
regions.  More checking, simplier use.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:28:53 -08:00
Jiri Slaby 943f295903 [PATCH] char: mxser_new, use __(dev)init macros
mxser_new, use __(dev)init macros

Let kernel know what can be freed after init of the driver.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:28:53 -08:00
Jiri Slaby 55b307da3e [PATCH] Char: mxser_new, rework to allow dynamic structs
This patch is preparation for further patches (pci probing) to allow allocated
structures to be private data in pci_dev structure.  Union two different
structures used in the driver (hw_conf and port/board descriptor) to another
2: port and board not to initialize 2 different things and to have ports
contained in board structure.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:28:53 -08:00
Jiri Slaby 3306ce3d05 [PATCH] Char: mxser_new, upgrade to 1.9.1
Change cloned experimental driver according to original 1.9.1 moxa driver.
Some int->ulong conversions, outb ~UART_IER_THRI constant.  Remove commented
stuff.

I also added printk line with info, if somebody wants to test it, he may
contact me as I can potentially debug the driver with him or just to confirm
it works properly.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:28:53 -08:00
Jiri Slaby 771f2d1af8 [PATCH] Char: mxser_new, correct include file
include mxser_new.h instead of original mxser.h

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:28:53 -08:00
Andrew Morton 08a4ae44a7 [PATCH] mxser: session warning fix
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:28:53 -08:00
Jiri Slaby 037ad48bdb [PATCH] mxser: make an experimental clone
Clone a new driver for moxa smartio devices by copying mxser.c to mxser_new.c
and mxser.h to mxser_new.h.  No other changes are made.

This is for purposes of updating the driver to the latest vendor version.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:28:53 -08:00
Alan Cox 1187ece3db [PATCH] mxser: PCI refcounts
Switch to pci ref counts for mxser when handling PCI devices.  Use
pci_get_device and drop the reference when we finish and unload.

Signed-off-by: Alan Cox <alan@redhat.com>
Cc: Greg KH <greg@kroah.com>
Cc: <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:28:52 -08:00
Jiri Slaby ae25f8ecdf [PATCH] mxser: correct tty driver name
Mxser tty driver name should be ttyMI, not ttyM.  Correct this in mxser to
avoid conflicts with isicom driver, which is ttyM.

Acked-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:28:52 -08:00
Cedric Le Goater 1ec320afdc [PATCH] add process_session() helper routine: deprecate old field
Add an anonymous union and ((deprecated)) to catch direct usage of the
session field.

[akpm@osdl.org: fix various missed conversions]
[jdike@addtoit.com: fix UML bug]
Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Cedric Le Goater <clg@fr.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:28:51 -08:00
Cedric Le Goater 937949d9ed [PATCH] add process_session() helper routine
Replace occurences of task->signal->session by a new process_session() helper
routine.

It will be useful for pid namespaces to abstract the session pid number.

Signed-off-by: Cedric Le Goater <clg@fr.ibm.com>
Cc: Kirill Korotaev <dev@openvz.org>
Cc: Eric W. Biederman <ebiederm@xmission.com>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Cc: Sukadev Bhattiprolu <sukadev@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:28:51 -08:00
Josef Sipek 7808841442 [PATCH] struct path: convert ipmi
Signed-off-by: Josef Sipek <jsipek@fsl.cs.sunysb.edu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:28:46 -08:00
Josef Sipek cc5ef55fd0 [PATCH] struct path: convert drm
Signed-off-by: Josef Sipek <jsipek@fsl.cs.sunysb.edu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:28:44 -08:00
Josef Sipek a7113a9662 [PATCH] struct path: convert char-drivers
Signed-off-by: Josef Sipek <jsipek@fsl.cs.sunysb.edu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:28:44 -08:00
Peter Zijlstra 24ec839c43 [PATCH] tty: ->signal->tty locking
Fix the locking of signal->tty.

Use ->sighand->siglock to protect ->signal->tty; this lock is already used
by most other members of ->signal/->sighand.  And unless we are 'current'
or the tasklist_lock is held we need ->siglock to access ->signal anyway.

(NOTE: sys_unshare() is broken wrt ->sighand locking rules)

Note that tty_mutex is held over tty destruction, so while holding
tty_mutex any tty pointer remains valid.  Otherwise the lifetime of ttys
are governed by their open file handles.  This leaves some holes for tty
access from signal->tty (or any other non file related tty access).

It solves the tty SLAB scribbles we were seeing.

(NOTE: the change from group_send_sig_info to __group_send_sig_info needs to
       be examined by someone familiar with the security framework, I think
       it is safe given the SEND_SIG_PRIV from other __group_send_sig_info
       invocations)

[schwidefsky@de.ibm.com: 3270 fix]
[akpm@osdl.org: various post-viro fixes]
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Acked-by: Alan Cox <alan@redhat.com>
Cc: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Prarit Bhargava <prarit@redhat.com>
Cc: Chris Wright <chrisw@sous-sol.org>
Cc: Roland McGrath <roland@redhat.com>
Cc: Stephen Smalley <sds@tycho.nsa.gov>
Cc: James Morris <jmorris@namei.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jeff Dike <jdike@addtoit.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Jan Kara <jack@ucw.cz>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:28:38 -08:00
Dmitry Torokhov bef986502f Merge rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts:

	drivers/usb/input/hid.h
2006-12-08 01:07:56 -05:00
Linus Torvalds ea14fad0d4 Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm: (76 commits)
  [ARM] 4002/1: S3C24XX: leave parent IRQs unmasked
  [ARM] 4001/1: S3C24XX: shorten reboot time
  [ARM] 3983/2: remove unused argument to __bug()
  [ARM] 4000/1: Osiris: add third serial port in
  [ARM] 3999/1: RX3715: suspend to RAM support
  [ARM] 3998/1: VR1000: LED platform devices
  [ARM] 3995/1: iop13xx: add iop13xx support
  [ARM] 3968/1: iop13xx: add iop13xx_defconfig
  [ARM] Update mach-types
  [ARM] Allow gcc to optimise arm_add_memory a little more
  [ARM] 3991/1: i.MX/MX1 high resolution time source
  [ARM] 3990/1: i.MX/MX1 more precise PLL decode
  [ARM] 3986/1: H1940: suspend to RAM support
  [ARM] 3985/1: ixp4xx clocksource cleanup
  [ARM] 3984/1: ixp4xx/nslu2: Fix disk LED numbering (take 2)
  [ARM] 3994/1: ixp23xx: fix handling of pci master aborts
  [ARM] 3981/1: sched_clock for PXA2xx
  [ARM] 3980/1: extend the ARM Versatile sched_clock implementation from 32 to 63 bit
  [ARM] 3979/1: extend the SA11x0 sched_clock implementation from 32 to 63 bit period
  [ARM] 3978/1: macro to provide a 63-bit value from a 32-bit hardware counter
  ...
2006-12-07 15:40:39 -08:00
Andrew Victor e0b79e0bc2 [WATCHDOG] watchdog miscdevice patch
It looks like the recent changes to 'struct miscdevice' have impacted
some of the Watchdog drivers.

at91rm9200_wdt.c:205: error: 'struct miscdevice' has no member named 'dev'

For the AT91RM9200 driver I just replaced "miscdevice.dev" with
"miscdevice.parent".

The mpcore_wdt.c and omap_wdt.c seem similarly affected.

Signed-off-by: Andrew Victor <andrew@sanpeople.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2006-12-07 22:46:50 +01:00
Thomas Koeller 74e86ab884 [WATCHDOG] rm9k_wdt: fix interrupt handler arguments
Removed 'struct pt_regs *' from interrupt handler arguments.

Signed-off-by: Thomas Koeller <thomas.koeller@baslerweb.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2006-12-07 22:41:35 +01:00
Thomas Koeller bec4f749cb [WATCHDOG] rm9k_wdt: fix compilation
Driver did not compile any more. Someone moved the definition
of 'struct miscdevice miscdev' to a place near the end of the
file, after some code that was refering to this variable.

Signed-off-by: Thomas Koeller <thomas.koeller@baslerweb.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2006-12-07 22:38:09 +01:00
Randy Dunlap 1aa16eeacd [PATCH] IPMI: fix PROC_FS=n warnings
Fix build warnings for PROC_FS=n.

  drivers/char/ipmi/ipmi_poweroff.c:707: warning: label 'out_err' defined but not used

  drivers/char/ipmi/ipmi_msghandler.c:1774: warning: 'ipmb_file_read_proc' defined but not used
  drivers/char/ipmi/ipmi_msghandler.c:1790: warning: 'version_file_read_proc' defined but not used
  drivers/char/ipmi/ipmi_msghandler.c:1801: warning: 'stat_file_read_proc' defined but not used

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Corey Minyard <minyard@acm.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-07 08:39:48 -08:00
Corey Minyard 5a1099baa8 [PATCH] IPMI: increase KCS message size
Increase the maximum message size a KCS interface supports to the maximum
message size the rest of the driver supports.  Some systems really support
messages this big.

Signed-off-by: Corey Minyard <cminyard@mvista.com>
Cc: Patrick Schoeller <Patrick.Schoeller@hp.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-07 08:39:48 -08:00
Corey Minyard 4d7cbac7c8 [PATCH] IPMI: Fix BT long busy
The IPMI BT subdriver has been patched to survive "long busy" timeouts seen
during firmware upgrades and resets.  The patch never returns the HOSED state,
synthesizes response messages with meaningful completion codes, and recovers
gracefully when the hardware finishes the long busy.  The subdriver now issues
a "Get BT Capabilities" command and properly uses those results.  More
informative completion codes are returned on error from transaction starts;
this logic was propogated to the KCS and SMIC subdrivers.  Finally, indent and
other style quirks were normalized.

Signed-off-by: Rocky Craig <rocky.craig@hp.com>
Signed-off-by: Corey Minyard <minyard@acm.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-07 08:39:47 -08:00
Corey Minyard 168b35a7f6 [PATCH] IPMI: fix pci warning
Change pci_module_init() to the new interface, and check the return code to
avoid warnings and give the user useful information if this fails.

Signed-off-by: Corey Minyard <minyard@acm.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-07 08:39:47 -08:00
Corey Minyard 7d8ba9669a [PATCH] IPMI: add pigeonpoint poweroff
X86 boards generally use ACPI for the power management interactions with the
BMC.  However, non-x86 boards need some help.  This patch adds the help for
the Motorola PigeonPoint-based IPMCs.

Signed-off-by: Joseph Barnett <jbarnett@motorola.com>
Signed-off-by: Corey Minyard <minyard@acm.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-07 08:39:47 -08:00
Corey Minyard b361e27bba [PATCH] IPMI: system interface hotplug
Add the ability to hot add and remove interfaces in the ipmi_si driver.  Any
users who have the device open will get errors if they try to send a message.

Signed-off-by: Corey Minyard <minyard@acm.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-07 08:39:47 -08:00
Corey Minyard 15c62e10bb [PATCH] IPMI: add poll delay
Make sure to delay a little in the IPMI poll routine so we can pass in a
timeout time and thus time things out.

Signed-off-by: Corey Minyard <minyard@acm.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-07 08:39:47 -08:00
Corey Minyard 55162fb165 [PATCH] IPMI: fix request events
When the IPMI message handler requested that the interface look for events,
the ipmi_si driver would request flags, see if the event buffer full flag was
set, then request events.  It's better to just send the request for events, as
it cuts one message out of the transaction if there happens to be events, and
it will fetch events even if the event buffer was not full.

Signed-off-by: Corey Minyard <minyard@acm.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-07 08:39:47 -08:00
Corey Minyard b9675136e2 [PATCH] IPMI: Add maintenance mode
Some commands and operations on a BMC can cause the BMC to "go away" for a
while.  This can cause the automatic flag processing and other things of that
nature to timeout and generate annoying logs, or possibly cause other bad
things to happen when in firmware update mode.

Add detection of those commands (cold reset, warm reset, and any firmware
command) and turns off automatic processing for 30 seconds.  It also add a
manual override either way.

Signed-off-by: Corey Minyard <minyard@acm.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-07 08:39:47 -08:00
Corey Minyard b2c03941b5 [PATCH] IPMI: Allow hot system interface remove
This modifies the IPMI driver so that a lower-level interface can be
dynamically removed while in use so it can support hot-removal of hardware.

It also adds the ability to specify and dynamically change the IPMI interface
the watchdog timer and the poweroff code use.

Signed-off-by: Corey Minyard <minyard@acm.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-07 08:39:47 -08:00
Corey Minyard 759643b874 [PATCH] IPMI: pass sysfs name from lower level driver
Pass in the sysfs name from the lower-level IPMI driver, as the coming IPMI
serial driver will need that to link properly from the serial device sysfs
directory.

Signed-off-by: Corey Minyard <minyard@acm.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-07 08:39:47 -08:00
Corey Minyard bca0324d09 [PATCH] IPMI: remove interface number limits
Remove the arbitrary limit of number of IPMI interfaces.  This has been tested
with 8 interfaces.

Signed-off-by: Corey Minyard <minyard@acm.org>
Cc: Carol Hebert <cah@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-07 08:39:47 -08:00
Corey Minyard f0b55da0d2 [PATCH] IPMI: Fix device model name
Add the product id to the driver model platform device name, in addition to
the device id.  The IPMI spec does not require that individual BMCs in a
system have unique devices IDs, but it does require that the product id/device
id combination be unique.

This also removes a redundant check and cleans up error handling
when the sysfs registration fails.

Signed-off-by: Corey Minyard <minyard@acm.org>
Cc: Carol Hebert <cah@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-07 08:39:47 -08:00
Paul Fulghum af69c7f924 [PATCH] generic HDLC synclink config mismatch fix
Fix compile errors on mismatch between generic HDLC and synclink drivers.

Notes:

generic HDLC support for synclink drivers is *optional* so you can't just
use depend on in Kconfig

This solution is deemed the best after 7 months of review and criticism by
many developers including AKPM.  Read the threads on LKML before posting
about this solution.

Signed-off-by: Paul Fulghum <paulkf@microgate.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-07 08:39:45 -08:00
Adrian Bunk d0ce7d0346 [PATCH] remove drivers/char/riscom8.c:baud_table[]
Commit c7bce3097c removed all usages of
baud_table[] but not the array itself.

Spotted by the GNU C compiler.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-07 08:39:44 -08:00
Mariusz Kozlowski 652d3a3ed7 [PATCH] char: ip2 remove broken macro
This macro is broken and unused so why not remove it.

Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-07 08:39:43 -08:00
Akinobu Mita 36499dc2bc [PATCH] synclink_gt: fix init error handling
Initialization synclink_gt forgot to unregister pci driver on error path.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Paul Fulghum <paulkf@microgate.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-07 08:39:42 -08:00
Maciej W. Rozycki 9399575dd3 [PATCH] dz: Fixes to make it work
This a set of fixes mostly to make the driver actually work:

1. Actually select the line for setting parameters and receiver
   disable/enable.
2. Select the line for receive and transmit interrupt handling correctly.
3. Report the transmitter empty state correctly.
4. Set the I/O type of ports correctly.
5. Perform polled transmission correctly.
6. Don't fix the console line at ttyS3.
7. Magic SysRq support.
8. Various small bits here and there.

Tested with a DECstation 2100 (thanks Flo for making this possible).

[akpm@osdl.org: fix typo]
Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-07 08:39:41 -08:00
Randy Dunlap 0bf9322607 [PATCH] export toshiba SMM support for neofb module
When CONFIG_TOSHIBA=y and CONFIG_FB_NEOMAGIC=m, tosh_smm() needs
to be exported for neofb to use it.

  WARNING: "tosh_smm" [drivers/video/neofb.ko] undefined!
  make[1]: *** [__modpost] Error 1
  make: *** [modules] Error 2

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-07 08:39:40 -08:00
Yoichi Yuasa 403aac965e [PATCH] add return value checking of get_user() in set_vesa_blanking()
[akpm@osdl.org: bugfix]
Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Cc: James Simmons <jsimmons@infradead.org>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-07 08:39:40 -08:00
Randy Dunlap da015a6744 [PATCH] agp-amd64: section mismatches with HOTPLUG=n
When CONFIG_HOTPLUG=n, agp_amd64_resume() calls nforce3_agp_init(), which is
__devinit == __init, so has been discarded and is not usable for resume.

WARNING: drivers/char/agp/amd64-agp.o - Section mismatch: reference to .init.text: from .text between 'agp_amd64_resume' (at offset 0x249) and 'amd64_tlbflush'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-07 08:39:40 -08:00
Jan Beulich fed806f407 [PATCH] allow hwrandom core to be a module
Despite it being small, there should be the option of making it a
module...

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Cc: Michael Buesch <mb@bu3sch.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-07 08:39:39 -08:00
Linas Vepstas c15bb29640 [PATCH] HVCS char driver janitoring: move block of code
Move a block of code from the bottom of the file to the top, which is needed
to enable the cleanup.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Cc: Ryan S. Arnold <rsa@us.ibm.com>
Cc: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-07 08:39:38 -08:00
Mariusz Kozlowski f6337e2af4 [PATCH] i2lib unused variable cleanup
In file included from drivers/char/ip2/ip2main.c:285:
    drivers/char/ip2/i2lib.c: In function `i2Output':
    drivers/char/ip2/i2lib.c:1019: warning: unused variable `rc'

Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-07 08:39:35 -08:00
Neil Horman 5d469ec0f4 [PATCH] Correct misc_register return code handling in several drivers
Clean up several code points in which the return code from misc_register is
not handled properly.

Several modules failed to deregister various hooks when misc_register fails,
and this patch cleans them up.  Also there are a few modules that legitimately
don't care about the failure status of misc register.  These drivers however
unilaterally call misc_deregister on module unload.

Since misc_register doesn't initialize the list_head in the init_routine if it
fails, the deregister operation is at risk for oopsing when list_del is
called.  The initial solution was to manually init the list in the miscdev
structure in each of those modules, but the consensus in this thread was to
consolodate and do that universally inside misc_register.

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Cc: Bjorn Helgaas <bjorn.helgaas@hp.com>
Cc: Kylene Jo Hall <kjhall@us.ibm.com>
Cc: Dmitry Torokhov <dtor@mail.ru>
Cc: Olaf Hering <olh@suse.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-07 08:39:35 -08:00
Ingo Molnar e59e2ae2c2 [PATCH] SysRq-X: show blocked tasks
Add SysRq-X support: show blocked (TASK_UNINTERRUPTIBLE) tasks only.

Useful for debugging IO stalls.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-07 08:39:32 -08:00
Amol Lad aa8a8d6648 [PATCH] ioremap balanced with iounmap for drivers/char/istallion.c
Signed-off-by: Amol Lad <amol@verismonetworks.com>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-07 08:39:30 -08:00
Amol Lad 41bdabbb6d [PATCH] ioremap balanced with iounmap for drivers/char/moxa.c
Signed-off-by: Amol Lad <amol@verismonetworks.com>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-07 08:39:30 -08:00
Amol Lad 8684265412 [PATCH] ioremap balanced with iounmap for drivers/char/rio/rio_linux.c
Signed-off-by: Amol Lad <amol@verismonetworks.com>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-07 08:39:30 -08:00
Nigel Cunningham 7dfb71030f [PATCH] Add include/linux/freezer.h and move definitions from sched.h
Move process freezing functions from include/linux/sched.h to freezer.h, so
that modifications to the freezer or the kernel configuration don't require
recompiling just about everything.

[akpm@osdl.org: fix ueagle driver]
Signed-off-by: Nigel Cunningham <nigel@suspend2.net>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-07 08:39:27 -08:00
Christoph Lameter 54e6ecb239 [PATCH] slab: remove SLAB_ATOMIC
SLAB_ATOMIC is an alias of GFP_ATOMIC

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-07 08:39:24 -08:00
Nick Piggin cd54e7e543 [PATCH] mm: incorrect VM_FAULT_OOM returns from drivers
Some drivers are returning OOM when it is not in response to a memory
shortage.

Signed-off-by: Nick Piggin <npiggin@suse.de>
Cc: Dave Airlie <airlied@linux.ie>
Cc: Jaroslav Kysela <perex@suse.cz>
Cc: Takashi Iwai <tiwai@suse.de>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-07 08:39:20 -08:00
Andrew Morton a1e85378ba [PATCH] drm-sis linkage fix
Fix http://bugzilla.kernel.org/show_bug.cgi?id=7606

WARNING: "drm_sman_set_manager" [drivers/char/drm/sis.ko] undefined!

Cc: <daniel-silveira@gee.inatel.br>
Cc: Dave Airlie <airlied@linux.ie>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-07 08:39:20 -08:00
Andrew Morton d942625c2d Fix http://bugzilla.kernel.org/show_bug.cgi?id=7606
WARNING: "drm_sman_set_manager" [drivers/char/drm/sis.ko] undefined!

Cc: <daniel-silveira@gee.inatel.br>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-12-07 16:11:44 +11:00
George Sapountzis 3417f33e76 drm: add flag for mapping PCI DMA buffers read-only.
Add DRM_PCI_BUFFER_RO flag for mapping PCI DMA buffer read-only. An additional
flag is needed, since PCI DMA buffers do not have an associated map.

Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-12-07 15:53:31 +11:00
Dave Airlie 5c2df2bfb1 drm: fix up irqflags in drm_lock.c
Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-12-07 15:53:31 +11:00
=?utf-8?q?Michel_D=C3=A4nzer?= 2228ed6722 drm: i915 updates
Add support for DRM_VBLANK_NEXTONMISS.
Bump minor for swap scheduling ioctl and secondary vblank support.
Avoid mis-counting vblank interrupts when they're only enabled for pipe A.
Only schedule vblank tasklet if there are scheduled swaps pending.

Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-12-07 15:53:31 +11:00
=?utf-8?q?Michel_D=C3=A4nzer?= a0b136bb69 drm: i915: fix up irqflags arg
Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-12-07 15:53:30 +11:00
=?utf-8?q?Michel_D=C3=A4nzer?= 21fa60ed4e drm: i915: Only return EBUSY after we've established we need to schedule a new swap.
Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-12-07 15:53:30 +11:00
=?utf-8?q?Michel_D=C3=A4nzer?= 2dbb232c4d drm: i915: Fix 'sequence has passed' condition in i915_vblank_swap().
Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-12-07 15:53:30 +11:00
=?utf-8?q?Michel_D=C3=A4nzer?= 376642cf2e drm: i915: Add SAREA fileds for determining which pipe to sync window buffer swaps to.
Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-12-07 15:53:30 +11:00
=?utf-8?q?Michel_D=C3=A4nzer?= 5b51694aff drm: Make handling of dev_priv->vblank_pipe more robust.
Initialize it to default value if it hasn't been set by the X server yet.

In i915_vblank_pipe_set(), only update dev_priv->vblank_pipe and call
i915_enable_interrupt() if the argument passed from userspace is valid to avoid
corrupting dev_priv->vblank_pipe on invalid arguments.

Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-12-07 15:53:30 +11:00
=?utf-8?q?Michel_D=C3=A4nzer?= 541f29aad7 drm: DRM_I915_VBLANK_SWAP ioctl: Take drm_vblank_seq_type_t instead
of pipe number.

Handle relative as well as absolute target sequence numbers.

Return error if target sequence has already passed, so userspace can deal with
this situation as it sees fit.

On success, return the sequence number of the vertical blank when the buffer
swap is expected to take place.

Also add DRM_IOCTL_I915_VBLANK_SWAP definition for userspace code that may want
to use ioctl() instead of drmCommandWriteRead().

Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-12-07 15:53:30 +11:00
=?utf-8?q?Michel_D=C3=A4nzer?= a6b54f3f50 drm: i915: Add ioctl for scheduling buffer swaps at vertical blanks.
This uses the core facility to schedule a driver callback that will be called
ASAP after the given vertical blank interrupt with the HW lock held.

Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-12-07 15:53:29 +11:00
=?utf-8?q?Michel_D=C3=A4nzer?= 049b323321 drm: Core vsync: Don't clobber target sequence number when scheduling signal.
It looks like this would have caused signals to always get sent on the next
vertical blank, regardless of the sequence number.

Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-12-07 15:53:29 +11:00
=?utf-8?q?Michel_D=C3=A4nzer?= ab285d74e6 drm: Core vsync: Add flag DRM_VBLANK_NEXTONMISS.
When this flag is set and the target sequence is missed, wait for the next
vertical blank instead of returning immediately.

Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-12-07 15:53:29 +11:00
=?utf-8?q?Michel_D=C3=A4nzer?= 8163e418f7 drm: Make locked tasklet handling more robust.
Initialize the spinlock unconditionally when struct drm_device is filled in,
and return early in drm_locked_tasklet() if the driver doesn't support IRQs.

Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-12-07 15:53:29 +11:00
=?utf-8?q?Felix_K=C3=BChling?= 507c0185a7 drm: drm_rmdraw: Declare id and idx as signed so testing for < 0 works as intended.
Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-12-07 15:53:29 +11:00
=?utf-8?q?Michel_D=C3=A4nzer?= cdec2f82b1 drm: Change first valid DRM drawable ID to be 1 instead of 0.
This makes it easier for userspace to know when it needs to allocate an ID.

Also free drawable information memory when it's no longer needed.

Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-12-07 15:53:29 +11:00
=?utf-8?q?Michel_D=C3=A4nzer?= b03ed6f2fc drm: drawable locking + memory management fixes + copyright
Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-12-07 15:53:29 +11:00
=?utf-8?q?Michel_D=C3=A4nzer?= 2e54a00762 drm: Add support for interrupt triggered driver callback with lock held to DRM core.
Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-12-07 15:53:28 +11:00
=?utf-8?q?Michel_D=C3=A4nzer?= bea5679f9c drm: Add support for tracking drawable information to core
Actually make the existing ioctls for adding and removing drawables do
something useful, and add another ioctl for the X server to update drawable
information. The only kind of drawable information tracked so far is cliprects.

Only reallocate cliprect memory if the number of cliprects changes.
Also improve diagnostic output.

hook up drm ioctl update draw
export drm_get_drawable_info symbol

Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-12-07 15:53:28 +11:00
=?utf-8?q?Michel_D=C3=A4nzer?= 68815bad72 drm: add support for secondary vertical blank interrupt to i915
When the vertical blank interrupt is enabled for both pipes, pipe A is
considered primary and pipe B secondary. When it's only enabled for one pipe,
it's always considered primary for backwards compatibility.

Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-12-07 15:53:28 +11:00
=?utf-8?q?Michel_D=C3=A4nzer?= 776c9443e2 drm: add support for secondary vertical blank interrupt to DRM core
Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-12-07 15:53:28 +11:00
Al Viro 3e577a80ea [PATCH] drivers/{char|isdn}: work_struct-induced breakage
part 1 of fsck-knows-how-many

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-06 11:09:08 -08:00
David Howells 4796b71fbb Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts:

	drivers/pcmcia/ds.c

Fix up merge failures with Linus's head and fix new compile failures.

Signed-Off-By: David Howells <dhowells@redhat.com>
2006-12-06 15:01:18 +00:00
David Howells 9db7372445 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts:

	drivers/ata/libata-scsi.c
	include/linux/libata.h

Futher merge of Linus's head and compilation fixups.

Signed-Off-By: David Howells <dhowells@redhat.com>
2006-12-05 17:01:28 +00:00
David Howells 4c1ac1b491 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts:

	drivers/infiniband/core/iwcm.c
	drivers/net/chelsio/cxgb2.c
	drivers/net/wireless/bcm43xx/bcm43xx_main.c
	drivers/net/wireless/prism54/islpci_eth.c
	drivers/usb/core/hub.h
	drivers/usb/input/hid-core.c
	net/core/netpoll.c

Fix up merge failures with Linus's head and fix new compilation failures.

Signed-Off-By: David Howells <dhowells@redhat.com>
2006-12-05 14:37:56 +00:00
Dominik Brodowski af2b3b503a [PATCH] pcmcia: conf.ConfigBase and conf.Present consolidation
struct pcmcia_device *p_dev->conf.ConfigBase and .Present are set in almost
all PCMICA driver right at the beginning, using the same calls but slightly
different implementations. Unfiy this in the PCMCIA core.

Includes a small bugfix ("drivers/net/pcmcia/xirc2ps_cs.c: remove unused
label") from and Signed-off-by Adrian Bunk <bunk@stusta.de>

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2006-12-04 20:12:02 -05:00
Akinobu Mita 5eb5fc97d8 [PATCH] cm4000_cs: fix return value check
The return value of class_create() need to be checked with IS_ERR().
And register_chrdev() returns errno on failure.
This patch includes these fixes for cm4000_cs and cm4040_cs.

Signed-off-by: Akinbou Mita <akinobu.mita@gmail.com>
Signed-off-by: Harald Welte <laforge@gnumonks.org>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2006-12-04 20:09:13 -05:00
Linus Torvalds 9b8ab9f6c3 Merge branch 'for-linus4' of master.kernel.org:/pub/scm/linux/kernel/git/viro/bird
* 'for-linus4' of master.kernel.org:/pub/scm/linux/kernel/git/viro/bird:
  [PATCH] severing poll.h -> mm.h
  [PATCH] severing skbuff.h -> mm.h
  [PATCH] severing skbuff.h -> poll.h
  [PATCH] severing skbuff.h -> highmem.h
  [PATCH] severing uaccess.h -> sched.h
  [PATCH] severing fs.h, radix-tree.h -> sched.h
  [PATCH] severing module.h->sched.h
2006-12-04 10:37:06 -08:00
Al Viro f23f6e08c4 [PATCH] severing poll.h -> mm.h
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2006-12-04 02:00:36 -05:00
Al Viro 914e26379d [PATCH] severing fs.h, radix-tree.h -> sched.h
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2006-12-04 02:00:24 -05:00
Jeff Garzik d916faace3 Remove long-unmaintained ftape driver subsystem.
It's bitrotten, long unmaintained, long hidden under BROKEN_ON_SMP,
etc.  As scheduled in feature-removal-schedule.txt, and ack'd several
times on lkml.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-03 22:22:41 -05:00
Al Viro b09b845ca6 [RANDOM]: Annotate random.h IP helpers.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-12-02 21:22:51 -08:00
Linus Torvalds b6ef977b60 Merge master.kernel.org:/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog
* master.kernel.org:/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog:
  [WATCHDOG] MIPS RM9000 on-chip watchdog device - patch 4
  [WATCHDOG] MIPS RM9000 on-chip watchdog device - patch 3
  [WATCHDOG] MIPS RM9000 on-chip watchdog device - patch 2
  [WATCHDOG] MIPS RM9000 on-chip watchdog device - patch 1
  [WATCHDOG] MIPS RM9000 on-chip watchdog device
  [WATCHDOG] Add iTCO vendor specific support
  [WATCHDOG] sc1200wdt.c pnp unregister fix.
  [WATCHDOG] config.h removal
  [WATCHDOG] NS pc87413-wdt Watchdog driver - fixes
  [WATCHDOG] NS pc87413-wdt Watchdog driver v1.1
  [WATCHDOG] NS pc87413-wdt Watchdog driver
2006-12-01 16:47:26 -08:00
Linus Torvalds 9641219825 Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6: (103 commits)
  usbcore: remove unused argument in autosuspend
  USB: keep count of unsuspended children
  USB hub: simplify remote-wakeup handling
  USB: struct usb_device: change flag to bitflag
  OHCI: make autostop conditional on CONFIG_PM
  USB: Add autosuspend support to the hub driver
  EHCI: Fix root-hub and port suspend/resume problems
  USB: create a new thread for every USB device found during the probe sequence
  USB: add driver for the USB debug devices
  USB: added dynamic major number for USB endpoints
  USB: pegasus error path not resetting task's state
  USB: endianness fix for asix.c
  USB: build the appledisplay driver
  USB serial: replace kmalloc+memset with kzalloc
  USB: hid-core: canonical defines for Apple USB device IDs
  USB: idmouse cleanup
  USB: make drivers/usb/core/driver.c:usb_device_match() static
  USB: lh7a40x_udc remove double declaration
  USB: pxa2xx_udc recognizes ixp425 rev b0 chip
  usbtouchscreen: add support for DMC TSC-10/25 devices
  ...
2006-12-01 16:41:58 -08:00
Linus Torvalds 4549df891a Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6: (36 commits)
  Driver core: show drivers in /sys/module/
  Documentation/driver-model/platform.txt update/rewrite
  Driver core: platform_driver_probe(), can save codespace
  driver core: Use klist_remove() in device_move()
  driver core: Introduce device_move(): move a device to a new parent.
  Driver core: make drivers/base/core.c:setup_parent() static
  driver core: Introduce device_find_child().
  sysfs: sysfs_write_file() writes zero terminated data
  cpu topology: consider sysfs_create_group return value
  Driver core: Call platform_notify_remove later
  ACPI: Change ACPI to use dev_archdata instead of firmware_data
  Driver core: add dev_archdata to struct device
  Driver core: convert sound core to use struct device
  Driver core: change mem class_devices to be real devices
  Driver core: convert fb code to use struct device
  Driver core: convert firmware code to use struct device
  Driver core: convert mmc code to use struct device
  Driver core: convert ppdev code to use struct device
  Driver core: convert PPP code to use struct device
  Driver core: convert cpuid code to use struct device
  ...
2006-12-01 16:41:07 -08:00
Greg Kroah-Hartman ebf644c462 Driver core: change mem class_devices to be real devices
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01 14:52:00 -08:00
Greg Kroah-Hartman 04880edae5 Driver core: convert ppdev code to use struct device
Converts from using struct "class_device" to "struct device" making
everything show up properly in /sys/devices/ with symlinks from the
/sys/class directory.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01 14:52:00 -08:00
Greg Kroah-Hartman 38ca6c34d3 Driver core: convert raw device code to use struct device
Converts from using struct "class_device" to "struct device" making
everything show up properly in /sys/devices/ with symlinks from the
/sys/class directory.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01 14:51:59 -08:00
Greg Kroah-Hartman 01107d3430 Driver core: convert tty core to use struct device
Converts from using struct "class_device" to "struct device" making
everything show up properly in /sys/devices/ with symlinks from the
/sys/class directory.

Also fixes up the isdn drivers that were putting something in the class
device's directory.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01 14:51:59 -08:00
Greg Kroah-Hartman 94fbcded4e Driver core: change misc class_devices to be real devices
This also ment that some of the misc drivers had to also be fixed
up as they were assuming the device was a class_device.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01 14:51:59 -08:00
Greg Kroah-Hartman cd15422b9f Driver core: convert vc code to use struct device
Converts from using struct "class_device" to "struct device" making
everything show up properly in /sys/devices/ with symlinks from the
/sys/class directory.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01 14:51:59 -08:00
Greg Kroah-Hartman 805952a889 Driver core: convert vt code to use struct device
Converts from using struct "class_device" to "struct device" making
everything show up properly in /sys/devices/ with symlinks from the
/sys/class directory.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01 14:51:59 -08:00
Mariusz Kozlowski 6265d62f31 usb: pcwd_usb free urb cleanup
- usb_free_urb() cleanup

Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01 14:23:32 -08:00
Andrew Victor 55d8baee4a [ARM] 3954/1: AT91: Update drivers for new headers
This patch updates the drivers (and other files) which include the
hardware headers.  This fixes the breakage introduced in patches 3950/1
and 3951/1 (those patches were getting big).

The AVR32 architecture uses the same serial driver and had its own copy
of at91rm9200_pdc.h.  Renamed it to at91_pdc.h

Signed-off-by: Andrew Victor <andrew@sanpeople.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-11-30 22:51:40 +00:00
Wim Van Sebroeck bdbf77d670 Merge ../linux-2.6-watchdog-mm 2006-11-30 20:22:09 +01:00
Matt LaPlante 0779bf2d2e Fix misc .c/.h comment typos
Fix various .c/.h typos in comments (no code changes).

Signed-off-by: Matt LaPlante <kernel1@cyberdogtech.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-11-30 05:24:39 +01:00
Matt LaPlante 3cb2fccc5f Fix misc Kconfig typos
Fix various Kconfig typos.

Signed-off-by: Matt LaPlante <kernel1@cyberdogtech.com>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-11-30 05:22:59 +01:00
Akinobu Mita 5e66b0b5f1 [PATCH] tlclk: fix platform_device_register_simple() error check
The return value of platform_device_register_simple() should be checked by
IS_ERR().

This patch also fix misc_register() error case.  Because misc_register()
returns error code.

Cc: Sebastien Bouchard <sebastien.bouchard@ca.kontron.com>
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-11-25 13:28:34 -08:00
Linus Torvalds 66c669baa7 [AGP] Allocate AGP pages with GFP_DMA32 by default
Not all graphic page remappers support physical addresses over the 4GB
mark for remapping, so while some do (the AMD64 GART always did, and I
just fixed the i965 to do so properly), we're safest off just forcing
GFP_DMA32 allocations to make sure graphics pages get allocated in the
low 32-bit address space by default.

AGP sub-drivers that really care, and can do better, could just choose
to implement their own allocator (or we could add another "64-bit safe"
default allocator for their use), but quite frankly, you're not likely
to care in practice.

So for now, this trivial change means that we won't be allocating pages
that we can't map correctly by mistake on x86-64.

[ On traditional 32-bit x86, this could never happen, because GFP_KERNEL
  would never allocate any highmem memory anyway ]

Acked-by: Andi Kleen <ak@suse.de>
Acked-by: Dave Jones <davej@redhat.com>
Cc: Eric Anholt <eric@anholt.net>
Cc: Keith Packard <keithp@keithp.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-11-22 14:55:29 -08:00
Linus Torvalds 7d915a3898 [AGP] Fix intel 965 AGP memory mapping function
This introduces a i965-specific "mask_memory()" function that knows
about the extended physical addresses that the i965 supports.  This
allows us to correctly map in physical memory in the >4GB range into the
GTT.

Also simplify/clean-up the i965 case for the aperture sizing by just
returning the fixed 512kB size from "fetch_size()".  We don't really
care that not all of the aperture may be visible - the only thing that
cares about the aperture size is the Intel "stolen memory" calculation,
which depends on the fixed size.

Cc: Keith Packard <keithp@keithp.com>
Cc: Eric Anholt <eric@anholt.net>
Cc: Dave Jones <davej@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-11-22 09:37:54 -08:00
David Howells c4028958b6 WorkStruct: make allyesconfig
Fix up for make allyesconfig.

Signed-Off-By: David Howells <dhowells@redhat.com>
2006-11-22 14:57:56 +00:00
David Howells 65f27f3844 WorkStruct: Pass the work_struct pointer instead of context data
Pass the work_struct pointer to the work function rather than context data.
The work function can use container_of() to work out the data.

For the cases where the container of the work_struct may go away the moment the
pending bit is cleared, it is made possible to defer the release of the
structure by deferring the clearing of the pending bit.

To make this work, an extra flag is introduced into the management side of the
work_struct.  This governs auto-release of the structure upon execution.

Ordinarily, the work queue executor would release the work_struct for further
scheduling or deallocation by clearing the pending bit prior to jumping to the
work function.  This means that, unless the driver makes some guarantee itself
that the work_struct won't go away, the work function may not access anything
else in the work_struct or its container lest they be deallocated..  This is a
problem if the auxiliary data is taken away (as done by the last patch).

However, if the pending bit is *not* cleared before jumping to the work
function, then the work function *may* access the work_struct and its container
with no problems.  But then the work function must itself release the
work_struct by calling work_release().

In most cases, automatic release is fine, so this is the default.  Special
initiators exist for the non-auto-release case (ending in _NAR).


Signed-Off-By: David Howells <dhowells@redhat.com>
2006-11-22 14:55:48 +00:00
David Howells 52bad64d95 WorkStruct: Separate delayable and non-delayable events.
Separate delayable work items from non-delayable work items be splitting them
into a separate structure (delayed_work), which incorporates a work_struct and
the timer_list removed from work_struct.

The work_struct struct is huge, and this limits it's usefulness.  On a 64-bit
architecture it's nearly 100 bytes in size.  This reduces that by half for the
non-delayable type of event.

Signed-Off-By: David Howells <dhowells@redhat.com>
2006-11-22 14:54:01 +00:00
Randy Dunlap f0c69c4ee7 [PATCH] ftape: fix printk format warnings
Fix printk format warnings:
drivers/char/ftape/zftape/zftape-buffers.c:87: warning: format '%d' expects type
'int', but argument 3 has type 'size_t'
drivers/char/ftape/zftape/zftape-buffers.c:104: warning: format '%d' expects type
 'int', but argument 3 has type 'size_t'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-11-20 09:42:05 -08:00
Wim Van Sebroeck d5d06ff7f1 [WATCHDOG] MIPS RM9000 on-chip watchdog device - patch 4
a number of small patches:
- include notifier.h include file
- re-arrange prototype functions
- remove =0 initializations
- change printk logging levels to what's used in other drivers
- /dev/watchdog is a VFS so use nonseekable_open
- Style: Instead of "if (constant op function_or_variable)"
  we prefer "if (function_or_variable op constant)"
- arg is a __user pointer
- use MAX_TIMEOUT_SECONDS instead of 32 in WDIOC_SETTIMEOUT

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2006-11-17 23:50:06 +01:00
Wim Van Sebroeck 414a675964 [WATCHDOG] MIPS RM9000 on-chip watchdog device - patch 3
Move start and stop code into seperate functions

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2006-11-17 23:36:08 +01:00
Wim Van Sebroeck 97846e3ccb [WATCHDOG] MIPS RM9000 on-chip watchdog device - patch 2
Reorganize source code so that it is structured as follows:
- Function prototypes
- Local variables
- Module arguments
- Interrupt handler
- Watchdog functions
- /dev/watchdog operations
- Shutdown notifier
- Kernel interfaces
- Init & exit procedures
- Device driver init & exit

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2006-11-17 23:15:48 +01:00
Wim Van Sebroeck cd57eeab7c [WATCHDOG] MIPS RM9000 on-chip watchdog device - patch 1
Locate parameter descriptions close to parameter definition -
not in bottom of file.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2006-11-17 21:51:35 +01:00
Thomas Koeller 825d3748c1 [WATCHDOG] MIPS RM9000 on-chip watchdog device
This is a driver for the on-chip watchdog device found on some
MIPS RM9000 processors.

Signed-off-by: Thomas Koeller <thomas.koeller@baslerweb.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2006-11-17 20:45:24 +01:00
Zhang, Yanmin b48f5457b4 [PATCH] ipmi: use platform_device_add() instead of platform_device_register() to register device allocated dynamically
I got below warning when running 2.6.19-rc5-mm1 on my ia64 machine.

WARNING at lib/kobject.c:172 kobject_init()

Call Trace:
 [<a0000001000137c0>] show_stack+0x40/0xa0
                                sp=e0000002ff9f7bc0 bsp=e0000002ff9f0d10
 [<a000000100013850>] dump_stack+0x30/0x60
                                sp=e0000002ff9f7d90 bsp=e0000002ff9f0cf8
 [<a000000100407bb0>] kobject_init+0x90/0x160
                                sp=e0000002ff9f7d90 bsp=e0000002ff9f0cd0
 [<a0000001005ae080>] device_initialize+0x40/0x1c0
                                sp=e0000002ff9f7da0 bsp=e0000002ff9f0cb0
 [<a0000001005b88c0>] platform_device_register+0x20/0x60
                                sp=e0000002ff9f7dd0 bsp=e0000002ff9f0c90
 [<a000000100592560>] try_smi_init+0xbc0/0x11e0
                                sp=e0000002ff9f7dd0 bsp=e0000002ff9f0c50
 [<a000000100594900>] init_ipmi_si+0xaa0/0x12e0
                                sp=e0000002ff9f7de0 bsp=e0000002ff9f0bd8
 [<a000000100009910>] init+0x350/0x780
                                sp=e0000002ff9f7e00 bsp=e0000002ff9f0ba8
 [<a000000100011d30>] kernel_thread_helper+0x30/0x60
                                sp=e0000002ff9f7e30 bsp=e0000002ff9f0b80
 [<a0000001000090c0>] start_kernel_thread+0x20/0x40
                                sp=e0000002ff9f7e30 bsp=e0000002ff9f0b80
WARNING at lib/kobject.c:172 kobject_init()

Call Trace:
 [<a0000001000137c0>] show_stack+0x40/0xa0
                                sp=e0000002ff9f7b40 bsp=e0000002ff9f0db0
 [<a000000100013850>] dump_stack+0x30/0x60
                                sp=e0000002ff9f7d10 bsp=e0000002ff9f0d98
 [<a000000100407bb0>] kobject_init+0x90/0x160
                                sp=e0000002ff9f7d10 bsp=e0000002ff9f0d70
 [<a0000001005ae080>] device_initialize+0x40/0x1c0
                                sp=e0000002ff9f7d20 bsp=e0000002ff9f0d50
 [<a0000001005b88c0>] platform_device_register+0x20/0x60
                                sp=e0000002ff9f7d50 bsp=e0000002ff9f0d30
 [<a00000010058ac00>] ipmi_register_smi+0xcc0/0x18e0
                                sp=e0000002ff9f7d50 bsp=e0000002ff9f0c90
 [<a000000100592600>] try_smi_init+0xc60/0x11e0
                                sp=e0000002ff9f7dd0 bsp=e0000002ff9f0c50
 [<a000000100594900>] init_ipmi_si+0xaa0/0x12e0
                                sp=e0000002ff9f7de0 bsp=e0000002ff9f0bd8
 [<a000000100009910>] init+0x350/0x780
                                sp=e0000002ff9f7e00 bsp=e0000002ff9f0ba8
 [<a000000100011d30>] kernel_thread_helper+0x30/0x60
                                sp=e0000002ff9f7e30 bsp=e0000002ff9f0b80
 [<a0000001000090c0>] start_kernel_thread+0x20/0x40
                                sp=e0000002ff9f7e30 bsp=e0000002ff9f0b80

The root cause is the device struct is initialized twice.

If the device is allocated dynamically by platform_device_alloc,
platform_device_alloc will initialize struct device, then,
platform_device_add should be used to register the device.

The difference between platform_device_register and platform_device_add is
platform_device_register will initiate the device while platform_device_add
won't.

Signed-off-by: Zhang Yanmin <yanmin.zhang@intel.com>
Cc: Corey Minyard <minyard@acm.org>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-11-16 11:43:37 -08:00
Jiri Slaby c387fd85f8 [PATCH] Char: isicom, fix close bug
port is dereferenced even if it is NULL.  Dereference it _after_ the
check if (!port)...  Thanks Eric <ef87@yahoo.com> for reporting this.

This fixes

	http://bugzilla.kernel.org/show_bug.cgi?id=7527

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-11-14 16:02:02 -08:00
Corey Minyard 7947d2cc2c [PATCH] IPMI: Fix more && typos
Fix improper use of "&&" when "&" was intended.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Corey Minyard <minyard@acm.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-11-13 07:40:42 -08:00
Jes Sorensen 1a4b0fc503 [PATCH] mspec driver build fix
Fix MSPEC driver to build for non SN2 enabled configs as the driver should
work in cached and uncached modes (no fetchop) on these systems.  In
addition make MSPEC select IA64_UNCACHED_ALLOCATOR, which is required for
it and move it to arch/ia64/Kconfig to avoid warnings on non ia64
architectures running allmodconfig.  Once the Kconfig code is fixed, we can
move it back.

Signed-off-by: Jes Sorensen <jes@sgi.com>
Cc: Fernando Luis Vzquez Cao <fernando@oss.ntt.co.jp>
Cc: "Luck, Tony" <tony.luck@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-11-13 07:40:42 -08:00
Wim Van Sebroeck e033351d53 [WATCHDOG] Add iTCO vendor specific support
Add vendor specific support to the intel TCO timer based watchdog
devices. At this moment we only have additional support for some
SuperMicro Inc. motherboards.

Signed-off-by: Robert Seretny <lkpatches@paypc.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2006-11-12 18:05:09 +01:00
Alexey Dobriyan 64d9fe6973 [PATCH] ipmi_si_intf.c: fix "&& 0xff" typos
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Acked-by: Corey Minyard <minyard@acm.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-11-08 18:29:24 -08:00
Corey Minyard 46d52b09fa [PATCH] IPMI: retry messages on certain error returns
Some more errors from the IPMI send message command are retryable, but are not
being retried by the IPMI code.  Make sure they get retried.

Signed-off-by: Corey Minyard <minyard@acm.org>
Cc: Frederic Lelievre <Frederic.Lelievre@ca.kontron.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-11-08 18:29:24 -08:00
Corey Minyard f3ce6a0ead [PATCH] IPMI: Clean up the waiting message queue properly on unload
A wrong function was being used to free a list; this fixes the problem.
Otherwise, an oops at unload time was possible.  But not likely, since you
can't have any users when you unload the modules and it is very hard to get
messages into this queue without users.

Signed-off-by: Corey Minyard <minyard@acm.org>
Cc: Patrick Schoeller <Patrick.Schoeller@hp.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-11-08 18:29:24 -08:00
Dmitry Torokhov 752c58a471 Merge rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 2006-11-04 22:42:39 -05:00
Brandon Philips e52b29c2a6 Input: drivers/char/keyboard.c - small cleanup in k_cur()
To save a char pointer in the final assembly change to alternate string
form.

Signed-off-by: Brandon Philips <brandon@ifup.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2006-11-04 22:09:08 -05:00
Yvan Seth d13adb6046 [PATCH] ipmi_si_intf.c sets bad class_mask with PCI_DEVICE_CLASS
Taken from http://bugzilla.kernel.org/show_bug.cgi?id=7439

It looks like device registration in drivers/char/ipmi/ipmi_si_intf.c was
cleaned up and a small error was made when setting the class_mask.  The fix
is simple as the correct mask value is defined in the code but is not used.

Acked-by: Corey Minyard <minyard@acm.org>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-11-03 12:27:57 -08:00
Dave Jones 28af24bb84 [AGPGART] Fix up misprogrammed bridges with incorrect AGPv2 rates.
Some dumb bridges are programmed to disobey the AGP2 spec.
This is likely a BIOS misprogramming rather than poweron default, or
it would be a lot more common.

AGPv2 spec 6.1.9 states:

 "The RATE field indicates the data transfer rates supported by this
  device. A.G.P. devices must report all that apply."

Fix them up as best we can.

This will prevent errors like..

agpgart: Found an AGP 3.5 compliant device at 0000:00:00.0.
agpgart: req mode 1f000201 bridge_agpstat 1f000a14 vga_agpstat 2f000217.
agpgart: Device is in legacy mode, falling back to 2.x
agpgart: Putting AGP V2 device at 0000:00:00.0 into 0x mode
agpgart: Putting AGP V2 device at 0000:01:00.0 into 0x mode
agpgart: Putting AGP V2 device at 0000:01:00.1 into 0x mode

https://bugs.freedesktop.org/show_bug.cgi?id=8816

Signed-off-by: Dave Jones <davej@redhat.com>
2006-11-03 15:13:27 -05:00
Akinobu Mita 150ed8ed63 [WATCHDOG] sc1200wdt.c pnp unregister fix.
If no devices found or invalid parameter is specified,
scl200wdt_pnp_driver is left unregistered.
It breaks global list of pnp drivers.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Signed-off-by: Andrew Morton <akpm@osdl.org>
2006-10-29 22:09:32 +01:00
Akinobu Mita 58c6570add [WATCHDOG] sc1200wdt.c pnp unregister fix.
If no devices found or invalid parameter is specified,
scl200wdt_pnp_driver is left unregistered.
It breaks global list of pnp drivers.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Signed-off-by: Andrew Morton <akpm@osdl.org>
2006-10-29 10:27:43 +01:00
Andrew Morton fd0c5eca44 [WATCHDOG] config.h removal
config.h got removed

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Signed-off-by: Andrew Morton <akpm@osdl.org>
2006-10-28 22:19:07 +02:00
Amol Lad 85abb3f950 drm: ioremap balanced with iounmap for drivers/char/drm
ioremap must be balanced by an iounmap and failing to do so can result
in a memory leak.

Tested (compilation only) to make sure the files are compiling without
any warning/error due to new changes

Signed-off-by: Amol Lad <amol@verismonetworks.com>
Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-10-25 09:55:34 -07:00
Jeff Garzik 24f73c92a9 drm: fix error returns, sysfs error handling
- callers of drm_sysfs_create() and drm_sysfs_device_add() looked for
  errors using IS_ERR(), but the functions themselves only ever returned
  NULL on error.  Fixed.

- unwind from, and propagate sysfs errors

Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-10-25 09:40:40 -07:00
Dave Jones 0d960d26c4 fix return code in error case.
The other failure returns in this function are negative, so make
this one do the same.

Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-10-25 09:40:40 -07:00
Tilman Sauerbeck 958de71b1a drm: mga: set dev_priv_size
fd.o bug 1746

Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-10-24 21:52:23 +10:00
Michael Karcher 10eee0fe91 drm: savage: dev->agp_buffer_map is not initialized for AGP DMA on savages
fd.o bug 8662

Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-10-24 21:46:55 +10:00
Roland Scheidegger a1aa289703 drm: radeon: only allow specific type-3 packetss through verifier
only allow specific type-3 packets to pass the verifier instead of all for r100/r200 as others might be unsafe (r300 already does this), and add checking for these we need but aren't safe. Check the RADEON_CP_INDX_BUFFER packet on both r200 and r300 as it isn't safe neither.

Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-10-24 21:45:00 +10:00
Linus Torvalds 6d03a68e6d Merge git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog
* git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog: (33 commits)
  [WATCHDOG] remove experimental on iTCO_wdt.c
  [WATCHDOG] Atmel AT91RM9200 rename.
  [WATCHDOG] includes for sample watchdog program.
  [WATCHDOG] watchdog/iTCO_wdt: fix bug related to gcc uninit warning
  [WATCHDOG] add ich8 support to iTCO_wdt.c (patch 2)
  [WATCHDOG] add ich8 support to iTCO_wdt.c
  [WATCHDOG] ioremap balanced with iounmap for drivers/char/watchdog/s3c2410_wdt.c
  [WATCHDOG] w83697hf/hg WDT driver - Kconfig patch
  [WATCHDOG] w83697hf/hg WDT driver - autodetect patch
  [WATCHDOG] w83697hf/hg WDT driver - patch 16
  [WATCHDOG] w83697hf/hg WDT driver - patch 15
  [WATCHDOG] w83697hf/hg WDT driver - patch 14
  [WATCHDOG] w83697hf/hg WDT driver - patch 13
  [WATCHDOG] w83697hf/hg WDT driver - patch 12
  [WATCHDOG] w83697hf/hg WDT driver - patch 11
  [WATCHDOG] w83697hf/hg WDT driver - patch 10
  [WATCHDOG] w83697hf/hg WDT driver - patch 9
  [WATCHDOG] w83697hf/hg WDT driver - patch 8
  [WATCHDOG] w83697hf/hg WDT driver - patch 7
  [WATCHDOG] w83697hf/hg WDT driver - patch 6
  ...
2006-10-23 15:56:26 -07:00
Wim Van Sebroeck 0835caa2bf [WATCHDOG] NS pc87413-wdt Watchdog driver - fixes
Some small fixes:
* the status should return 0 and not 1 (1 means:
* wdt_io is not a module-param, io is.

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2006-10-23 18:21:52 +02:00
Sven Anders & Marcus Junker 00b3b3e660 [WATCHDOG] NS pc87413-wdt Watchdog driver v1.1
Change the driver for proper spin_locking,
remove the TEMP_MINOR stuff,
make sure the device works as a Virtual File System
that is non_seekable,
...

Signed-off-by: Sven Anders <anders@anduras.de>
Signed-off-by: Marcus Junker <junker@anduras.de>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2006-10-23 09:35:53 +02:00
Linus Torvalds 946b92437e Merge master.kernel.org:/pub/scm/linux/kernel/git/davej/agpgart
* master.kernel.org:/pub/scm/linux/kernel/git/davej/agpgart:
  [AGPGART] uninorth: Add module param 'aperture' for aperture size
2006-10-21 13:39:44 -07:00
Jiri Slaby 86fbf1486a [PATCH] Char: correct pci_get_device changes
Commits 881a8c120a and
efe1ec2783 corrects pci device matching in
only one way; it no longer oopses/crashes, despite hotplug is not solved
in these changes.

Whenever pci_find_device -> pci_get_device change is performed, also
pci_dev_get and pci_dev_put should be in most cases called to properly
handle hotplug.  This patch does exactly this thing -- increase refcount
to let kernel know, that we are using this piece of HW just now.

It affects moxa and rio char drivers.

Cc: <R.E.Wolff@BitWizard.nl>
Acked-by: Amit Gud <gud@eth.net>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Acked-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-21 13:35:05 -07:00
Dave Jones 1cd441f998 [PATCH] ipmi: fix return codes in failure case
These returns should be negative, like the others in this function.

Signed-off-by: Dave Jones <davej@redhat.com>
Acked-by: Corey Minyard <minyard@acm.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-20 10:26:44 -07:00
Ben Collins 5cacb9f8bc [alim7101] Add pci dev table for auto module loading.
Also fixes comment for nowayout module param.

Signed-off-by: Ben Collins <bcollins@ubuntu.com>
2006-10-18 08:24:30 -04:00
Linus Torvalds 43f82216f0 Merge git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
* git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: fm801-gp - handle errors from pci_enable_device()
  Input: gameport core - handle errors returned by device_bind_driver()
  Input: serio core - handle errors returned by device_bind_driver()
  Lockdep: fix compile error in drivers/input/serio/serio.c
  Input: serio - add lockdep annotations
  Lockdep: add lockdep_set_class_and_subclass() and lockdep_set_subclass()
  Input: atkbd - supress "too many keys" error message
  Input: i8042 - supress ACK/NAKs when blinking during panic
  Input: add missing exports to fix modular build
2006-10-17 08:56:43 -07:00
Akinobu Mita dabad0568a [PATCH] epca: prevent panic on tty_register_driver() failure
Make epca fail on initialization failure instead of panic.

Cc: "Digi International, Inc" <Eng.Linux@digi.com>
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Acked-by: Alan Cox <alan@redhat.com>
Acked-by: Scott Kilau <scottk@digi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-17 08:18:48 -07:00
Alexey Dobriyan 48d1a7ea63 [PATCH] sx: fix user-visible typo (devic)
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-17 08:18:45 -07:00
Adrian Bunk a4bb2cf1c3 [PATCH] drivers/char/specialix.c: fix the baud conversion
Correct the following bugs introduced by commit
67cc0161ecc9ebee6eba4af6cbfdba028090b1b9:

- remove one remaining and now incorrect baud_table[] usage
- "baud +=" is no longer correct

The former bug was spotted by the Coverity checker.

Rolf Eike Beer spotted a bug in the initial version of my patch.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-17 08:18:44 -07:00
Paul Fulghum 623a43952a [PATCH] synclink: remove PAGE_SIZE reference
Remove reference to PAGE_SIZE that causes errors if PAGE_SIZE != 4096

Signed-off-by: Paul Fulghum <paulkf@microgate.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-17 08:18:42 -07:00
Geert Uytterhoeven 4d99bfac9d [PATCH] CONFIG_TELCLOCK depends on X86
The telecom clock driver for MPBL0010 ATCA SBC depends on X86

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Mark Gross <mark.gross@intel.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-16 12:19:03 -07:00
Alan Cox 9d90dafdb1 [PATCH] rio: fix array checking
Found by an analysis tool and reported to the list. Fix is simple enough

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-16 08:27:54 -07:00
Michel Dnzer 18088748d2 [AGPGART] uninorth: Add module param 'aperture' for aperture size
In contrast to most if not all PC BIOSes, OpenFirmware (OF) on PowerMacs with
UniNorth bridges does not allow changing the aperture size. The size set up by
OF is usually 16 MB, which is too low for graphics intensive environments.
Hence, add a module parameter that allows changing the aperture size at driver
initialization time. When the parameter is not specified, the default is 32 MB.

Signed-off-by: Michel Dänzer <michel@tungstengraphics.com>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Dave Jones <davej@redhat.com>
2006-10-15 19:49:59 -04:00
Sven Anders & Marcus Junker 789fc0adba [WATCHDOG] NS pc87413-wdt Watchdog driver
New watchdog driver for the NS pc87413-wdt Watchdog Timer.
 
Signed-off-by: Sven Anders <anders@anduras.de>
Signed-off-by: Marcus Junker <junker@anduras.de>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2006-10-15 20:04:59 +02:00
Al Viro e5a301ee02 [PATCH] serial167 __user annotations, NULL noise removal
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-15 11:00:58 -07:00
Wim Van Sebroeck cbf40d3f04 [WATCHDOG] remove experimental on iTCO_wdt.c
The iTCO_wdt.c driver has been tested enough. So we can
remove the experimental classification.

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2006-10-14 20:18:47 +02:00
Andrew Victor bdcff3458f [WATCHDOG] Atmel AT91RM9200 rename.
The new Atmel AT91SAM9261 and AT91SAM9260 processors use a different
internal watchdog peripheral.  This watchdog driver is therefore
AT91RM9200-specific.

This patch renames at91_wdt.c to at91rm9200_wdt.c, and changes the name
of the configuration option.

Signed-off-by: Andrew Victor <andrew@sanpeople.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2006-10-13 23:10:39 +02:00
Linus Torvalds b8a3ad5b53 Include proper header file for PFN_DOWN()
The recent commit (99a10a60ba) to fix up
mmap_kmem() broke compiles because it used PFN_DOWN() without including
<linux/pfn.h>.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-13 08:42:10 -07:00
Franck Bui-Huu 99a10a60ba [PATCH] Fix up mmap_kmem
vma->vm_pgoff is an pfn _offset_ relatif to the begining
of the memory start. The previous code was doing at first:

	vma->vm_pgoff << PAGE_SHIFT

which results into a wrong physical address since some
platforms have a physical mem start that can be different
from 0. After that the previous call __pa() on this
wrong physical address, however __pa() is used to convert
a _virtual_ address into a physical one.

This patch rewrites this convertion. It calculates the
pfn of PAGE_OFFSET which is the pfn of the mem start
then it adds the vma->vm_pgoff to it.

It also uses virt_to_phys() instead of __pa() since the
latter shouldn't be used by drivers.

Signed-off-by: Franck Bui-Huu <fbuihuu@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-13 08:35:38 -07:00
Jeff Garzik 80060362aa [WATCHDOG] watchdog/iTCO_wdt: fix bug related to gcc uninit warning
gcc emits the following warning:

drivers/char/watchdog/iTCO_wdt.c: In function ‘iTCO_wdt_ioctl’:
drivers/char/watchdog/iTCO_wdt.c:429: warning: ‘time_left’ may be used uninitialized in this function

This indicates a condition near enough to a bug, to want to fix.
iTCO_wdt_get_timeleft() stores a value in 'time_left' iff
iTCO_version==(1 or 2).  This driver only supports versions
1 or 2, so this is ok.  However, since (a) the return value of
iTCO_wdt_get_timeleft() is handled anyway, (b) it fixes the warning,
and (c) it future-proofs the driver, we go ahead and add the obvious
return value.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Signed-off-by: Andrew Morton <akpm@osdl.org>
2006-10-11 23:12:31 +02:00
Al Viro f061c5847b [PATCH] i2Output always takes kernel data now
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-11 11:17:07 -07:00
Jeff Garzik 5e59393ec2 [PATCH] ipmi: handle sysfs errors
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Acked-by: Corey Minyard <cminyard@acm.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-11 11:14:25 -07:00
Jeff Garzik f33d9bd504 [PATCH] tpm: fix error handling
- handle sysfs error
- handle driver model errors
- de-obfuscate platform_device_register_simple() call, which included an
  assignment in between two function calls, in the same C statement.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
Acked-by: Kylene Hall <kjhall@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-11 11:14:22 -07:00
Dmitry Torokhov 80fc9f532d Input: add missing exports to fix modular build
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2006-10-11 01:43:58 -04:00
Al Viro 29756fa328 [PATCH] trivial iomem annotations: istallion
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-10 15:37:22 -07:00
Ralf Baechle 12a0a703b3 [RTC] Consistently use of tabs for formatting. 2006-10-09 23:20:47 +01:00
Ralf Baechle 18965513fd [MIPS] qtronix: remove driver.
Another leftover of removing support for the ITE8172.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2006-10-09 23:20:46 +01:00
Geert Uytterhoeven 81e859ac1e [PATCH] m68k/MVME167: SERIAL167 tty flip buffer updates
Compile fixes related to changed tty flip buffer handling.

Signed-off-by: Kars de Jong <jongk@linux-m68k.org>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-09 14:54:46 -07:00
Geert Uytterhoeven ea62aa1b6f [PATCH] m68k/MVME167: SERIAL167 is no longer broken
- SERIAL167 is no longer broken
- Removed some unused variables from the driver to fix compiler warnings

Signed-off-by: Kars de Jong <jongk@linux-m68k.org>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-09 14:54:46 -07:00
Linus Torvalds 5a43c09d1b Merge branch 'irqclean-submit1' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/misc-2.6
* 'irqclean-submit1' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/misc-2.6:
  drivers/isdn/act2000: kill irq2card_map
  drivers/net/eepro: kill dead code
  Various drivers' irq handlers: kill dead code, needless casts
  drivers/net: eliminate irq handler impossible checks, needless casts
  arch/i386/kernel/time: don't shadow 'irq' function arg
2006-10-09 14:21:45 -07:00
Wim Van Sebroeck a8edd74e44 [WATCHDOG] add ich8 support to iTCO_wdt.c (patch 2)
Add ICH8 support to the iTCO_wdt driver.

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2006-10-08 21:05:21 +02:00
Arnaud Patard (Rtp) bcbf25bd0d [WATCHDOG] add ich8 support to iTCO_wdt.c
Add ICH8 support to the iTCO_wdt driver.

Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2006-10-08 20:44:04 +02:00
Amol Lad e34477e990 [WATCHDOG] ioremap balanced with iounmap for drivers/char/watchdog/s3c2410_wdt.c
ioremap must be balanced by an iounmap and failing to do so can result
in a memory leak.

Signed-off-by: Amol Lad <amol@verismonetworks.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Signed-off-by: Andrew Morton <akpm@osdl.org>
2006-10-07 22:43:56 +02:00
Linus Torvalds ba00003aa8 Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc:
  [POWERPC] PReP fixup after irq changes
  [POWERPC] SPU fixup after irq changes
  [POWERPC] Fix up after irq changes
  [POWERPC] Fix iseries/smp.c for irq breakage
  [POWERPC] Fix viocons for irq breakage
  [POWERPC] Update iseries_defconfig
  [POWERPC] Fix fsl_soc build breaks
  [POWERPC] Minor fix for bootargs property
  [POWERPC] Update MTFSF_L() comment
  [POWERPC] Update pSeries defconfig for SATA
  [POWERPC] Don't get PCI IRQ from OF for devices with no IRQ
  [POWERPC] Fix zImage decompress location
  [POWERPC] linux,tce-size property is 32 bits
  [POWERPC] Add DTS for MPC8349E-mITX board
  [POWERPC] Fix harmless typo
  [PPC] Fix some irq breakage with ARCH=ppc
2006-10-07 10:52:00 -07:00
Al Viro 2850bc2737 [PATCH] m68k pt_regs fixes
m68k_handle_int() split in two functions: __m68k_handle_int() takes
pt_regs * and does set_irq_regs(); m68k_handle_int() doesn't get pt_regs
*.

Places where we used to call m68k_handle_int() recursively with the same
pt_regs have simply lost the second argument, the rest is switched to
__m68k_handle_int().

The rest of patch is just dropping pt_regs * where needed.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-07 10:51:14 -07:00
Stephen Rothwell 27db2d0cb9 [POWERPC] Fix viocons for irq breakage
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-10-07 10:10:27 +10:00
Jeff Garzik 5d347c8aba Merge branch 'submit1' of viper:/spare/repo/irq-remove-2.6 into irqcleanups 2006-10-06 15:27:31 -04:00
Jeff Garzik c7bec5aba5 Various drivers' irq handlers: kill dead code, needless casts
- Eliminate casts to/from void*

- Eliminate checks for conditions that never occur.  These typically
  fall into two classes:

	1) Checking for 'dev_id == NULL', then it is never called with
	NULL as an argument.

	2) Checking for invalid irq number, when the only caller (the
	system) guarantees the irq handler is called with the proper
	'irq' number argument.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-10-06 15:00:58 -04:00
Heiko Carstens 2033b0c330 [PATCH] sysrq: irq change build fix.
drivers/char/sysrq.c: In function `sysrq_handle_crashdump':
drivers/char/sysrq.c:98: warning: implicit declaration of function `get_irq_regs'

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2006-10-06 16:38:42 +02:00