1. 25 1月, 2008 12 次提交
    • G
      Kobject: rename kobject_add_ng() to kobject_add() · b2d6db58
      Greg Kroah-Hartman 提交于
      Now that the old kobject_add() function is gone, rename kobject_add_ng()
      to kobject_add() to clean up the namespace.
      
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      b2d6db58
    • K
      Driver core: convert block from raw kobjects to core devices · edfaa7c3
      Kay Sievers 提交于
      This moves the block devices to /sys/class/block. It will create a
      flat list of all block devices, with the disks and partitions in one
      directory. For compatibility /sys/block is created and contains symlinks
      to the disks.
      
        /sys/class/block
        |-- sda -> ../../devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda
        |-- sda1 -> ../../devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1
        |-- sda10 -> ../../devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda10
        |-- sda5 -> ../../devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda5
        |-- sda6 -> ../../devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda6
        |-- sda7 -> ../../devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda7
        |-- sda8 -> ../../devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda8
        |-- sda9 -> ../../devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda9
        `-- sr0 -> ../../devices/pci0000:00/0000:00:1f.2/host1/target1:0:0/1:0:0:0/block/sr0
      
        /sys/block/
        |-- sda -> ../devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda
        `-- sr0 -> ../devices/pci0000:00/0000:00:1f.2/host1/target1:0:0/1:0:0:0/block/sr0
      Signed-off-by: NKay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      edfaa7c3
    • K
      Driver core: fix class glue dir cleanup logic · da231fd5
      Kay Sievers 提交于
      We should remove the glue directory between the class and the bus
      device _after_ we sent out the 'remove' event for the device, otherwise
      the parent relationship is no longer valid, and composing the path
      with deleted sysfs entries will not work.
      
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NKay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      da231fd5
    • G
      Driver core: clean up debugging messages · 7dc72b28
      Greg Kroah-Hartman 提交于
      The driver core debugging messages are a mess.  This provides a unified
      message that makes them actually useful.
      
      The format for new kobject debug messages should be:
      	driver/bus/class: 'OBJECT_NAME': FUNCTION_NAME: message.\n
      
      Note, the class code is not changed in this patch due to pending patches
      in my queue that this would conflict with.  A later patch will clean
      them up.
      
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      7dc72b28
    • G
      driver core: remove fields from struct bus_type · c6f7e72a
      Greg Kroah-Hartman 提交于
      struct bus_type is static everywhere in the kernel.  This moves the
      kobject in the structure out of it, and a bunch of other private only to
      the driver core fields are now moved to a private structure.  This lets
      us dynamically create the backing kobject properly and gives us the
      chance to be able to document to users exactly how to use the struct
      bus_type as there are no fields they can improperly access.
      
      Thanks to Kay for the build fixes on this patch.
      
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      c6f7e72a
    • G
      Kobject: convert drivers/base/core.c to use kobject_init/add_ng() · 9990513c
      Greg Kroah-Hartman 提交于
      This converts the code to use the new kobject functions, cleaning up the
      logic in doing so.
      
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      9990513c
    • G
      driver core: clean up device_shutdown · 37b0c020
      Greg Kroah-Hartman 提交于
      device_shutdown does not need to be in a separate file.  Move it into
      the driver core file where it belongs.
      
      This also moves us one more step closer to making devices_kset static,
      now only the crazy sysdevs are keeping that from happening...
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      37b0c020
    • G
      kset: convert /sys/devices to use kset_create · 881c6cfd
      Greg Kroah-Hartman 提交于
      Dynamically create the kset instead of declaring it statically.  We also
      rename devices_subsys to devices_kset to catch all users of the
      variable.
      
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      881c6cfd
    • G
      kobject: get rid of kobject_kset_add_dir · 43968d2f
      Greg Kroah-Hartman 提交于
      kobject_kset_add_dir is only called in one place so remove it and use
      kobject_create() instead.
      
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      43968d2f
    • G
      kobject: get rid of kobject_add_dir · 4ff6abff
      Greg Kroah-Hartman 提交于
      kobject_create_and_add is the same as kobject_add_dir, so drop
      kobject_add_dir.
      
      
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      4ff6abff
    • 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 次提交