aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2009-03-24driver core: move knode_bus into private structureGreg Kroah-Hartman
Nothing outside of the driver core should ever touch knode_bus, so move it out of the public eye. Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24driver core: move knode_driver into private structureGreg Kroah-Hartman
Nothing outside of the driver core should ever touch knode_driver, so move it out of the public eye. Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24driver core: move klist_children into private structureGreg Kroah-Hartman
Nothing outside of the driver core should ever touch klist_children, or knode_parent, so move them out of the public eye. Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24driver core: create a private portion of struct deviceGreg Kroah-Hartman
This is to be used to move things out of struct device that no code outside of the driver core should ever touch. Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24driver core: remove polling for driver_probe_done(v5)Ming Lei
This patch removes 100ms polling for driver_probe_done in wait_for_device_probe(), and uses wait_event() instead. Removing polling in fs initialization may lead to a faster boot. This patch also changes the return type of wait_for_device_done() from int to void. This patch is against Arjan's patch in linux-next tree. Signed-off-by: Ming Lei <tom.leiming@gmail.com> Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com> Reviewed-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24sysfs: reference sysfs_dirent from sysfs inodesEric W. Biederman
The sysfs_dirent serves as both an inode and a directory entry for sysfs. To prevent the sysfs inode numbers from being freed prematurely hold a reference to sysfs_dirent from the sysfs inode. [akpm@linux-foundation.org: add comment] Signed-off-by: Eric W. Biederman <ebiederm@aristanetworks.com> Cc: Tejun Heo <tj@kernel.org> Cc: Al Viro <viro@ZenIV.linux.org.uk> Cc: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24sysfs: sysfs_add_one WARNs with full path to duplicate filenameAlex Chiang
sysfs: sysfs_add_one WARNs with full path to duplicate filename As a debugging aid, it can be useful to know the full path to a duplicate file being created in sysfs. We now will display warnings such as: sysfs: cannot create duplicate filename '/foo' when attempting to create multiple files named 'foo' in the sysfs root, or: sysfs: cannot create duplicate filename '/bus/pci/slots/5/foo' when attempting to create multiple files named 'foo' under a given directory in sysfs. The path displayed is always a relative path to sysfs_root. The leading '/' in the path name refers to the sysfs_root mount point, and should not be confused with the "real" '/'. Thanks to Alex Williamson for essentially writing sysfs_pathname. Cc: Alex Williamson <alex.williamson@hp.com> Signed-off-by: Alex Chiang <achiang@hp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24driver-core: do not register a driver with bus_type not registeredDave Young
If the bus_type is not registerd, driver_register to that bus will cause oops. I found this bug when test built-in usb serial drivers (ie. aircable driver) with 'nousb' cmdline params. In this patch: 1. set the bus->p=NULL when bus_register failed and unregisterd. 2. if bus->p is NULL, driver_register BUG_ON will be triggered. Signed-off-by: Dave Young <hidave.darkstar@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24scsi/m68k: Kill NCR_700_detect() warningsGeert Uytterhoeven
The patch from Ming Lei <tom.leiming@gmail.com> entitled: platform driver: fix incorrect use of 'platform_bus_type' with 'struct devic introduced the following warnings on m68k, as `dev' is now a `struct platform_device *' instead of a `struct device *': | drivers/scsi/a4000t.c:64: warning: passing argument 3 of 'NCR_700_detect' from incompatible pointer type | drivers/scsi/mvme16x_scsi.c:67: warning: passing argument 3 of 'NCR_700_detect' from incompatible pointer type | drivers/scsi/bvme6000_scsi.c:61: warning: passing argument 3 of 'NCR_700_detect' from incompatible pointer type I think the below is missing (untested on real hardware). Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Ming Lei <tom.leiming@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24platform driver: fix incorrect use of 'platform_bus_type' with 'struct ↵Ming Lei
device_driver' This patch fixes the bug reported in http://bugzilla.kernel.org/show_bug.cgi?id=11681. "Lots of device drivers register a 'struct device_driver' with the '.bus' member set to '&platform_bus_type'. This is wrong, since the platform_bus functions expect the 'struct device_driver' to be wrapped up in a 'struct platform_driver' which provides some additional callbacks (like suspend_late, resume_early). The effect may be that platform_suspend_late() uses bogus data outside the device_driver struct as a pointer pointer to the device driver's suspend_late() function or other hard to reproduce failures."(Lothar Wassmann) Signed-off-by: Ming Lei <tom.leiming@gmail.com> Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Acked-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24UIO: Take offset into account when determining number of pages that can be ↵Ian Abbott
mapped If a UIO memory region does not start on a page boundary but straddles one, the number of actual pages that overlap the memory region may be calculated incorrectly because the offset isn't taken into account. If userspace sets the mmap length to offset+size, it may fail with -EINVAL if UIO thinks it's trying to allocate too many pages. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Cc: Hans J. Koch <hjk@linutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24uio: add the uio_aec driverBrandon Philips
UIO driver for the Adrienne Electronics Corporation PCI time code device. This device differs from other UIO devices since it uses I/O ports instead of memory mapped I/O. In order to make it possible for UIO to work with this device a utility, uioport, can be used to read and write the ports. uioport is designed to be a setuid program and checks the permissions of the /dev/uio* node and if the user has write permissions it will use iopl and out*/in* to access the device. [1] git clone git://ifup.org/philips/uioport.git Signed-off-by: Brandon Philips <brandon@ifup.org> Signed-off-by: Hans J. Koch <hjk@linutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24UIO: Add name attributes for mappings and port regionsHans J. Koch
If a UIO device has several memory mappings, it can be difficult for userspace to find the right one. The situation becomes even worse if the UIO driver can handle different versions of a card that have different numbers of mappings. Benedikt Spranger has such cards and pointed this out to me. Thanks, Bene! To address this problem, this patch adds "name" sysfs attributes for each mapping. Userspace can use these to clearly identify each mapping. The name string is optional. If a driver doesn't set it, an empty string will be returned, so this patch won't break existing drivers. The same problem exists for port region information, so a "name" attribute is added there, too. Signed-off-by: Hans J. Koch <hjk@linutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24platform: introduce module id table for platform devicesEric Miao
Now platform_device is being widely used on SoC processors where the peripherals are attached to the system bus, which is simple enough. However, silicon IPs for these SoCs are usually shared heavily across a family of processors, even products from different companies. This makes the original simple driver name based matching insufficient, or simply not straight-forward. Introduce a module id table for platform devices, and makes it clear that a platform driver is able to support some shared IP and handle slight differences across different platforms (by 'driver_data'). Module alias is handled automatically when a MODULE_DEVICE_TABLE() is defined. To not disturb the current platform drivers too much, the matched id entry is recorded and can be retrieved by platform_get_device_id(). Signed-off-by: Eric Miao <eric.miao@marvell.com> Cc: Kay Sievers <kay.sievers@vrfy.org> Cc: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24platform: make better use of to_platform_{device,driver}() macrosEric Miao
This helps the code look more consistent and cleaner. Signed-off-by: Eric Miao <eric.miao@marvell.com> Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24driver core: check bus->match without holding device lockMing Lei
This patch moves bus->match out from driver_probe_device and does not hold device lock to check the match between a device and a driver. The idea has been verified by the commit 6cd495860901, which leads to a faster boot. But the commit 6cd495860901 has the following drawbacks: 1),only does the quick check in the path of __driver_attach->driver_probe_device, not in other paths; 2),for a matched device and driver, check the same match twice. It is a waste of cpu ,especially for some drivers with long device id table (eg. usb-storage driver). This patch adds a helper of driver_match_device to check the match in all paths, and testes the match only once. Signed-off-by: Ming Lei <tom.leiming@gmail.com> Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24sysfs: Take sysfs_mutex when fetching the root inode.Eric W. Biederman
sysfs_get_inode ultimately calls sysfs_count_nlink when the a directory inode is fectched. sysfs_count_nlink needs to be called under the sysfs_mutex to guard against the unlikely but possible scenario that the root directory is changing as we are counting the number entries in it, and just in general to be consistent. Signed-off-by: Eric W. Biederman <ebiederm@aristanetworks.com> Acked-by: Tejun Heo <tj@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24SYSFS: use standard magic.h for sysfsQinghuang Feng
SYSFS_MAGIC has been added into magic.h, so only use that definition in magic.h to avoid potential consistency problem. Signed-off-by: Qinghuang Feng <qhfeng.kernel@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24driver core: get rid of struct device's bus_id string arrayKay Sievers
Now that all users of bus_id is gone, we can remove it from struct device. Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24USB: FHCI: use dev_name() in place of bus_id.Sachin Sant
Replace references to bus_id with dev_name() to fix fhci driver build break. drivers/usb/host/fhci-hcd.c:586: error: struct device has no member named bus_id drivers/usb/host/fhci-hcd.c:653: error: struct device has no member named bus_id drivers/usb/host/fhci-dbg.c:111: error: struct device has no member named bus_id Signed-off-by: Sachin Sant <sachinp@in.ibm.com> Acked-by: Anton Vorontsov <avorontsov@ru.mvista.com> Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24PS3: replace bus_id usageGreg Kroah-Hartman
These simple debug statments should be using dev_dbg() instead of accessing bus_id directly (or they should use device_name). As bus_id is going away, this patch is necessary. Acked-by: Geoff Levand <geoffrey.levand@am.sony.com> Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24usb: struct device - replace bus_id with dev_name(), dev_set_name()Kay Sievers
Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
2009-03-24wimax: struct device - replace bus_id with dev_name(), dev_set_name()Kay Sievers
Cc: inaky.perez-gonzalez@intel.com Cc: linux-wimax@intel.com Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
2009-03-24mfd: struct device - replace bus_id with dev_name(), dev_set_name()Kay Sievers
Cc: sameo@openedhand.com Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
2009-03-24mca: struct device - replace bus_id with dev_name(), dev_set_name()Kay Sievers
Cc: James.Bottomley@HansenPartnership.com Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
2009-03-24gpio: struct device - replace bus_id with dev_name(), dev_set_name()Kay Sievers
Cc: Michael Buesch <mb@bu3sch.de> Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
2009-03-24eisa: struct device - replace bus_id with dev_name(), dev_set_name()Kay Sievers
Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
2009-03-24dma: struct device - replace bus_id with dev_name(), dev_set_name()Kay Sievers
Cc: Dan Williams <dan.j.williams@intel.com> Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
2009-03-24dio: struct device - replace bus_id with dev_name(), dev_set_name()Kay Sievers
Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
2009-03-24amba: struct device - replace bus_id with dev_name(), dev_set_name()Kay Sievers
Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
2009-03-24v4l: struct device - replace bus_id with dev_name(), dev_set_name()Kay Sievers
Cc: mchehab@infradead.org Cc: linux-media@vger.kernel.org Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
2009-03-24drm: struct device - replace bus_id with dev_name(), dev_set_name()Kay Sievers
Cc: airlied@linux.ie Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
2009-03-24net: struct device - replace bus_id with dev_name(), dev_set_name()Kay Sievers
Cc: davem@davemloft.net Cc: netdev@vger.kernel.org Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
2009-03-24rtc: struct device - replace bus_id with dev_name(), dev_set_name()Kay Sievers
Cc: a.zummo@towertech.it Cc: rtc-linux@googlegroups.com Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Alessandro Zummo <a.zummo@towertech.it> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24pcmcia: struct device - replace bus_id with dev_name(), dev_set_name()Kay Sievers
Cc: Dominik Brodowski <linux@dominikbrodowski.net> Cc: linux-pcmcia@lists.infradead.org Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
2009-03-24tc: struct device - replace bus_id with dev_name(), dev_set_name()Kay Sievers
Cc: macro@linux-mips.org Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
2009-03-24sh: struct device - replace bus_id with dev_name(), dev_set_name()Kay Sievers
Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
2009-03-24serial: struct device - replace bus_id with dev_name(), dev_set_name()Kay Sievers
Cc: davem@davemloft.net Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
2009-03-24s390: struct device - replace bus_id with dev_name(), dev_set_name()Kay Sievers
Cc: schwidefsky@de.ibm.com Cc: linux-s390@vger.kernel.org Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
2009-03-24rapidio: struct device - replace bus_id with dev_name(), dev_set_name()Kay Sievers
Cc: mporter@kernel.crashing.org Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
2009-03-24pci: struct device - replace bus_id with dev_name(), dev_set_name()Kay Sievers
Cc: jbarnes@virtuousgeek.org Cc: linux-pci@vger.kernel.org Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
2009-03-24mtd: struct device - replace bus_id with dev_name(), dev_set_name()Kay Sievers
Cc: dwmw2@infradead.org Cc: linux-mtd@lists.infradead.org Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
2009-03-24mmc: struct device - replace bus_id with dev_name(), dev_set_name()Kay Sievers
Cc: drzeus-mmc@drzeus.cx Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
2009-03-24zorro: struct device - replace bus_id with dev_name(), dev_set_name()Kay Sievers
Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
2009-03-24video: struct device - replace bus_id with dev_name(), dev_set_name()Kay Sievers
Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
2009-03-24spi: struct device - replace bus_id with dev_name(), dev_set_name()Kay Sievers
Cc: dbrownell@users.sourceforge.net Cc: spi-devel-general@lists.sourceforge.net Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
2009-03-24edac: struct device - replace bus_id with dev_name(), dev_set_name()Kay Sievers
Cc: dougthompson@xmission.com Cc: bluesmoke-devel@lists.sourceforge.net Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
2009-03-23Linux 2.6.29Linus Torvalds
2009-03-23Build with -fno-dwarf2-cfi-asmKyle McMartin
With a sufficiently new compiler and binutils, code which wasn't previously generating .eh_frame sections has begun to. Certain architectures (powerpc, in this case) may generate unexpected relocation formats in response to this, preventing modules from loading. While the new relocation types should probably be handled, revert to the previous behaviour with regards to generation of .eh_frame sections. (This was reported against Fedora, which appears to be the only distro doing any building against gcc-4.4 at present: RH bz#486545.) Signed-off-by: Kyle McMartin <kyle@redhat.com> Acked-by: Roland McGrath <roland@redhat.com> Cc: Alexandre Oliva <aoliva@redhat.com> Cc: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-03-23trivial: fix orphan dates in ext2 documentationJody McIntyre
Revert the change to the orphan dates of Windows 95, DOS, compression. Add a new orphan date for OS/2. Signed-off-by: Jody McIntyre <scjody@sun.com> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>