]> err.no Git - linux-2.6/commitdiff
driver core: Remove device_is_registered() in device_move().
authorCornelia Huck <cornelia.huck@de.ibm.com>
Mon, 8 Jan 2007 19:16:41 +0000 (20:16 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 7 Feb 2007 18:37:11 +0000 (10:37 -0800)
device_is_registered() will always be false for a device with no bus. Remove
this check and trust the caller to know what they're doing.

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Cc: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/base/core.c

index 67b79a7592a9d94c92d0e737d82638fdc5e7f74d..36eedfdeb547aacb1c580b896366faa73201bd9c 100644 (file)
@@ -1004,10 +1004,6 @@ int device_move(struct device *dev, struct device *new_parent)
        if (!dev)
                return -EINVAL;
 
-       if (!device_is_registered(dev)) {
-               error = -EINVAL;
-               goto out;
-       }
        new_parent = get_device(new_parent);
        if (!new_parent) {
                error = -EINVAL;