1. 13 3月, 2010 36 次提交
  2. 08 3月, 2010 4 次提交
    • G
      Driver core: create lock/unlock functions for struct device · 8e9394ce
      Greg Kroah-Hartman 提交于
      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: NGreg Kroah-Hartman <gregkh@suse.de>
      
      8e9394ce
    • S
      sysfs: fix for thinko with sysfs_bin_attr_init() · 62e877b8
      Stephen Rothwell 提交于
      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: NStephen Rothwell <sfr@canb.auug.org.au>
      Cc: "Eric W. Biederman" <ebiederm@xmission.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      
      62e877b8
    • E
      sysfs: Implement sysfs_rename_link · 7cb32942
      Eric W. Biederman 提交于
      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: NSerge Hallyn <serue@us.ibm.com>
      Acked-by: NTejun Heo <tj@kernel.org>
      Signed-off-by: NEric W. Biederman <ebiederm@aristanetworks.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      7cb32942
    • E
      sysfs: Document sysfs_attr_init and sysfs_bin_attr_init · 35960258
      Eric W. Biederman 提交于
      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: NEric W. Biederman <ebiederm@xmission.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      35960258