diff options
author | Paul Mundt <lethal@linux-sh.org> | 2010-01-18 20:47:37 +0900 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2010-01-18 20:47:37 +0900 |
commit | 0c54de146ef4303ed3c5879b043894c8db637507 (patch) | |
tree | a4ff5bf27ffd2c4b71271b42014a0040490c7271 /drivers/i2c/i2c-core.c | |
parent | 8faba6121566248330e738d25a2c43d7500fb9f0 (diff) | |
parent | 7dc9c484a71525794ca05cf7a47f283f1b54cd12 (diff) |
Merge branch 'sh/stable-updates'
Diffstat (limited to 'drivers/i2c/i2c-core.c')
-rw-r--r-- | drivers/i2c/i2c-core.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c index 0ac2f90ab84..10be7b5fbe9 100644 --- a/drivers/i2c/i2c-core.c +++ b/drivers/i2c/i2c-core.c @@ -248,7 +248,7 @@ static const struct attribute_group *i2c_dev_attr_groups[] = { NULL }; -const static struct dev_pm_ops i2c_device_pm_ops = { +static const struct dev_pm_ops i2c_device_pm_ops = { .suspend = i2c_device_pm_suspend, .resume = i2c_device_pm_resume, }; @@ -843,6 +843,9 @@ int i2c_del_adapter(struct i2c_adapter *adap) adap->dev.parent); #endif + /* device name is gone after device_unregister */ + dev_dbg(&adap->dev, "adapter [%s] unregistered\n", adap->name); + /* clean up the sysfs representation */ init_completion(&adap->dev_released); device_unregister(&adap->dev); @@ -855,8 +858,6 @@ int i2c_del_adapter(struct i2c_adapter *adap) idr_remove(&i2c_adapter_idr, adap->nr); mutex_unlock(&core_lock); - dev_dbg(&adap->dev, "adapter [%s] unregistered\n", adap->name); - /* Clear the device structure in case this adapter is ever going to be added again */ memset(&adap->dev, 0, sizeof(adap->dev)); |