aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2010-03-08[S390] hvc_iucv: allocate memory buffers for IUCV in zone DMAHendrik Brueckner1-2/+4
The device driver must allocate memory for IUCV buffers with GFP_DMA, because IUCV cannot address memory above 2GB (31bit addresses only). Because the IUCV ignores the higher bits of the address, sending and receiving IUCV data with this driver might cause memory corruptions. Signed-off-by: Hendrik Brueckner <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2010-03-08[S390] uaccess: make sure copy_from_user_overflow is builtinHeiko Carstens1-1/+2
If there is no in kernel image caller modules will suffer: ERROR: "copy_from_user_overflow" [net/core/pktgen.ko] undefined! ERROR: "copy_from_user_overflow" [net/can/can-raw.ko] undefined! ERROR: "copy_from_user_overflow" [fs/cifs/cifs.ko] undefined! Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2010-03-08[WATCHDOG] i6300esb: fix unlock register withWim Van Sebroeck1-3/+3
Before you can read or write from the i6300esb memeory mapped registers, you need to unlock these. This is done by writing the magic numbers 0x80 and 0x86 to the reload register. The size of the reload register is 32bit though. Also binary 11 is hex 0x03 and not 0x11. Signed-off-by: Wim Van Sebroeck <[email protected]>
2010-03-08Merge branch 'topic/misc' into for-linusTakashi Iwai17-212/+132
2010-03-08Merge branch 'topic/asoc' into for-linusTakashi Iwai2-9/+11
2010-03-08Merge branch 'topic/hda' into for-linusTakashi Iwai9-904/+1141
2010-03-08ALSA: hdmi - show debug message on changing audio infoframeWu Fengguang1-4/+8
Also change printk level for the two others. Signed-off-by: Wu Fengguang <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2010-03-08ALSA: hdmi - merge common code for intelhdmi and nvhdmiWu Fengguang3-1613/+882
Create patch_hdmi.c to hold common code from intelhdmi and nvhdmi. For now the patch_hdmi.c file is simply included by patch_intelhdmi.c and patch_nvhdmi.c, and does not represent a real codec. There are no behavior changes to intelhdmi. However nvhdmi made several changes when copying code out of intelhdmi, which are all reverted in this patch. Wei Ni confirmed that the reverted code actually works fine. Tested-by: Wei Ni <[email protected]> Signed-off-by: Wu Fengguang <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2010-03-07msi-laptop: depends on RFKILLRandy Dunlap1-0/+1
msi-laptop uses rfkill*() interfaces so it should depend on RFKILL. msi-laptop.c:(.text+0x1fcd1b): undefined reference to `rfkill_alloc' msi-laptop.c:(.text+0x1fcd76): undefined reference to `rfkill_register' msi-laptop.c:(.text+0x1fcdc8): undefined reference to `rfkill_destroy' msi-laptop.c:(.text+0x1fcdd9): undefined reference to `rfkill_unregister' This repairs "msi-laptop: Detect 3G device exists by standard ec command", which is in some gregkh tree. Signed-off-by: Randy Dunlap <[email protected]> Cc: Lennart Poettering <[email protected]> Cc: Lee, Chun-Yi <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-03-07msi-laptop: Detect 3G device exists by standard ec commandLee, Chun-Yi1-10/+34
Detect 3G device exists by standard ec command. Driver will not create the threeg sysfs file and threeg rfkill interface if there have no internal 3G device in MSI notebook/netbook. Signed-off-by: Lee, Chun-Yi <[email protected]> Cc: Lennart Poettering <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-03-07msi-laptop: Add resume method for set the SCM load againLee, Chun-Yi1-1/+25
Implement the resume method for set the load SCM flag after system reusme. Without this patch, the wifi function key on SCM model will back to BIOS control mode then confuse with the userland software control. e.g. MSI N034 Signed-off-by: Lee, Chun-Yi <[email protected]> Cc: Lennart Poettering <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-03-07msi-laptop: Support some MSI 3G netbook that is need load SCMLee, Chun-Yi1-0/+238
Some MSI 3G netbook only have one fn key to control Wlan/Bluetooth/3G, those netbook will load the SCM (windows app) to disable the original Wlan/Bluetooth control by BIOS when user press fn key, then control Wlan/Bluetooth/3G by SCM (software control by OS). Without SCM, user cann't on/off 3G module on those 3G netbook. On Linux, msi-laptop driver will do the same thing to disable the original BIOS control, then might need use HAL or other userland application to do the software control that simulate with SCM. e.g. MSI N034 netbook Signed-off-by: Lee, Chun-Yi <[email protected]> Cc: Lennart Poettering <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-03-07msi-laptop: Add threeg sysfs file for support query 3G state by standard ↵Lee, Chun-Yi1-1/+30
66/62 ec command Add threeg sysfs file for support query 3G state by standard 66/62 ec command, the MSI standard ec interface supported this feature. Signed-off-by: Lee, Chun-Yi <[email protected]> Cc: Lennart Poettering <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-03-07msi-laptop: Support standard ec 66/62 command on MSI notebook and nebookLee, Chun-Yi1-4/+39
Suppport standard ec 66/62 command on MSI notebook and nebook. MSI netbook and notebook already support 66/62 command, so, add new get_state function, and put the old model to non-standard model, but driver still support those old model. Signed-off-by: Lee, Chun-Yi <[email protected]> Cc: Lennart Poettering <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-03-07Driver core: create lock/unlock functions for struct deviceGreg Kroah-Hartman13-63/+76
In the future, we are going to be changing the lock type for struct device (once we get the lockdep infrastructure properly worked out) To make that changeover easier, and to possibly burry the lock in a different part of struct device, let's create some functions to lock and unlock a device so that no out-of-core code needs to be changed in the future. This patch creates the device_lock/unlock/trylock() functions, and converts all in-tree users to them. Cc: Thomas Gleixner <[email protected]> Cc: Jean Delvare <[email protected]> Cc: Dave Young <[email protected]> Cc: Ming Lei <[email protected]> Cc: Jiri Kosina <[email protected]> Cc: Phil Carmody <[email protected]> Cc: Arjan van de Ven <[email protected]> Cc: Cornelia Huck <[email protected]> Cc: Rafael J. Wysocki <[email protected]> Cc: Pavel Machek <[email protected]> Cc: Len Brown <[email protected]> Cc: Magnus Damm <[email protected]> Cc: Alan Stern <[email protected]> Cc: Randy Dunlap <[email protected]> Cc: Stefan Richter <[email protected]> Cc: David Brownell <[email protected]> Cc: Vegard Nossum <[email protected]> Cc: Jesse Barnes <[email protected]> Cc: Alex Chiang <[email protected]> Cc: Kenji Kaneshige <[email protected]> Cc: Andrew Morton <[email protected]> Cc: Andrew Patterson <[email protected]> Cc: Yu Zhao <[email protected]> Cc: Dominik Brodowski <[email protected]> Cc: Samuel Ortiz <[email protected]> Cc: Wolfram Sang <[email protected]> Cc: CHENG Renquan <[email protected]> Cc: Oliver Neukum <[email protected]> Cc: Frans Pop <[email protected]> Cc: David Vrabel <[email protected]> Cc: Kay Sievers <[email protected]> Cc: Sarah Sharp <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-03-07sysfs: fix for thinko with sysfs_bin_attr_init()Stephen Rothwell2-3/+3
After merging the final tree, today's linux-next build (powerpc allyesconfig) failed like this: drivers/pci/pci-sysfs.c: In function 'pci_create_legacy_files': drivers/pci/pci-sysfs.c:645: error: lvalue required as unary '&' operand drivers/pci/pci-sysfs.c:658: error: lvalue required as unary '&' operand Caused by commit "sysfs: Use sysfs_attr_init and sysfs_bin_attr_init on dynamic attributes" interacting with commit "sysfs: Use one lockdep class per sysfs attribute") both from the driver-core tree. Signed-off-by: Stephen Rothwell <[email protected]> Cc: "Eric W. Biederman" <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-03-07sysfs: Kill unused sysfs_sb variable.Eric W. Biederman2-3/+0
Now that there are no more users we can remove the sysfs_sb variable. Acked-by: Tejun Heo <[email protected]> Acked-by: Serge Hallyn <[email protected]> Signed-off-by: Eric W. Biederman <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-03-07sysfs: Pass super_block to sysfs_get_inodeEric W. Biederman4-5/+6
Currently sysfs_get_inode magically returns an inode on sysfs_sb. Make the super_block parameter explicit and the code becomes clearer. Acked-by: Tejun Heo <[email protected]> Acked-by: Serge Hallyn <[email protected]> Signed-off-by: Eric W. Biederman <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-03-07driver core: Use sysfs_rename_link in device_renameEric W. Biederman1-12/+6
Don't open code the renaming of symlinks in sysfs instead use the new helper function sysfs_rename_link Acked-by: Tejun Heo <[email protected]> Acked-by: Serge Hallyn <[email protected]> Signed-off-by: Eric W. Biederman <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-03-07sysfs: Implement sysfs_rename_linkEric W. Biederman2-0/+47
Because of rename ordering problems we occassionally give false warnings about invalid sysfs operations. So using sysfs_rename create a sysfs_rename_link function that doesn't need strange workarounds. Cc: Benjamin Thery <[email protected]> Cc: Daniel Lezcano <[email protected]> Acked-by: Serge Hallyn <[email protected]> Acked-by: Tejun Heo <[email protected]> Signed-off-by: Eric W. Biederman <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-03-07sysfs: Pack sysfs_dirent more tightly.Eric W. Biederman1-1/+1
Placing the 16bit s_mode between a pointer and a long doesn't pack well especailly on 64bit where we wast 48 bits. So move s_mode and declare it as a unsigned short. This is the sysfs backing store after all we don't need fields extra large just in case someday we want userspace to be able to use a larger value. Acked-by: Tejun Heo <[email protected]> Signed-off-by: Eric W. Biederman <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-03-07sysfs: Serialize updates to the vfs inodeEric W. Biederman1-4/+4
The vfs depends upon filesystem methods to update the vfs inode. Sysfs adds to the normal number of places where the vfs inode is updated by also updatng the vfs inode in sysfs_refresh_inode. Typically the inode mutex is used to serialize updates to the vfs inode, but grabbing the inode mutex in sysfs_permission and sysfs_getattr causes deadlocks, because sometimes the vfs calls those operations with the inode mutex held. Therefore sysfs can not use the inode mutex to serial updates to the vfs inode. The sysfs_mutex is acquired in all of the routines where sysfs updates the vfs inode, and with a small change we can consistently protext sysfs vfs inode updates with the sysfs_mutex. To protect the sysfs vfs inode updates with the sysfs_mutex simply requires extending the scope of sysfs_mutex in sysfs_setattr over inode_setattr, and over inode_change_ok (so we have an unchanging inode when we perform the check). Acked-by: Serge Hallyn <[email protected]> Signed-off-by: Eric W. Biederman <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-03-07sysfs: windfarm: init sysfs attributesJohannes Berg2-0/+2
This is required for lockdep. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-03-07sysfs: Use sysfs_attr_init and sysfs_bin_attr_init on module dynamic attributesEric W. Biederman1-0/+3
A little more whack-a-mole annotating the dynamic sysfs attributes. I had everything built into my earlier test kernel, and so I missed these. Signed-off-by: Eric W. Biederman <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-03-07sysfs: Document sysfs_attr_init and sysfs_bin_attr_initEric W. Biederman1-0/+20
I have added a new requirement to the external sysfs interface that dynamically allocated sysfs attributes must call sysfs_attr_init if lockdep is enabled. For the time being callying sysfs_attr_init is only mandatory if lockdep is enabled, so we can live with a few unconverted instances until we find them all. As this is part of the public interface of sysfs it is a good idea to document these pseudo functions so someone inspeciting the code can find out what has happened. Signed-off-by: Eric W. Biederman <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-03-07sysfs: Use sysfs_attr_init and sysfs_bin_attr_init on dynamic attributesEric W. Biederman4-0/+9
These are the non-static sysfs attributes that exist on my test machine. Fix them to use sysfs_attr_init or sysfs_bin_attr_init as appropriate. It simply requires making a sysfs attribute present to see this. So this is a little bit tedious but otherwise not too bad. Signed-off-by: Eric W. Biederman <[email protected]> Acked-by: WANG Cong <[email protected]> Cc: Tejun Heo <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-03-07sysfs: Use one lockdep class per sysfs attribute.Eric W. Biederman2-2/+23
Acknowledge that the logical sysfs rwsem has one instance per sysfs attribute with different locking depencencies for different attributes. There is a sysfs idiom where writing to one sysfs file causes the addition or removal of other sysfs files. Lumping all of the sysfs attributes together in one lock class causes lockdep to generate lots of false positives. This introduces the requirement that non-static sysfs attributes need to be initialized with sysfs_attr_init or sysfs_bin_attr_init. Strictly speaking this requirement only exists when lockdep is enabled, and when lockdep is enabled we get a bit fat warning if this requirement is not met. Signed-off-by: Eric W. Biederman <[email protected]> Acked-by: WANG Cong <[email protected]> Cc: Tejun Heo <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-03-07sysfs: Only take active references on attributes.Eric W. Biederman3-1/+6
If we exclude directories and symlinks from the set of sysfs dirents where we need active references we are left with sysfs attributes (binary or not). - Tweak sysfs_deactivate to only do something on attributes - Move lockdep initialization into sysfs_file_add_mode to limit it to just attributes. Signed-off-by: Eric W. Biederman <[email protected]> Acked-by: WANG Cong <[email protected]> Cc: Tejun Heo <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-03-07sysfs: Remove sysfs_get/put_active_twoEric W. Biederman4-77/+38
It turns out that holding an active reference on a directory is pointless. The purpose of the active references are to allows us to block when removing sysfs entries that have custom methods so we don't remove modules while running modular code and to keep those custom methods from accessing data structures after the files have been removed. Further sysfs_remove_dir remove all elements in the directory before removing the directory itself, so there is no chance we will remove a directory with active children. Signed-off-by: Eric W. Biederman <[email protected]> Cc: Tejun Heo <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-03-07Driver core: Fix first line of kernel-doc for a few functionsBen Hutchings2-9/+9
The function name must be followed by a space, hypen, space, and a short description. Signed-off-by: Ben Hutchings <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-03-07UIO: Remove SMX Cryptengine driverHans J. Koch3-152/+0
Ben Nizette, the author of this driver, told me in a private mail that this project has been cancelled. He suggested to remove the driver for now, and will come back with a new version should the hardware really exist. This patch completely removes the driver. Signed-off-by: Hans J. Koch <[email protected]> Acked-by: Ben Nizette <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-03-07UIO: minor Kconfig fixesJohn Ogness1-1/+1
Two trivial fixes for the Userspace IO Kconfig file: 1) uio_sercos3 is a PCI driver, so let it depend on PCI. 2) "default n" under UIO_PCI_GENERIC is luxury since it is already the default. Acked-by: John Ogness <[email protected]> Signed-off-by: Hans J. Koch <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-03-07UIO: Add a driver for Hilscher netX-based fieldbus cardsHans J. Koch3-0/+184
This patch adds a Userspace IO driver for netX-based fieldbus cards by Hilscher (see http://www.hilscher.com). ATM, cifX and comX cards are supported. The userspace part for this driver is provided by Hilscher and should come with the card. The driver is in use for several months now and has been tested by people at Hilscher and Linutronix. Signed-off-by: Hans J. Koch <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-03-07auxdisplay: move cfag12864bfb's probe function to .devinit.textUwe Kleine-König1-1/+1
A pointer to cfag12864bfb_probe is passed to the core via platform_driver_register and so the function must not disappear when the .init sections are discarded. Otherwise (if also having HOTPLUG=y) unbinding and binding a device to the driver via sysfs will result in an oops as does a device being registered late. An alternative to this patch is using platform_driver_probe instead of platform_driver_register plus removing the pointer to the probe function from the struct platform_driver. Signed-off-by: Uwe Kleine-König <[email protected]> Acked-by: Miguel Ojeda <[email protected]> Cc: Andrew Morton <[email protected]> Cc: Avuton Olrich <[email protected]> Cc: Antonino Daplas <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-03-07media: move omap24xxcam's probe function to .devinit.textUwe Kleine-König1-1/+1
A pointer to omap24xxcam_probe is passed to the core via platform_driver_register and so the function must not disappear when the .init sections are discarded. Otherwise (if also having HOTPLUG=y) unbinding and binding a device to the driver via sysfs will result in an oops as does a device being registered late. An alternative to this patch is using platform_driver_probe instead of platform_driver_register plus removing the pointer to the probe function from the struct platform_driver. Signed-off-by: Uwe Kleine-König <[email protected]> Acked-by: Sakari Ailus <[email protected]> Acked-by: Trilok Soni <[email protected]> Cc: Hans Verkuil <[email protected]> Cc: Mauro Carvalho Chehab <[email protected]> Cc: Andrew Morton <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-03-07w1: move omap_hdq's probe function to .devinit.textUwe Kleine-König1-2/+2
A pointer to omap_hdq_probe is passed to the core via platform_driver_register and so the function must not disappear when the .init sections are discarded. Otherwise (if also having HOTPLUG=y) unbinding and binding a device to the driver via sysfs will result in an oops as does a device being registered late. An alternative to this patch is using platform_driver_probe instead of platform_driver_register plus removing the pointer to the probe function from the struct platform_driver. Signed-off-by: Uwe Kleine-König <[email protected]> Cc: Stanley.Miao <[email protected]> Acked-by: Evgeniy Polyakov <[email protected]> Cc: Andrew Morton <[email protected]> Cc: Madhusudhan Chikkature <[email protected]> Cc: Felipe Balbi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-03-07i2c: move i2c_omap's probe function to .devinit.textUwe Kleine-König1-1/+1
A pointer to omap_i2c_probe is passed to the core via platform_driver_register and so the function must not disappear when the .init sections are discarded. Otherwise (if also having HOTPLUG=y) unbinding and binding a device to the driver via sysfs will result in an oops as does a device being registered late. An alternative to this patch is using platform_driver_probe instead of platform_driver_register plus removing the pointer to the probe function from the struct platform_driver. Signed-off-by: Uwe Kleine-König <[email protected]> Cc: Kalle Jokiniemi <[email protected]> Cc: Tony Lindgren <[email protected]> Cc: Paul Walmsley <[email protected]> Cc: Richard Woodruff <[email protected]> Cc: chandra shekhar <[email protected]> Cc: Jason P Marini <[email protected]> Cc: Syed Mohammed Khasim <[email protected]> Cc: Jarkko Nikula <[email protected]> Cc: Juha Yrjola <[email protected]> Cc: Andrew Morton <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-03-07x86: move hp-wmi's probe function to .devinit.textUwe Kleine-König1-2/+2
A pointer to hp_wmi_bios_setup is passed to the core via platform_driver_register and so the function must not disappear when the .init sections are discarded. Otherwise (if also having HOTPLUG=y) unbinding and binding a device to the driver via sysfs will result in an oops as does a device being registered late. An alternative to this patch is using platform_driver_probe instead of platform_driver_register plus removing the pointer to the probe function from the struct platform_driver. Signed-off-by: Uwe Kleine-König <[email protected]> Cc: Frans Pop <[email protected]> Cc: Larry Finger <[email protected]> Cc: Len Brown <[email protected]> Cc: Helge Deller <[email protected]> Cc: Andrew Morton <[email protected]> Acked-by: Matthew Garrett <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-03-07platform-drivers: move probe to .devinit.text in drivers/videoUwe Kleine-König17-18/+18
A pointer to a probe callback is passed to the core via platform_driver_register and so the function must not disappear when the .init sections are discarded. Otherwise (if also having HOTPLUG=y) unbinding and binding a device to the driver via sysfs will result in an oops as does a device being registered late. An alternative to this patch is using platform_driver_probe instead of platform_driver_register plus removing the pointer to the probe function from the struct platform_driver. Signed-off-by: Uwe Kleine-König <[email protected]> Cc: Adrian Bunk <[email protected]> Cc: Alberto Mardegan <[email protected]> Cc: Andrew Morton <[email protected]> Cc: Andriy Skulysh <[email protected]> Cc: Antonino Daplas <[email protected]> Cc: Anton Vorontsov <[email protected]> Cc: Ben Dooks <[email protected]> Cc: Chandramouli Narayanan <[email protected]> Cc: Christoph Hellwig <[email protected]> Cc: Frans Pop <[email protected]> Cc: Geert Uytterhoeven <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Cc: Helge Deller <[email protected]> Cc: Huang Ying <[email protected]> Cc: Ian Molton <[email protected]> Cc: Joshua Kinard <[email protected]> Cc: Kaj-Michael Lang <[email protected]> Cc: Krzysztof Helt <[email protected]> Cc: [email protected] Cc: Maciej W. Rozycki <[email protected]> Cc: Magnus Damm <[email protected]> Cc: Martin Michlmayr <[email protected]> Cc: Matthias Kaehlcke <[email protected]> Cc: Paul Mundt <[email protected]> Cc: Pavel Machek <[email protected]> Cc: Philipp Zabel <[email protected]> Cc: Richard Purdie <[email protected]> Cc: Roel Kluin <[email protected]> Cc: Roland Stigge <[email protected]> Cc: Russell King <[email protected]> Cc: Thomas Bogendoerfer <[email protected]> Cc: Vincent Sanders <[email protected]> Cc: Yoichi Yuasa <[email protected]> Acked-by: Ralf Baechle <[email protected]> Acked-by: Arnaud Patard <[email protected]> Acked-by: James Simmons <[email protected]> Acked-by: Peter Jones <[email protected]> Acked-by: Jaya Kumar <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-03-07platform-drivers: move probe to .devinit.text in drivers/scsiUwe Kleine-König2-2/+2
A pointer to a probe callback is passed to the core via platform_driver_register and so the function must not disappear when the .init sections are discarded. Otherwise (if also having HOTPLUG=y) unbinding and binding a device to the driver via sysfs will result in an oops as does a device being registered late. An alternative to this patch is using platform_driver_probe instead of platform_driver_register plus removing the pointer to the probe function from the struct platform_driver. Signed-off-by: Uwe Kleine-König <[email protected]> Cc: Andrew Morton <[email protected]> Cc: David Brownell <[email protected]> Cc: Dmitri Vorobiev <[email protected]> Cc: Henrik Kretzschmar <[email protected]> Cc: James Bottomley <[email protected]> Cc: Kay Sievers <[email protected]> Cc: peter fuerst <[email protected]> Cc: Thomas Bogendoerfer <[email protected]> Acked-by: Ralf Baechle <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-03-07platform-drivers: move probe to .devinit.text in arch/armUwe Kleine-König4-4/+4
A pointer to a probe callback is passed to the core via platform_driver_register and so the function must not disappear when the .init sections are discarded. Otherwise (if also having HOTPLUG=y) unbinding and binding a device to the driver via sysfs will result in an oops as does a device being registered late. An alternative to this patch is using platform_driver_probe instead of platform_driver_register plus removing the pointer to the probe function from the struct platform_driver. Signed-off-by: Uwe Kleine-König <[email protected]> Cc: Andrew Morton <[email protected]> Cc: Ben Dooks <[email protected]> Cc: Dmitry Baryshkov <[email protected]> Cc: Eric Miao <[email protected]> Cc: Liam Girdwood <[email protected]> Cc: Paul Sokolovsky <[email protected]> Cc: Richard Purdie <[email protected]> Cc: Russell King <[email protected]> Acked-by: Arnaud Patard <[email protected]> Acked-by: Dmitry Eremin-Solenikov <[email protected]> Acked-by: Kristoffer Ericson <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-03-07Driver core: make struct platform_driver.id_table constUwe Kleine-König2-2/+2
This fixes a warning on several pxa based machines: arch/arm/mach-pxa/ssp.c:475: warning: initialization discards qualifiers from pointer target type Signed-off-by: Uwe Kleine-König <[email protected]> Acked-by: Vikram Dhillon <[email protected]> Acked-by: Eric Miao <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-03-07Driver core: Constify struct sysfs_ops in struct kobj_typeEmese Revfy54-70/+69
Constify struct sysfs_ops. This is part of the ops structure constification effort started by Arjan van de Ven et al. Benefits of this constification: * prevents modification of data that is shared (referenced) by many other structure instances at runtime * detects/prevents accidental (but not intentional) modification attempts on archs that enforce read-only kernel data at runtime * potentially better optimized code as the compiler can assume that the const data cannot be changed * the compiler/linker move const data into .rodata and therefore exclude them from false sharing Signed-off-by: Emese Revfy <[email protected]> Acked-by: David Teigland <[email protected]> Acked-by: Matt Domsch <[email protected]> Acked-by: Maciej Sosnowski <[email protected]> Acked-by: Hans J. Koch <[email protected]> Acked-by: Pekka Enberg <[email protected]> Acked-by: Jens Axboe <[email protected]> Acked-by: Stephen Hemminger <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-03-07sysdev: fix up the probe/release attributesGreg Kroah-Hartman1-8/+8
These should be sysdev attributes, not class attributes. This patch should resolve the problem. Thanks to Stephen Rothwell for pointing out the problem. Reported-by: Stephen Rothwell <[email protected]> Cc: Andi Kleen <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-03-07HOWTO: Updates on subsystem trees, patchwork, -next (vs. -mm)Stefan Richter1-77/+36
One of the roles which -mm fulfilled some time ago (to offer an integration testing ground) has been taken over by -next. This is still news to Documentation/HOWTO, so mention it there. Also add a word on how patchwork is used to track patches as they make their way into subsystem trees. Remove some arbitrary links to subsystem repositories; they can all be found in the MAINTAINERS database. Acked-by: Randy Dunlap <[email protected]> Signed-off-by: Stefan Richter <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-03-07kobject: Constify struct kset_uevent_opsEmese Revfy9-14/+14
Constify struct kset_uevent_ops. This is part of the ops structure constification effort started by Arjan van de Ven et al. Benefits of this constification: * prevents modification of data that is shared (referenced) by many other structure instances at runtime * detects/prevents accidental (but not intentional) modification attempts on archs that enforce read-only kernel data at runtime * potentially better optimized code as the compiler can assume that the const data cannot be changed * the compiler/linker move const data into .rodata and therefore exclude them from false sharing Signed-off-by: Emese Revfy <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-03-07driver-core: firmware_class: remove base.h header inclusionLuis R. Rodriguez1-1/+0
base.h is used by base drivers for sharing internal structures. Turns out firmware_class does not depend on it at all so remove it. Cc: Johannes Berg <[email protected]> Signed-off-by: Luis R. Rodriguez <[email protected]> Acked-by: Marcel Holtmann <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-03-07sysfs: Cache the last sysfs_dirent to improve readdir scalability v2Eric W. Biederman1-22/+60
When sysfs_readdir stops short we now cache the next sysfs_dirent to return to user space in filp->private_data. There is no impact on the rest of sysfs by doing this and in the common case it allows us to pick up exactly where we left off with no seeking. Additionally I drop and regrab the sysfs_mutex around filldir to avoid a page fault abritrarily increasing the hold time on the sysfs_mutex. v2: Returned to using INT_MAX as the EOF condition. seekdir is ambiguous unless all directory entries have a unique f_pos value. Fixes http://bugzilla.kernel.org/show_bug.cgi?id=14949 Signed-off-by: Eric W. Biederman <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-03-07Driver-Core: require valid action string in uevent triggerKay Sievers1-8/+3
No longer fall back to "add" and warn, but always require a valid action-string written to the "uevent" file. Signed-off-by: Kay Sievers <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-03-07Driver-Core: disable /sbin/hotplug by defaultKay Sievers1-1/+9
No recent mainstream system uses the /sbin/hotplug fork-bomb any more. Disable it by default to reflect how it is used these days. Signed-off-by: Kay Sievers <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>