diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-09-30 03:29:23 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-09-30 03:29:23 +0200 |
commit | 88502b9c0a5dcc884c0dbfb6ddf964ff5da5d8d3 (patch) | |
tree | f79f728c308100bc3e57d0d2f5d1e00d90406a0d /drivers/base | |
parent | driver-core: remove struct bus_type.drv_attrs (diff) | |
parent | Linux 3.12-rc3 (diff) | |
download | linux-88502b9c0a5dcc884c0dbfb6ddf964ff5da5d8d3.tar.xz linux-88502b9c0a5dcc884c0dbfb6ddf964ff5da5d8d3.zip |
Merge 3.12-rc3 into driver-core-next
We want the driver core and sysfs fixes in here to make merges and
development easier.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/base')
-rw-r--r-- | drivers/base/core.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/base/core.c b/drivers/base/core.c index 3335000be2dc..319c2c594ac6 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c @@ -2019,7 +2019,7 @@ EXPORT_SYMBOL_GPL(device_move); */ void device_shutdown(void) { - struct device *dev; + struct device *dev, *parent; spin_lock(&devices_kset->list_lock); /* @@ -2036,7 +2036,7 @@ void device_shutdown(void) * prevent it from being freed because parent's * lock is to be held */ - get_device(dev->parent); + parent = get_device(dev->parent); get_device(dev); /* * Make sure the device is off the kset list, in the @@ -2046,8 +2046,8 @@ void device_shutdown(void) spin_unlock(&devices_kset->list_lock); /* hold lock to avoid race with probe/release */ - if (dev->parent) - device_lock(dev->parent); + if (parent) + device_lock(parent); device_lock(dev); /* Don't allow any more runtime suspends */ @@ -2065,11 +2065,11 @@ void device_shutdown(void) } device_unlock(dev); - if (dev->parent) - device_unlock(dev->parent); + if (parent) + device_unlock(parent); put_device(dev); - put_device(dev->parent); + put_device(parent); spin_lock(&devices_kset->list_lock); } |