Archived
14
0
Fork 0
Commit graph

187118 commits

Author SHA1 Message Date
Michal Simek
d3afa58c20 microblaze: Add core PCI files
Add pci-common.h and pci32.c. Files are based on PPC version.
There are removed ppc specific parts and the code was completely
clean.

Signed-off-by: Michal Simek <monstr@monstr.eu>
2010-03-11 14:03:22 +01:00
Michal Simek
2ed975b43c microblaze: Add pci-bridge.h
Add pci-bridge.h for Microblaze. It is based on powerpc header file.
My changes:
I removed PPC_ prefix from constants
Removed ppc64 specifis parts

Signed-off-by: Michal Simek <monstr@monstr.eu>
2010-03-11 14:01:43 +01:00
Michal Simek
830980a0a8 microblaze: Add pci.h
Add pci.h for microblaze. It is based on powerpc pci.h

Signed-off-by: Michal Simek <monstr@monstr.eu>
2010-03-11 14:00:43 +01:00
Michal Simek
2ddafeab6f microblaze: io.h include asm-generic/iomap.h
I need to use generic/iomap.h for PCI that's why is necessary
to include it and fix ioport_{map,unmap} functions.

Signed-off-by: Michal Simek <monstr@monstr.eu>
2010-03-11 14:00:09 +01:00
Michal Simek
c6ba01a4c7 microblaze: Add irq_create_{of_,}mapping functions
Support function for PCI. We don't use any advance mapping mechanism
that's why implementation is simple.

Signed-off-by: Michal Simek <monstr@monstr.eu>
2010-03-11 13:59:28 +01:00
Michal Simek
a84642a339 microblaze: Add {z,}alloc_maybe_bootmem functions
I will need {z,}alloc_maybe_bootmem functions for pci patches

Signed-off-by: Michal Simek <monstr@monstr.eu>
2010-03-11 13:59:02 +01:00
Michal Simek
2549edd353 microblaze: Implement __dma_sync_page
There is necessary to do some cache handling for dma operations.

Signed-off-by: Michal Simek <monstr@monstr.eu>
2010-03-11 13:58:11 +01:00
Michal Simek
ccfe27d700 microblaze: Support DMA
Add DMA support for Microblaze. There are some part of this new feature:
1. Basic DMA support
2. Enable DMA debug option
3. Setup notifier

Ad 1. dma-mapping come from powerpc and x86 version and it is based on
generic dma-mapping-common.h

Ad 2. DMA support debug features which is used in generic file.
For more information please look at Documentation/DMA-API.txt

Ad 3. notifier is very important to setup dma_ops. Without this part
for example ll_temac driver failed because there are no setup dma operations.

Signed-off-by: Michal Simek <monstr@monstr.eu>
2010-03-11 13:56:29 +01:00
Linus Torvalds
522dba7134 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6:
  PCI/PM Runtime: Make runtime PM of PCI devices inactive by default
2010-03-08 16:10:29 -08:00
Linus Torvalds
51d0f6d1f5 Merge git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable
* git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable:
  Btrfs: kfree correct pointer during mount option parsing
  Btrfs: use RB_ROOT to intialize rb_trees instead of setting rb_node to NULL
2010-03-08 14:07:53 -08:00
Josef Bacik
da495ecc0f Btrfs: kfree correct pointer during mount option parsing
We kstrdup the options string, but then strsep screws with the pointer,
so when we kfree() it, we're not giving it the right pointer.

Tested-by: Andy Lutomirski <luto@mit.edu>

Signed-off-by: Chris Mason <chris.mason@oracle.com>
2010-03-08 16:26:50 -05:00
Eric Paris
6bef4d3171 Btrfs: use RB_ROOT to intialize rb_trees instead of setting rb_node to NULL
btrfs inialize rb trees in quite a number of places by settin rb_node =
NULL;  The problem with this is that 17d9ddc72f in the
linux-next tree adds a new field to that struct which needs to be NULL for
the new rbtree library code to work properly.  This patch uses RB_ROOT as
the intializer so all of the relevant fields will be NULL'd.  Without the
patch I get a panic.

Signed-off-by: Eric Paris <eparis@redhat.com>
Acked-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2010-03-08 16:26:50 -05:00
Linus Torvalds
57d54889cd Linux 2.6.34-rc1 2010-03-08 10:45:44 -08:00
Linus Torvalds
e10154189f Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6
* 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.
  ...
