summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Input: Add support of Synaptics Clickpad deviceTakashi Iwai2010-04-202-5/+34
| | | | | | | | | | | | | | | The new type of touchpads can be detected via a new query command 0x0c. The clickpad flags are in cap[0]:4 and cap[1]:0 bits. When the device is detected, the driver now reports only the left button as the supported buttons so that X11 driver can detect that the device is Clickpad. A Clickpad device gives the button events only as the middle button. The kernel driver morphs to the left button. The real handling of Clickpad is done rather in X driver side. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Revert "Input: ALPS - add signature for HP Pavilion dm3 laptops"Dmitry Torokhov2010-04-201-1/+0Star
| | | | | | This reverts commit 5e28d8eb68c12eab9c4a47b42ba993a6420d71d3 since the magic knock does not work for this model of the touchpad and the device stays in PS/2 compatibility mode.
* Input: psmouse - ignore parity error for basic protocolsDmitry Torokhov2010-04-192-3/+16
| | | | | | | | | | | | | | | | Observing behavior of the other OS it appears that parity errors reported by the keyboard controller are being ignored and the data is processed as usual. Let's do the same for standard PS/2 protocols (bare, Intellimouse and Intellimouse Explorer) to provide better compatibility. Thsi should fix teh following bug: https://bugzilla.kernel.org/show_bug.cgi?id=6105 Thanks for Damjan Jovanovic for locating the source of issue and ideas for the patch. Tested-by: Damjan Jovanovic <damjan.jov@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: wacom - switch mode upon system resumePing Cheng2010-04-151-5/+7
| | | | | | | | | | | | | | | | When Wacom devices wake up from a sleep, the switch mode command (wacom_query_tablet_data) is needed before wacom_open is called. wacom_query_tablet_data should not be executed inside wacom_open since wacom_open is called more than once during probe. wacom_retrieve_hid_descriptor is removed from wacom_resume due to the fact that the required descriptors are stored properly upon system resume. Reported-and-tested-by: Anton Anikin <Anton@Anikin.name> Signed-off-by: Ping Cheng <pingc@wacom.com> Cc: stable@kernel.org Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Revert "Input: wacom - merge out and in prox events"Dmitry Torokhov2010-04-141-59/+104
| | | | | | | | | This reverts commit 776943fd6f104a6e8457dc95a17282e69e963666 as it causes issues with ISDv4 E3 touchscreens: https://bugzilla.kernel.org/show_bug.cgi?id=15670 Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: matrix_keypad - allow platform to disable key autorepeatH Hartley Sweeten2010-04-062-1/+5
| | | | | | | | | | | | | | | In an embedded system the matrix_keypad driver might be used to interface with an external control panel and not an actual keyboard. On the control panel some of the keys could be used to turn on/off various functions. If key autorepeat is enabled this causes the function to quickly toggle between the on and off states and makes operation difficult. Add an option in the platform-specific data to disable the key autorepeat. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: ALPS - add signature for HP Pavilion dm3 laptopsChase Douglas2010-04-061-0/+1
| | | | | | | | | | Tested by a user running Ubuntu 9.10 in the following bug report. BugLink: http://bugs.launchpad.net/bugs/545307 Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Cc: stable@kernel.org Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: i8042 - spelling fixDominik Brodowski2010-04-061-1/+1
| | | | | Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: sparse-keymap - implement safer freeing of the keymapDmitry Torokhov2010-03-222-19/+40
| | | | | | | | | Allow calling sparse_keymap_free() before unregistering input device whithout risk of racing with EVIOCGETKEYCODE and EVIOCSETKEYCODE. This makes life of drivers writers easier. Acked-by: Yong Wang <yong.y.wang@intel.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: update the status of the Multitouch X driver projectHenrik Rydberg2010-03-221-6/+1Star
| | | | | | | | The Multitouch X driver project has moved to alpha status. This patch updates the documentation accordingly. Signed-off-by: Henrik Rydberg <rydberg@euromail.se> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: clarify the no-finger event in multitouch protocolHenrik Rydberg2010-03-221-0/+16
| | | | | | | | | | The current documentation does not explicitly specify how to report zero fingers, leaving a potential problem in the driver implementations and giving no parsing directive to userland. This patch defines two equally valid ways. Signed-off-by: Henrik Rydberg <rydberg@euromail.se> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: bcm5974 - retract efi-broken suspend_resumeHenrik Rydberg2010-03-201-1/+0Star
| | | | | | | | | | | | | | | | | | | | With the recent system-wide improvements on suspend/resume and EFI booting the suspend_resume method of the bcm5974 has broken. When waking up from the S3 state on the MacBookAir, the trackpad is found in a yet unknown state, unable to switch to the proper multitouch mode. The result is a frozen touchpad, and a flood of errors of the kind bcm5974: bad trackpad package, length: 8. This patch retracts the reset_resume method altogether, falling back on the generic unbind/rebind functionality of the usb layer until further investigations can be made as how to reset the device when booting from efi. Signed-off-by: Henrik Rydberg <rydberg@euromail.se> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: sparse-keymap - free the right keymap on errorYong Wang2010-03-201-1/+1
| | | | | | | | | 'map' is allocated in sparse_keymap_setup() and it it the one that should be freed on error instead of 'keymap'. Signed-off-by: Yong Wang <yong.y.wang@intel.com> Cc: stable@kernel.org Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: i8042 - add ALDI/MEDION netbook E1222 to qurik reset tableChristoph Fritz2010-03-141-0/+7
| | | | | | | | | | ALDI/MEDION netbook E1222 needs to be in the reset quirk list for its touchpad's proper function. Reported-by: Michael Fischer <mifi@gmx.de> Signed-off-by: Christoph Fritz <chf.fritz@googlemail.com> Cc: stable@kernel.org Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: ALPS - fix stuck buttons on some touchpadsMartin Buck2010-03-141-30/+17Star
| | | | | | | | | | Enable button release event redirection to the device that got the button press not only for touchpads with interleaved protocols, but unconditionally for all Alps touchpads. This is required at least for the touchpads in Dell Inspiron 8200 and Latitude d630. Signed-off-by: Martin Buck <mb-tmp-yvahk-vachg@gromit.dyndns.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: wm831x-on - convert to use genirqMark Brown2010-03-111-4/+5
| | | | | | | | | | | | | Now that the WM831x core has been converted to use genirq for the interrupt controller there is no need for the client drivers to use a WM831x-specific API rather than just calling genirq directly. Also fixes a leak of the IRQ during init failure - the error path free_irq() was using NULL rather than the driver data as the data pointer so free_irq() wouldn't have matched. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: ads7846 - add wakeup supportRanjith Lohithakshan2010-03-112-0/+11
| | | | | | | | | Add wakeup support to the ads7846 driver. Platforms can enable wakeup capability by setting the wakeup flag in ads7846_platform_data. With this patch the ads7846 driver can be used to wake the system from suspend. Signed-off-by: Ranjith Lohithakshan <ranjithl@ti.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: appletouch - fix integer overflow issueVadim Zaliva2010-03-111-3/+3
| | | | | | | | | | | | | | | | | When reading data from Geyser 2 touchpads used on post Oct 2005 Apple PowerBooks the driver was casting X and Y coordinates values to 'signed char'. Testing on one of such PowerBooks I have noticed that touchpad always generates positive values, but some of them are greater that 127, and thus, when cast to 'signed char' being interpreted as a negative. Such bigger values have been observed infrequently, closer to the edges of a touchpad, so the problem was not very visible. Nevertheless, the patch would potentially improve touchpad driver accuracy. Signed-off-by: Vadim Zaliva <lord@crocodile.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: ad7877 - increase pen up imeoutMichael Hennerich2010-03-101-1/+1
| | | | | | | | | | | | | | | | | The time interval between consecutive interrupts depends on a number of tunables: first_conversion_delay, acquisition_time, averaging and foremost the pen_down_acc_interval. Since the mod_timer() action for the PEN UP event happens in the spi_async() callback function, latencies incurred by the spi bus drivers also need to be taken into account. So all in all, give the PEN UP event a bit more wiggle room and increase timeout to 100ms. Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: ads7846 - add support for AD7843 partsMichael Hennerich2010-03-103-5/+16
| | | | | | | | | | | | | | The AD7873 is almost identical to the ADS7846; the only difference is related to the Power Management bits PD0 and PD1. This results in a slightly different PENIRQ enable behavior. For the AD7873, VREF should be turned off during differential measurements. So, add the AD7873/43 to the list of driver supported devices, and prevent VREF usage during differential/ratiometric conversion modes. Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: bf54x-keys - fix system hang when pressing a keyMike Frysinger2010-03-101-1/+1
| | | | | | | | | | We need to use the nosync version of disable_irq so that we don't hang in the IRQ handler as we don't ACK the interrupt until later. This used to work regardless, but at some point, the IRQ behavior changed. Not sure when exactly. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: alps - add support for the touchpad on Toshiba Tecra A11-11LThomas Bächler2010-03-101-0/+2
| | | | | | Signed-off-by: Thomas Bächler <thomas@archlinux.org> Cc: stable@kernel.org Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: remove BKL, fix input_open_file() lockingArnd Bergmann2010-03-101-8/+10
| | | | | | | | | | | | | Holding the BKL in input_open_file seems pointless because it does not protect against updates of input_table, and all open functions from the underlying drivers have proper mutex locking. This makes input_open_file take the input_mutex when accessing the table and no lock when calling into the lower function. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: serio_raw - remove BKLThadeu Lima de Souza Cascardo2010-03-101-6/+5Star
| | | | | | | | | serio_raw open function already uses a mutex. Also change formatting a bit. Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: mousedev - remove BKLThadeu Lima de Souza Cascardo2010-03-101-6/+0Star
| | | | | | | | | There's no need for BKL in mousedev, relevan protection is provided by a private mutex. Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: add driver for TWL4030 vibrator deviceJari Vanhala2010-03-093-0/+309
| | | | | | | | TWL4030 Vibrator implemented via Force Feedback interface. This uses MFD TWL4030 codec and own dynamic workqueue. Signed-off-by: Jari Vanhala <ext-jari.vanhala@nokia.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: enable remote wakeup for PNP i8042 keyboard portsAlan Stern2010-03-091-0/+3
| | | | | | | | This patch (as1355) enables remote wakeup by default on PNP i8042 keyboard ports. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: scancode in get/set_keycodes should be unsignedDmitry Torokhov2010-03-0914-94/+88Star
| | | | | | | | | | | | The HID layer has some scan codes of the form 0xffbc0000 for logitech devices which do not work if scancode is typed as signed int, so we need to switch to unsigned it instead. While at it keycode being signed does not make much sense either. Acked-by: Márton Németh <nm127@freemail.hu> Acked-by: Matthew Garrett <mjg@redhat.com> Acked-by: Jiri Kosina <jkosina@suse.cz> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: i8042 - use platfrom_create_bundle() helperDmitry Torokhov2010-03-091-16/+8Star
| | | | Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Merge commit 'v2.6.34-rc1' into for-linusDmitry Torokhov2010-03-096816-180186/+422440
|\
| * Linux 2.6.34-rc1Linus Torvalds2010-03-081-2/+2
| |
| * Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6Linus Torvalds2010-03-08145-793/+1463
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6: (62 commits) msi-laptop: depends on RFKILL msi-laptop: Detect 3G device exists by standard ec command msi-laptop: Add resume method for set the SCM load again msi-laptop: Support some MSI 3G netbook that is need load SCM msi-laptop: Add threeg sysfs file for support query 3G state by standard 66/62 ec command msi-laptop: Support standard ec 66/62 command on MSI notebook and nebook Driver core: create lock/unlock functions for struct device sysfs: fix for thinko with sysfs_bin_attr_init() sysfs: Kill unused sysfs_sb variable. sysfs: Pass super_block to sysfs_get_inode driver core: Use sysfs_rename_link in device_rename sysfs: Implement sysfs_rename_link sysfs: Pack sysfs_dirent more tightly. sysfs: Serialize updates to the vfs inode sysfs: windfarm: init sysfs attributes sysfs: Use sysfs_attr_init and sysfs_bin_attr_init on module dynamic attributes sysfs: Document sysfs_attr_init and sysfs_bin_attr_init sysfs: Use sysfs_attr_init and sysfs_bin_attr_init on dynamic attributes sysfs: Use one lockdep class per sysfs attribute. sysfs: Only take active references on attributes. ...
| | * msi-laptop: depends on RFKILLRandy Dunlap2010-03-081-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 <randy.dunlap@oracle.com> Cc: Lennart Poettering <mzxreary@0pointer.de> Cc: Lee, Chun-Yi <jlee@novell.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| | * msi-laptop: Detect 3G device exists by standard ec commandLee, Chun-Yi2010-03-081-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 <jlee@novell.com> Cc: Lennart Poettering <mzxreary@0pointer.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| | * msi-laptop: Add resume method for set the SCM load againLee, Chun-Yi2010-03-081-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 <jlee@novell.com> Cc: Lennart Poettering <mzxreary@0pointer.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| | * msi-laptop: Support some MSI 3G netbook that is need load SCMLee, Chun-Yi2010-03-081-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 <jlee@novell.com> Cc: Lennart Poettering <mzxreary@0pointer.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| | * msi-laptop: Add threeg sysfs file for support query 3G state by standard ↵Lee, Chun-Yi2010-03-081-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 <jlee@novell.com> Cc: Lennart Poettering <mzxreary@0pointer.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| | * msi-laptop: Support standard ec 66/62 command on MSI notebook and nebookLee, Chun-Yi2010-03-081-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 <jlee@novell.com> Cc: Lennart Poettering <mzxreary@0pointer.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| | * Driver core: create lock/unlock functions for struct deviceGreg Kroah-Hartman2010-03-0813-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 <tglx@linutronix.de> Cc: Jean Delvare <khali@linux-fr.org> Cc: Dave Young <hidave.darkstar@gmail.com> Cc: Ming Lei <tom.leiming@gmail.com> Cc: Jiri Kosina <jkosina@suse.cz> Cc: Phil Carmody <ext-phil.2.carmody@nokia.com> Cc: Arjan van de Ven <arjan@linux.intel.com> Cc: Cornelia Huck <cornelia.huck@de.ibm.com> Cc: Rafael J. Wysocki <rjw@sisk.pl> Cc: Pavel Machek <pavel@ucw.cz> Cc: Len Brown <len.brown@intel.com> Cc: Magnus Damm <damm@igel.co.jp> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: Randy Dunlap <randy.dunlap@oracle.com> Cc: Stefan Richter <stefanr@s5r6.in-berlin.de> Cc: David Brownell <dbrownell@users.sourceforge.net> Cc: Vegard Nossum <vegard.nossum@gmail.com> Cc: Jesse Barnes <jbarnes@virtuousgeek.org> Cc: Alex Chiang <achiang@hp.com> Cc: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Andrew Patterson <andrew.patterson@hp.com> Cc: Yu Zhao <yu.zhao@intel.com> Cc: Dominik Brodowski <linux@dominikbrodowski.net> Cc: Samuel Ortiz <sameo@linux.intel.com> Cc: Wolfram Sang <w.sang@pengutronix.de> Cc: CHENG Renquan <rqcheng@smu.edu.sg> Cc: Oliver Neukum <oliver@neukum.org> Cc: Frans Pop <elendil@planet.nl> Cc: David Vrabel <david.vrabel@csr.com> Cc: Kay Sievers <kay.sievers@vrfy.org> Cc: Sarah Sharp <sarah.a.sharp@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| | * sysfs: fix for thinko with sysfs_bin_attr_init()Stephen Rothwell2010-03-082-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 <sfr@canb.auug.org.au> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| | * sysfs: Kill unused sysfs_sb variable.Eric W. Biederman2010-03-082-3/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that there are no more users we can remove the sysfs_sb variable. Acked-by: Tejun Heo <tj@kernel.org> Acked-by: Serge Hallyn <serue@us.ibm.com> Signed-off-by: Eric W. Biederman <ebiederm@aristanetworks.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| | * sysfs: Pass super_block to sysfs_get_inodeEric W. Biederman2010-03-084-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 <tj@kernel.org> Acked-by: Serge Hallyn <serue@us.ibm.com> Signed-off-by: Eric W. Biederman <ebiederm@aristanetworks.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| | * driver core: Use sysfs_rename_link in device_renameEric W. Biederman2010-03-081-12/+6Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't open code the renaming of symlinks in sysfs instead use the new helper function sysfs_rename_link Acked-by: Tejun Heo <tj@kernel.org> Acked-by: Serge Hallyn <serue@us.ibm.com> Signed-off-by: Eric W. Biederman <ebiederm@aristanetworks.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| | * sysfs: Implement sysfs_rename_linkEric W. Biederman2010-03-082-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 <benjamin.thery@bull.net> Cc: Daniel Lezcano <dlezcano@fr.ibm.com> Acked-by: Serge Hallyn <serue@us.ibm.com> Acked-by: Tejun Heo <tj@kernel.org> Signed-off-by: Eric W. Biederman <ebiederm@aristanetworks.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| | * sysfs: Pack sysfs_dirent more tightly.Eric W. Biederman2010-03-081-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 <tj@kernel.org> Signed-off-by: Eric W. Biederman <ebiederm@aristanetworks.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| | * sysfs: Serialize updates to the vfs inodeEric W. Biederman2010-03-081-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 <serue@us.ibm.com> Signed-off-by: Eric W. Biederman <ebiederm@aristanetworks.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| | * sysfs: windfarm: init sysfs attributesJohannes Berg2010-03-082-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | This is required for lockdep. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| | * sysfs: Use sysfs_attr_init and sysfs_bin_attr_init on module dynamic attributesEric W. Biederman2010-03-081-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 <ebiederm@xmission.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| | * sysfs: Document sysfs_attr_init and sysfs_bin_attr_initEric W. Biederman2010-03-081-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 <ebiederm@xmission.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| | * sysfs: Use sysfs_attr_init and sysfs_bin_attr_init on dynamic attributesEric W. Biederman2010-03-084-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 <ebiederm@xmission.com> Acked-by: WANG Cong <xiyou.wangcong@gmail.com> Cc: Tejun Heo <tj@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>