• C
    driver core: Allow device_move(dev, NULL). · c744aeae
    Cornelia Huck 提交于
    If we allow NULL as the new parent in device_move(), we need to make sure
    that the device is placed into the same place as it would if it was
    newly registered:
    
    - Consider the device virtual tree. In order to be able to reuse code,
      setup_parent() has been tweaked a bit.
    - kobject_move() can fall back to the kset's kobject.
    - sysfs_move_dir() uses the sysfs root dir as fallback.
    Signed-off-by: NCornelia Huck <cornelia.huck@de.ibm.com>
    Cc: Marcel Holtmann <marcel@holtmann.org>
    Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
    c744aeae
dir.c 12.3 KB