2010-03-08 10:17:20 -08:00
Linus Torvalds
d4bab1b091 Merge git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog
* git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog:
  [WATCHDOG] i6300esb.c: change platform_driver to pci_driver
  [WATCHDOG] i6300esb: fix unlock register with
  [WATCHDOG] drivers/watchdog/wdt.c:wdt_ioctl(): make `ident' non-static
  [WATCHDOG] change reboot_notifier to platform-shutdown method.
  [WATCHDOG] watchdog_info constify
  [WATCHDOG] gef_wdt: Author corrections following split of GE Fanuc joint venture
  [WATCHDOG] iTCO_wdt: clean up probe(), modify err msg
  [WATCHDOG] ep93xx: watchdog timer driver for TS-72xx SBCs cleanup
  [WATCHDOG] support for max63xx watchdog timer chips
  [WATCHDOG] ep93xx: added platform side support for TS-72xx WDT driver
  [WATCHDOG] ep93xx: implemented watchdog timer driver for TS-72xx SBCs
2010-03-08 07:35:30 -08:00
Linus Torvalds
56b78921c3 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: (26 commits)
  ALSA: hdmi - show debug message on changing audio infoframe
  ALSA: hdmi - merge common code for intelhdmi and nvhdmi
  ALSA: hda - Add ASRock mobo to MSI blacklist
  ALSA: hda: uninitialized variable fix
  ALSA: hda: Use LPIB for a Biostar Microtech board
  ALSA: usb/audio.h: Fix field order
  ALSA: fix jazz16 compile (udelay)
  ALSA: hda: Use LPIB for Dell Latitude 131L
  ALSA: hda - Build hda_eld into snd-hda-codec module
  ALSA: hda - Support NVIDIA MCP89 and GT21x hdmi audio
  ALSA: hda - Support max codecs to 8 for nvidia hda controller
  ALSA: riptide: clean up while loop
  ALSA: usbaudio - remove debug "SAMPLE BYTES" printk line
  ALSA: timer - pass real event in snd_timer_notify1() to instance callback
  ALSA: oxygen: change || to &&
  ALSA: opti92x: use PnP data to select Master Control port
  ASoC: fix ak4104 register array access
  ASoC: soc_pcm_open: Add missing bailout tag
  ALSA: usbaudio: Fix wrong bitrate for Creative Creative VF0470 Live Cam
  ALSA: ua101: removing debugging code
  ...
2010-03-08 07:34:26 -08:00
Linus Torvalds
3c443cbc1d Merge branch 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6
* 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6:
  [S390] smsgiucv_app: deliver z/VM CP special messages (SMSG) as uevents
  [S390] smsgiucv: declare char pointers as "const"
  [S390] dasd: automatic recognition of read-only devices
  [S390] remove unused qdio flags in zfcp and qeth
  [S390] Cleanup xtime usage
  [S390] qdio: add missing bracket
  [S390] cio: fix init_count in case of recognition after steal lock
  [S390] dasd: security and PSF update patch for EMC CKD ioctl
  [S390] hvc_iucv: allocate memory buffers for IUCV in zone DMA
  [S390] uaccess: make sure copy_from_user_overflow is builtin
2010-03-08 07:33:46 -08:00
Christian Kujau
d4014030d2 FS-Cache: Remove the EXPERIMENTAL flag
Remove the EXPERIMENTAL flag from FS-Cache so that Ubuntu can make use of the
facility.

Signed-off-by: Christian Kujau <lists@nerdbynature.de>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-03-08 07:32:34 -08:00
Wim Van Sebroeck
2786095a58 [WATCHDOG] i6300esb.c: change platform_driver to pci_driver
Since the intel 6300esb platform uses a dedicated PCI ID for
it's watchdog timer (00:1d.4), it's better and easier to have
this as a pci_driver.

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2010-03-08 13:48:01 +00:00
Hendrik Brueckner
1ffaa640c6 [S390] smsgiucv_app: deliver z/VM CP special messages (SMSG) as uevents
The smsgiucv_app driver registers a callback with the smsgiucv driver
to receive z/VM CP special messages (SMSG) starting with "APP".

When the callback is called for special messages, the driver creates
an uevent for the received message.  The uevent consists of additional
environment data containing the message prefix ("APP"), message sender,
and message content.

udev rules can be used to trigger application specific actions through
matching the content or sender of the special message.

Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2010-03-08 12:26:28 +01:00
Hendrik Brueckner
09003ed90a [S390] smsgiucv: declare char pointers as "const"
Declare the smsgiucv prefix char pointer as "const" and use
use const char pointers in callback functions.

Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2010-03-08 12:26:28 +01:00
Stefan Weinhuber
33b62a30f7 [S390] dasd: automatic recognition of read-only devices
In z/VM it is possible to attach a device as read-only. To prevent
unintentional write requests and subsequent I/O errors, we can detect
this configuration using the z/VM DIAG 210 interface and set the
respective linux block device to read-only as well.

Signed-off-by: Stefan Weinhuber <wein@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2010-03-08 12:26:27 +01:00
Ursula Braun
584dfddfce [S390] remove unused qdio flags in zfcp and qeth
zfcp and qeth are setting flags for the qdio-layer, but these flags
are not used in qdio. Patch removes the flag definitions from qdio
and their settings in zfcp and qeth.

Cc: Jan Glauber <jang@linux.vnet.ibm.com>
Cc: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2010-03-08 12:25:30 +01:00
John Stultz
b1e2ba8da9 [S390] Cleanup xtime usage
This replaces direct xtime usage in the s390 arch with timekeeping accessors,
so we can further clean up the timekeeping core.

Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: John Stultz <johnstul@us.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2010-03-08 12:25:30 +01:00
Ursula Braun
bd6e8a162e [S390] qdio: add missing bracket
Add a missing bracket to only log the outbound handler event in the
appropriate case.

Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2010-03-08 12:25:30 +01:00
Sebastian Ott
a290156f47 [S390] cio: fix init_count in case of recognition after steal lock
After we try to steal a lock on a ccw device in boxed state,
we have to restart device recognition and potentially reprobing.

In this case ccw_device_init_count was erroneously decreased
twice. This patch fixes the issue.

Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2010-03-08 12:25:30 +01:00
Nigel Hislop
52898025cf [S390] dasd: security and PSF update patch for EMC CKD ioctl
Remove the PSF order/suborder check from the Symmetrix CKD dasd ioctl.
In exchange restrict the ioctl to CAP_SYS_ADMIN and CAP_SYS_RAWIO.

Signed-off-by: Nigel Hislop <hislop_nigel@emc.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2010-03-08 12:25:30 +01:00
Hendrik Brueckner
91a970d988 [S390] hvc_iucv: allocate memory buffers for IUCV in zone DMA
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 <brueckner@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2010-03-08 12:25:29 +01:00
Heiko Carstens
596a95cdf0 [S390] uaccess: make sure copy_from_user_overflow is builtin
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 <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2010-03-08 12:25:29 +01:00
Wim Van Sebroeck
39f3be72c1 [WATCHDOG] i6300esb: fix unlock register with
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 <wim@iguana.be>
2010-03-08 11:02:38 +00:00
Takashi Iwai
a3087ae970 Merge branch 'topic/misc' into for-linus 2010-03-08 09:35:50 +01:00
Takashi Iwai
f0f20a1698 Merge branch 'topic/asoc' into for-linus 2010-03-08 09:35:48 +01:00
Takashi Iwai
f1cf9a666d Merge branch 'topic/hda' into for-linus 2010-03-08 09:35:43 +01:00
Wu Fengguang
2abbf4391f ALSA: hdmi - show debug message on changing audio infoframe
Also change printk level for the two others.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-03-08 08:21:25 +01:00
Wu Fengguang
079d88ccc3 ALSA: hdmi - merge common code for intelhdmi and nvhdmi
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 <wni@nvidia.com>
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-03-08 08:21:08 +01:00
Randy Dunlap
410c176519 msi-laptop: depends on RFKILL
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>
2010-03-07 17:04:53 -08:00
Lee, Chun-Yi
e22388e71b msi-laptop: Detect 3G device exists by standard ec command
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>
2010-03-07 17:04:53 -08:00
Lee, Chun-Yi
ec766278ba msi-laptop: Add resume method for set the SCM load again
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>
2010-03-07 17:04:53 -08:00
Lee, Chun-Yi
472ea12d1a msi-laptop: Support some MSI 3G netbook that is need load SCM
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>
2010-03-07 17:04:53 -08:00
Lee, Chun-Yi
fc0dc4c926 msi-laptop: Add threeg sysfs file for support query 3G state by standard 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>
2010-03-07 17:04:53 -08:00
Lee, Chun-Yi
46d0e9e091 msi-laptop: Support standard ec 66/62 command on MSI notebook and nebook
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>
2010-03-07 17:04:52 -08:00
Greg Kroah-Hartman
8e9394ce24 Driver core: create lock/unlock functions for struct device
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>
2010-03-07 17:04:52 -08:00
Stephen Rothwell
62e877b893 sysfs: fix for thinko with sysfs_bin_attr_init()
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>
2010-03-07 17:04:52 -08:00
Eric W. Biederman
0f4288ec6f sysfs: Kill unused sysfs_sb variable.
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>
2010-03-07 17:04:52 -08:00
Eric W. Biederman
fac2622bba sysfs: Pass super_block to sysfs_get_inode
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>
2010-03-07 17:04:52 -08:00
Eric W. Biederman
2354dcc721 driver core: Use sysfs_rename_link in device_rename
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>
2010-03-07 17:04:52 -08:00
Eric W. Biederman
7cb32942d9 sysfs: Implement sysfs_rename_link
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>
2010-03-07 17:04:52 -08:00
Eric W. Biederman
19c38b632d sysfs: Pack sysfs_dirent more tightly.
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>
2010-03-07 17:04:52 -08:00
Eric W. Biederman
f8d4f618fe sysfs: Serialize updates to the vfs inode
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>
2010-03-07 17:04:52 -08:00
Johannes Berg
b35c74dab6 sysfs: windfarm: init sysfs attributes
This is required for lockdep.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-07 17:04:51 -08:00