• Cornelia Huck's avatar
    driver core: Allow device_move(dev, NULL). · c744aeae
    Cornelia Huck authored
    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: default avatarCornelia Huck <cornelia.huck@de.ibm.com>
    Cc: Marcel Holtmann <marcel@holtmann.org>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
    c744aeae
core.c 26.2 KB