summaryrefslogtreecommitdiffstats
path: root/drivers
Commit message (Collapse)AuthorAgeFilesLines
* ISDN: Spinlock initializer cleanupThomas Gleixner2007-05-082-2/+2
| | | | | | | Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Karsten Keil <kkeil@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* use mutex instead of semaphore in CAPI 2.0 interfaceMatthias Kaehlcke2007-05-081-16/+17
| | | | | | | | | | The CAPI 2.0 interface uses a semaphore as mutex. Use the mutex API instead of the (binary) semaphore. Signed-off-by: Matthias Kaehlcke <matthias.kaehlcke@gmail.com> Cc: Karsten Keil <kkeil@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* fix spinlock usage in hysdn_log_close()Matthias Kaehlcke2007-05-081-4/+0Star
| | | | | | | | | | | | Fix incorrect spinlock use in hysdn_log_close(). The function declared a spinlock on the stack and used it to 'protect' a shared driver structure. The patch simply removes the useless code. Signed-off-by: Matthias Kaehlcke <matthias.kaehlcke@gmail.com> Cc: Karsten Keil <kkeil@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* drivers/isdn/hardware/eicon/: remove unused header filesArmin Schindler2007-05-082-248/+0Star
| | | | | | | | | | As pointed out by Robert P. J. Day, here is a patch to remove unused header files from Eicon/Dialogic ISDN driver. Signed-off-by: Armin Schindler <armin@melware.de> Acked-by: Karsten Keil <kkeil@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* make drivers/isdn/capi/capiutil.c:cdebbuf_alloc() staticAdrian Bunk2007-05-081-7/+1Star
| | | | | | | Signed-off-by: Adrian Bunk <bunk@stusta.de> Acked-by: Karsten Keil <kkeil@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* inode numbering: change libfs sb creation routines to avoid collisions with ↵Jeff Layton2007-05-081-1/+1
| | | | | | | | | | | | | | | | | | | their root inodes This patch makes it so that simple_fill_super and get_sb_pseudo assign their root inodes to be number 1. It also fixes up a couple of callers of simple_fill_super that were passing in files arrays that had an index at number 1, and adds a warning for any caller that sends in such an array. It would have been nice to have made it so that it wasn't possible to make such a collision, but some callers need to be able to control what inode number their entries get, so I think this is the best that can be done. Signed-off-by: Jeff Layton <jlayton@redhat.com> Cc: Christoph Hellwig <hch@lst.de> Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* au1550 SPI controller driverJan Nikitenko2007-05-083-0/+986
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Here is a driver for the Alchemy au1550 PSC (Programmable Serial Controller) in SPI master mode. It supports dma transfers using the Alchemy descriptor based dma controller for 4-8 bits per word SPI transfers. For 9-24 bits per word transfers, pio irq based mode is used to avoid setup of dma channels from scratch on each number of bits per word change. Tested with au1550; this may also work on other MIPS Alchemy cpus, like au1200/au1210/au1250. Used extensively with SD card connected via SPI; this handles 8.1MHz SPI clock transfers using dma without any problem (the highest SPI clock freq possible with au1550 running on 324MHz). The driver supports sharing of SPI bus by multiple devices. All features of Alchemy SPI mode are supported (all SPI modes, msb/lsb first, bits per word in 4-24 range). As the SPI clock of the controller depends on main input clock that shall be configured externally, platform data structure for au1550 SPI controller driver contains mainclk_hz attribute to define the input clock rate. From this value, dividers of the controller for SPI clock are set up for required frequency. Signed-off-by: Jan Nikitenko <jan.nikitenko@gmail.com> Whitespace and section fixups. Remove partial workaround for platform setup bug in dma_mask setup; it couldn't work with multiple controllers. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* SPI kerneldocDavid Brownell2007-05-081-5/+28
| | | | | | | | | | | | | | Various documentation updates for the SPI infrastructure, to clarify things that may not have been clear, to cope with lack of editing, and fix omissions. Also, plug SPI into the kernel-api DocBook template, and fix all the resulting glitches in document generation. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Cc: "Randy.Dunlap" <rdunlap@xenotime.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* /dev/spidevB.C interfaceAndrea Paterniani2007-05-083-0/+594
| | | | | | | | | | | | | | | | | | | | | | | | Add a filesystem API for <linux/spi/spi.h> stack. The initial version of this interface is purely synchronous. dbrownell@users.sourceforge.net: Cleaned up, bugfixed; much simplified; added preliminary documentation. Works with mdev given CONFIG_SYSFS_DEPRECATED; and presumably udev. Updated SPI_IOC_MESSAGE ioctl to full spi_message semantics, supporting groups of one or more transfers (each of which may be full duplex if desired). This is marked as EXPERIMENTAL with an explicit disclaimer that the API (notably the ioctls) is subject to change. Signed-off-by: Andrea Paterniani <a.paterniani@swapp-eng.it> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Cc: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* minor spi_butterfly cleanupDavid Brownell2007-05-081-58/+4Star
| | | | | | | | | | Simplify the spi_butterfly driver by removing incomplete/unused support for the second SPI bus, implemented by the USI controller. This should make this a clearer example of how to write a parport bitbang driver. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* 8250: Remove commented out irq cruftJosh Boyer2007-05-081-2/+0Star
| | | | | | | | | Remove some obviously old interrupt disable/enable code that has been commented out. Signed-off-by: Josh Boyer <jwboyer@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* use mutex instead of semaphore for misc char devicesMatthias Kaehlcke2007-05-081-13/+14
| | | | | | | | | The misc character device driver uses a semaphore as mutex. Use the mutex API instead of the (binary) semaphore. Signed-off-by: Matthias Kaehlcke <matthias.kaehlcke@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* use mutex instead of semaphore in hdaps driverMatthias Kaehlcke2007-05-081-18/+20
| | | | | | | | | | The hdaps driver uses a semaphore as mutex. Use the mutex API instead of the (binary) semaphore. Signed-off-by: Matthias Kaehlcke <matthias.kaehlcke@gmail.com> Cc: Robert Love <rlove@rlove.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* use mutex instead of semaphore in TPM driverMatthias Kaehlcke2007-05-082-13/+16
| | | | | | | | | | | The TPM driver uses two semaphores as mutexes. Use the mutex API instead of the (binary) semaphores. Signed-off-by: Matthias Kaehlcke <matthias.kaehlcke@gmail.com> Cc: Kylene Hall <kjhall@us.ibm.com> Cc: Marcel Selhorst <tpm@selhorst.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* use mutex instead of semaphore in RocketPort driverMatthias Kaehlcke2007-05-082-9/+14
| | | | | | | | | The RocketPort driver uses a semaphore as mutex. Use the mutex API instead of the (binary) semaphore. Signed-off-by: Matthias Kaehlcke <matthias.kaehlcke@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* synclink_gt use dynamic tty device registrationPaul Fulghum2007-05-081-16/+18
| | | | | | | | Change synclink_gt driver to use dynamic tty device registration. Signed-off-by: Paul Fulghum <paulkf@microgate.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Misc: add sensable phantom driverJiri Slaby2007-05-083-0/+473
| | | | | | | | Add sensable phantom driver Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* old buffer overflow in moxa driverdann frazier2007-05-081-2/+6
| | | | | | | | | | | | | | | | | I noticed that the moxa input checking security bug described by CVE-2005-0504 appears to remain unfixed upstream. The issue is described here: http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2005-0504 Debian has been shipping the following patch from Andres Salomon. (akpm: it's a privileged operation) Signed-off-by: dann frazier <dannf@hp.com> Signed-off-by: Andres Salomon <dilinger@debian.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Driver for the Maxim DS1WM, a 1-wire bus master ASIC coreakpm@linux-foundation.org2007-05-083-1/+477
| | | | | | | | | | Cc: Matt Reimer <mreimer@vpop.net> [akpm@linux-foundation.org: kconfig update] Signed-off-by: Matt Reimer <mreimer@vpop.net> Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* w1: allow bus master to have reset and byte opsEvgeniy Polyakov2007-05-081-1/+2
| | | | | | | Signed-off-by: Matt Reimer <mreimer@vpop.net> Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* W1 printk format warning fixEvgeniy Polyakov2007-05-081-1/+1
| | | | | Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* tpm: fix sleep-in-spinlockParag Warudkar2007-05-081-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | flush_scheduled_work() can sleep, and we're calling it under spinlock. AFAICS, moving flush_scheduled_work before spin_lock() should not cause any problems. Reason being - The only thing that can race against tpm_release is tpm_open (tpm_release is called when last reference to the file is closed and only thing that can happen after that is tpm_open??) and tpm_open acquires driver_lock and more over it bails out with EBUSY if chip->num_opens is greater than 0. I also moved chip->num_pending-- to after deleting timer and setting data pending as it looks more correct for the paranoid although it probably doesn't matter as it is guarded by driver_lock. None the less this change should not cause problems. While I was at it I noticed a missing NULL check in tpm_register_hardware which is fixed with this patch as well. Signed-off-by: Parag Warudkar <parag.warudkar@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* drivers/char: use __set_current_state()Milind Arun Choudhary2007-05-0811-15/+15
| | | | | | | | | use __set_current_state(TASK_*) instead of current->state = TASK_*, Signed-off-by: Milind Arun Choudhary <milindchoudhary@gmail.com> Cc: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Clean up mutex_trylock noiseJean Delvare2007-05-082-3/+3
| | | | | | | | | | | | Ingo Molnar's semaphore to mutex conversions left some noise on a few trylock calls. Clean it up. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Ingo Molnar <mingo@elte.hu> Cc: David Woodhouse <dwmw2@infradead.org> Cc: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* console UTF-8 fixesEgmont Koblinger2007-05-082-81/+182
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The UTF-8 part of the vt driver suffers from the following issues which are addressed in my patch: 1) If there's no glyph found for a particular valid UTF-8 character, we try to display U+FFFD. However if this one is not found either, here's what the current kernel does: - First, if the Unicode value is less than the number of glyphs, use the glyph directly from that position of the glyph table. While it may be a good idea in the 8-bit world, it has absolutely no sense with Unicode in mind. For example, if a Latin-2 font is loaded and an application prints U+00FB ("u with circumflex", not present in Latin-2) then as a fallback solution the glyph from the 0xFB position of the Latin-2 fontset (which is an "u with double accent" - a different character) is displayed. - Second, if this fallback fails too, a simple ASCII question mark is printed, which is visually undistinguishable from a real question mark. I changed the code to skip the first step (except if in non-UTF-8 mode), and changed the second step to print the question mark with inverse color attributes, so it is visually clear that it's not a real question mark, and resembles more to the common glyph of U+FFFD. 2) The UTF-8 decoder is buggy in many ways: - Lone continuation bytes (section 3.1 of Markus Kuhn's UTF-8 stress test) are not caught, they are displayed as some "random" (taken directly form the font table, see above) glyphs instead the replacement character. - Incomplete sequences (sections 3.2 and 3.3 of the stress test) emit no replacement character, but rather cause the subsequent valid character to be displayed more times(!). - The decoder is not safe: overlong sequences are not caught currently, they are displayed as if these were valid representations. This may even have security impacts. - The decoder does not handle D800..DFFF and FFFE..FFFF specially, it just emits these code points and lets it be looked up in the glyph table. Since these are invalid code points, I replace them by U+FFFD and hence give no chance for them to be looked up in the glyph table. (Assuming no font ships glyphs for these code points, this change is not visible to the users since the glyph shown will be the same.) With my fixes to the decoder it now behaves exactly as Markus Kuhn's stress test recommends. 3) It has no concept of double-width (CJK) characters. It's way beyond the scope of my patch to try to display them, but at least I think it's important for the cursor to jump two positions when printing such characters, since this is what applications (such as text editors) expect. Currently the cursor only jumps one position, and hence applications suffer from displaying and refreshing problems, and editing some English letters that are preceded by some CJK characters in the same line is a nightmare. With my patch an additional space is inserted after the CJK character has been printed (which usually means a replacement symbol of course). (If U+FFFD isn't availble and hence an inverse question mark is displayed in the first cell, I keep the inverted state for the space in the 2nd column so it's quite easy to see that they are tied together.) 4) There is a small built-in table of zero-width spaces that are not to be printed but silently skipped. U+200A is included there, but it's not a zero-width character, so I remove it from there. Signed-off-by: Egmont Koblinger <egmont@uhulinux.hu> Cc: Jan Engelhardt <jengelh@linux01.gwdg.de> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: "Antonino A. Daplas" <adaplas@pol.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* serial_txx9: zap changelog from source codeAtsushi Nemoto2007-05-081-25/+0Star
| | | | | | | Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Cc: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* serial_txx9: Use assigned device numbersAtsushi Nemoto2007-05-081-3/+4
| | | | | | | | | | | | | The serial_txx9 driver have abused device numbers (major 4, minor 128) if CONFIG_SERIAL_TXX9_STDSERIAL was not set. This patch makes the driver use proper device numbers assigned for it (major 204, minor 196-203). I suppose a typical user of this driver set CONFIG_SERIAL_TXX9_STDSERIAL to Y (i.e. use "ttyS0"), so this patch would not cause big compatibility issue. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Cc: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* pnpbios: convert to use the kthread APIEric W. Biederman2007-05-081-9/+7Star
| | | | | | | | | | | | This patches modifies the pnpbios kernel thread to start with ktrhead_run not kernel_thread and deamonize. Doing this makes the code a little simpler and easier to maintain. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Cc: Adam Belay <ambx1@neo.rr.com> Cc: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* SPIN_LOCK_UNLOCKED cleanup in drivers/serialMilind Arun Choudhary2007-05-082-9/+9
| | | | | | | | SPIN_LOCK_UNLOCKED cleanup,use __SPIN_LOCK_UNLOCKED instead Signed-off-by: Milind Arun Choudhary <milindchoudhary@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* SPIN_LOCK_UNLOCKED cleanup in drivers/char/keyboardMilind Arun Choudhary2007-05-081-1/+1
| | | | | | | | | SPIN_LOCK_UNLOCKED cleanup,use __SPIN_LOCK_UNLOCKED instead Signed-off-by: Milind Arun Choudhary <milindchoudhary@gmail.com> Cc: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* cciss: include scsi/scsi.h unconditionallyStephen Cameron2007-05-082-1/+1
| | | | | | | | | Make cciss unconditionally include scsi/scsi.h, because of the use of SCSI_IOCTL_GET_IDLUN and SCSI_IOCTL_GET_BUS_NUMBER. Signed-off-by: Stephen M. Cameron <steve.cameron@hp.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Add keyboard blink driverAndi Kleen2007-05-083-0/+37
| | | | | | | | | Simple driver that blinks the keyboard LEDs when loaded. Useful for checking that the kernel is still alive or for crashdumping Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* fix hotplug for legacy platform driversDavid Brownell2007-05-083-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We've had various reports of some legacy "probe the hardware" style platform drivers having nasty problems with hotplug support. The core issue is that those legacy drivers don't fully conform to the driver model. They assume a role that should be the responsibility of infrastructure code: creating device nodes. The "modprobe" step in hotplugging relies on drivers to have split those roles into different modules. The lack of this split causes the problems. When a driver creates nodes for devices that don't exist (sending a hotplug event), then exits (aborting one modprobe) before the "modprobe $MODALIAS" step completes (by failing, since it's in the middle of a modprobe), the result can be an endless loop of modprobe invocations ... badness. This fix uses the newish per-device flag controlling issuance of "add" events. (A previous version of this patch used a per-device "driver can hotplug" flag, which only scrubbed $MODALIAS from the environment rather than suppressing the entire hotplug event.) It also shrinks that flag to one bit, saving a word in "struct device". So the net of this patch is removing some nasty failures with legacy drivers, while retaining hotplug capability for the majority of platform drivers. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Cc: Greg KH <gregkh@suse.de> Cc: Andres Salomon <dilinger@debian.org> Cc: Dominik Brodowski <linux@dominikbrodowski.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* cciss: set rq->errors more correctly in driverMike Miller (OS Dev)2007-05-081-21/+22
| | | | | | | | | | | | | | | | Set rq->errors more correctly in cciss driver. Previously we had set it synonymously with the meaning of the last parameter of end_that_last_request and complete_buffers (the "uptodate" parameter) and had gotten away with it for all this time because nobody ever looked at rq->errors. SCSI_IOCTL_SEND_COMMAND looks at rq->errors, so now it matters that it be right. Signed-off-by: Stephen M. Cameron <steve.cameron@hp.com> Signed-off-by: Mike Miller <mike.miller@hp.com> Cc: James Bottomley <James.Bottomley@steeleye.com> Cc: Jens Axboe <jens.axboe@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* cciss: add SG_IO ioctl to ccissMike Miller (OS Dev)2007-05-081-53/+111
| | | | | | | | | | | | | | | | | For all of you that think cciss should be a scsi driver here is the patch that you have been waiting for all these years. This patch actually adds the SG_IO ioctl to cciss. The primary purpose is for clustering and high-availibilty. But now anyone can exploit this ioctl in any manner they wish. Note, SCSI_IOCTL_SEND_COMMAND doesn't work with this patch due to rq->errors being set incorrectly. Subsequent patch fixes that. Signed-off-by: Stephen M. Cameron <steve.cameron@hp.com> Signed-off-by: Mike Miller <mike.miller@hp.com> Cc: James Bottomley <James.Bottomley@steeleye.com> Cc: Jens Axboe <jens.axboe@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* cciss: reformat error handlingMike Miller (OS Dev)2007-05-081-85/+89
| | | | | | | | | | | Reformat some error handling code to reduce line lengths a bit. Signed-off-by: Stephen M. Cameron <steve.cameron@hp.com> Signed-off-by: Mike Miller <mike.miller@hp.com> Cc: James Bottomley <James.Bottomley@steeleye.com> Cc: Jens Axboe <jens.axboe@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* dtlk: fix error checks in module_init()Akinobu Mita2007-05-081-4/+10
| | | | | | | | | | | | | | | | | | | | | | This patch fixes two things in module_init. - fix register_chrdev() error check Currently dtlk doesn't check register_chrdev() failure correctly. register_chrdev() returns a errno on failure. - check probe failure dtlk ignores probe failure and allows the module loading without such device. I got "Trying to free nonexistent resource" message by release_region() when unloading module without device. [akpm@linux-foundation.org: fix error code return] Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Cc: Chris Pallotta <chris@allmedia.com> Cc: Jim Van Zandt <jrv@vanzandt.mv.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* parport_serial: fix PCI must_checksRandy Dunlap2007-05-081-1/+7
| | | | | | | | drivers/parport/parport_serial.c:402: warning: ignoring return value of 'pci_enable_device', declared with attribute warn_unused_result Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* i386: sched.h inclusion from module.h is baackAlexey Dobriyan2007-05-081-0/+1
| | | | | | | | | | | | | | | linux/module.h -> linux/elf.h -> asm-i386/elf.h -> linux/utsname.h -> linux/sched.h Noticeably cut the number of files which are rebuild upon touching sched.h and cut down pulled junk from every module.h inclusion. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* ROUND_UP macro cleanup in drivers/char/lp.cMilind Arun Choudhary2007-05-081-4/+1Star
| | | | | | | | ROUND_UP macro cleanup use DIV_ROUND_UP Signed-off-by: Milind Arun Choudhary <milindchoudhary@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Replace deprecated SA_xxx interrupt flagsThomas Gleixner2007-05-081-1/+1
| | | | | | | | Fix the last users of the deprecated SA_xxx interrupt flags. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* PNPACPI sets pnpdev->dev.archdataDavid Brownell2007-05-082-9/+47
| | | | | | | | | | | | | | | | | | Teach PNPACPI how to hook up its devices to their ACPI nodes, so that pnpdev->dev.archdata points to the parallel acpi device node. Previously this only worked for PCI, leaving a notable hole. Export "acpi_bus_type" so this can work. Remove some extraneous whitespace. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Cc: Adam Belay <ambx1@neo.rr.com> Cc: Bjorn Helgaas <bjorn.helgaas@hp.com> Cc: Len Brown <lenb@kernel.org> Cc: Greg KH <greg@kroah.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* remove artificial software max_loop limitKen Chen2007-05-081-74/+110
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove artificial maximum 256 loop device that can be created due to a legacy device number limit. Searching through lkml archive, there are several instances where users complained about the artificial limit that the loop driver impose. There is no reason to have such limit. This patch rid the limit entirely and make loop device and associated block queue instantiation on demand. With on-demand instantiation, it also gives the benefit of not wasting memory if these devices are not in use (compare to current implementation that always create 8 loop devices), a net improvement in both areas. This version is both tested with creation of large number of loop devices and is compatible with existing losetup/mount user land tools. There are a number of people who worked on this and provided valuable suggestions, in no particular order, by: Jens Axboe Jan Engelhardt Christoph Hellwig Thomas M Signed-off-by: Ken Chen <kenchen@google.com> Cc: Jan Engelhardt <jengelh@linux01.gwdg.de> Cc: Christoph Hellwig <hch@lst.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Make /dev/port conditional on config symbolRussell King2007-05-082-4/+10
| | | | | | | | | | Instead of having /dev/port support dependent in multiple places on a string of preprocessor symbols, define a new configuration directive for it. This ensures that all four places remain consistent with each other. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Fix 82875 PCI setupJohn Feeney2007-05-081-11/+2Star
| | | | | | | | | | | | | | | | | The 82875 EDAC driver enables an otherwise-hidden PCI device, but doesn't register it as a PCI device properly. Therefore, the device list in /proc/bus/pci/devices is different than the tree in /sys/bus/pci. This usually manifests as the X server failing to start, since it expects the two lists to be consistent. Signed-off-by: Adam Jackson <ajackson@redhat.com> Cc: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Cc: Greg KH <greg@kroah.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Cc: Doug Thompson <norsk5@xmission.com> Cc: Andi Kleen <ak@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* header cleaning: don't include smp_lock.h when not usedRandy Dunlap2007-05-08118-118/+0Star
| | | | | | | | | | | | Remove includes of <linux/smp_lock.h> where it is not used/needed. Suggested by Al Viro. Builds cleanly on x86_64, i386, alpha, ia64, powerpc, sparc, sparc64, and arm (all 59 defconfigs). Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Add a new deferrable delayed work initVenki Pallipadi2007-05-081-1/+1
| | | | | | | | | | | | | | Add a new deferrable delayed work init. This can be used to schedule work that are 'unimportant' when CPU is idle and can be called later, when CPU eventually comes out of idle. Use this init in cpufreq ondemand governor. Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> Cc: Dave Jones <davej@codemonkey.org.uk> Cc: Oleg Nesterov <oleg@tv-sign.ru> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* layered parport code uses parport->devDavid Brownell2007-05-085-20/+8Star
| | | | | | | | | | | | | | | | | | | Update some of the layered parport_driver code to use parport->dev: - i2c-parport (parent of i2c_adapter) - spi_butterfly (parent of spi_master, allowing cruft removal) - lp (creating class_device) - ppdev (parent of parportN device) - tipar (creating class_device) There are still drivers that should be updated, like some of the input drivers; but they won't be any worse off than they are today. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Cc: Greg KH <greg@kroah.com> Cc: Jean Delvare <khali@linux-fr.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* legacy PC parports support parport->devJean Delvare2007-05-081-0/+39
| | | | | | | | | | | | | | | Give legacy parallel ports a platform device in the device tree. This is a quick and dirty implementation; it doesn't actually convert the legacy parport code to the device driver model (by splitting out probing from device creation). But at least parallel port device drivers will finally have a device to work with. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Cc: Greg KH <greg@kroah.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* parport->dev driver model supportDavid Brownell2007-05-086-16/+26
| | | | | | | | | | | | | | | | | Currently a parport_driver can't get a handle on the device node for the underlying parport (PNPACPI, PCI, etc). That prevents correct placement of sysfs child nodes, which can affect things like power management. This patch adds a field to "struct parport" pointing to that device node, and updates non-legacy port drivers to initialize that device pointer. That field replaces the analagous PCI-only support in parport_pc. [akpm@linux-foundation.org: fix powerpc build] Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Cc: Paul Mackerras <paulus@samba.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>