1. 25 1月, 2008 2 次提交
    • G
      kobject: remove struct kobj_type from struct kset · 3514faca
      Greg Kroah-Hartman 提交于
      We don't need a "default" ktype for a kset.  We should set this
      explicitly every time for each kset.  This change is needed so that we
      can make ksets dynamic, and cleans up one of the odd, undocumented
      assumption that the kset/kobject/ktype model has.
      
      This patch is based on a lot of help from Kay Sievers.
      
      Nasty bug in the block code was found by Dave Young
      <hidave.darkstar@gmail.com>
      
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      Cc: Dave Young <hidave.darkstar@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      3514faca
    • R
      PM: Acquire device locks on suspend · 775b64d2
      Rafael J. Wysocki 提交于
      This patch reorganizes the way suspend and resume notifications are
      sent to drivers.  The major changes are that now the PM core acquires
      every device semaphore before calling the methods, and calls to
      device_add() during suspends will fail, while calls to device_del()
      during suspends will block.
      
      It also provides a way to safely remove a suspended device with the
      help of the PM core, by using the device_pm_schedule_removal() callback
      introduced specifically for this purpose, and updates two drivers (msr
      and cpuid) that need to use it.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      775b64d2
  2. 29 11月, 2007 1 次提交
  3. 31 10月, 2007 1 次提交
    • K
      Driver Core: fix bug in device_rename() for SYSFS_DEPRECATED=y · 60b8cabd
      Kay Sievers 提交于
      This should fix the sysfs warnings that renaming network devices is
      causing to show up with CONFIG_SYSFS_DEPRECATED=y
      
      The code just shouldn't run if class devices are real directories, it's
      an update for the symlink in the class directory. Nobody noticed that as
      long as the creation of sysfs files silently failed, and we both missed
      it before the merge, because we don't run SYSFS_DEPRECATED=y.        
      Signed-off-by: NKay Sievers <kay.sievers@vrfy.org>
      Cc: Larry Finger <Larry.Finger@lwfinger.net>
      Cc: David Miller <davem@davemloft.net>
      Cc: Rafael J. Wysocki <rjw@sisk.pl>
      Cc: Tejun Heo <htejun@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      60b8cabd
  4. 13 10月, 2007 3 次提交
  5. 08 10月, 2007 1 次提交
  6. 27 9月, 2007 1 次提交
  7. 20 9月, 2007 1 次提交
  8. 31 7月, 2007 2 次提交
  9. 19 7月, 2007 2 次提交
  10. 12 7月, 2007 3 次提交
  11. 09 6月, 2007 1 次提交
  12. 03 5月, 2007 2 次提交
  13. 28 4月, 2007 10 次提交
  14. 05 4月, 2007 1 次提交
  15. 16 3月, 2007 1 次提交
    • A
      [PATCH] sysfs and driver core: add callback helper, used by SCSI and S390 · d9a9cdfb
      Alan Stern 提交于
      This patch (as868) adds a helper routine for device drivers that need
      to set up a callback to perform some action in a different process's
      context.  This is intended for use by attribute methods that want to
      unregister themselves or their parent device.  Attribute method calls
      are mutually exclusive with unregistration, so such actions cannot be
      taken directly.
      
      Two attribute methods are converted to use the new helper routine: one
      for SCSI device deletion and one for System/390 ccwgroup devices.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Cc: Hugh Dickins <hugh@veritas.com>
      Cc: Cornelia Huck <cornelia.huck@de.ibm.com>
      Cc: Oliver Neukum <oneukum@suse.de>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      d9a9cdfb
  16. 10 3月, 2007 2 次提交
  17. 09 3月, 2007 1 次提交
  18. 24 2月, 2007 1 次提交
  19. 21 2月, 2007 1 次提交
  20. 10 2月, 2007 1 次提交
    • T
      devres: device resource management · 9ac7849e
      Tejun Heo 提交于
      Implement device resource management, in short, devres.  A device
      driver can allocate arbirary size of devres data which is associated
      with a release function.  On driver detach, release function is
      invoked on the devres data, then, devres data is freed.
      
      devreses are typed by associated release functions.  Some devreses are
      better represented by single instance of the type while others need
      multiple instances sharing the same release function.  Both usages are
      supported.
      
      devreses can be grouped using devres group such that a device driver
      can easily release acquired resources halfway through initialization
      or selectively release resources (e.g. resources for port 1 out of 4
      ports).
      
      This patch adds devres core including documentation and the following
      managed interfaces.
      
      * alloc/free	: devm_kzalloc(), devm_kzfree()
      * IO region	: devm_request_region(), devm_release_region()
      * IRQ		: devm_request_irq(), devm_free_irq()
      * DMA		: dmam_alloc_coherent(), dmam_free_coherent(),
      		  dmam_declare_coherent_memory(), dmam_pool_create(),
      		  dmam_pool_destroy()
      * PCI		: pcim_enable_device(), pcim_pin_device(), pci_is_managed()
      * iomap		: devm_ioport_map(), devm_ioport_unmap(), devm_ioremap(),
      		  devm_ioremap_nocache(), devm_iounmap(), pcim_iomap_table(),
      		  pcim_iomap(), pcim_iounmap()
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      9ac7849e
  21. 08 2月, 2007 2 次提交