1. 22 8月, 2008 1 次提交
  2. 27 7月, 2008 1 次提交
  3. 22 7月, 2008 11 次提交
  4. 12 6月, 2008 1 次提交
  5. 30 5月, 2008 1 次提交
  6. 21 5月, 2008 1 次提交
    • G
      Driver core: add device_create_vargs and device_create_drvdata · 8882b394
      Greg Kroah-Hartman 提交于
      We want to have the drvdata field set properly when creating the device
      as sysfs callbacks can assume it is present and it can race the later
      setting of this field.
      
      So, create two new functions, deviec_create_vargs() and
      device_create_drvdata() that take this new field.
      
      device_create_drvdata() will go away in 2.6.27 as the drvdata field will
      just be moved to the device_create() call as it should be.
      
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      8882b394
  7. 15 5月, 2008 1 次提交
  8. 27 4月, 2008 1 次提交
  9. 20 4月, 2008 4 次提交
  10. 19 4月, 2008 1 次提交
  11. 25 3月, 2008 1 次提交
  12. 05 3月, 2008 3 次提交
  13. 03 2月, 2008 2 次提交
  14. 28 1月, 2008 1 次提交
    • G
      Driver core: Fix up build when CONFIG_BLOCK=N · 4e886c29
      Greg Kroah-Hartman 提交于
      This fixes up the driver core build errors when CONFIG_BLOCK=N
      
      Thanks to Alexander van Heukelum <heukelum@mailshack.com> for the basis
      of this patch, and to Jeremy Fitzhardinge <jeremy@goop.org> for
      reporting the problem.
      
      
      Cc: Alexander van Heukelum <heukelum@mailshack.com>
      Cc: Jeremy Fitzhardinge <jeremy@goop.org>
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      4e886c29
  15. 25 1月, 2008 10 次提交
    • G
      Driver core: coding style fixes · 4a3ad20c
      Greg Kroah-Hartman 提交于
      Fix up a number of coding style issues in the drivers/base/ directory
      that have annoyed me over the years.  checkpatch.pl is now very happy.
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      4a3ad20c
    • C
      Driver core: Cleanup get_device_parent() in device_add() and device_move() · 63b6971a
      Cornelia Huck 提交于
      Make setup_parent() void as get_device_parent() will always return
      either a valid kobject or NULL.
      Introduce cleanup_glue_dir() to drop reference grabbed on "glue"
      directory by get_device_parent(). Use it for cleanup in device_move()
      and device_add() on errors.
      
      This should fix the refcounting problem reported in
      http://marc.info/?l=linux-kernel&m=120052487909200&w=2Signed-off-by: NCornelia Huck <cornelia.huck@de.ibm.com>
      Cc: Dave Young <hidave.darkstar@gmail.com>
      Cc: Gabor Gombas <gombasg@sztaki.hu>
      Cc: Tejun Heo <htejun@gmail.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Marcel Holtmann <marcel@holtmann.org>
      Cc: David Miller <davem@davemloft.net>
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      
      63b6971a
    • K
      Kobject: auto-cleanup on final unref · 0f4dafc0
      Kay Sievers 提交于
      We save the current state in the object itself, so we can do proper
      cleanup when the last reference is dropped.
      
      If the initial reference is dropped, the object will be removed from
      sysfs if needed, if an "add" event was sent, "remove" will be send, and
      the allocated resources are released.
      
      This allows us to clean up some driver core usage as well as allowing us
      to do other such changes to the rest of the kernel.
      Signed-off-by: NKay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      0f4dafc0
    • G
      Kobject: rename kobject_init_ng() to kobject_init() · f9cb074b
      Greg Kroah-Hartman 提交于
      Now that the old kobject_init() function is gone, rename
      kobject_init_ng() to kobject_init() to clean up the namespace.
      
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      f9cb074b
    • 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