diff options
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 0ac2f90ab840..10be7b5fbe97 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[] = { | |||
248 | NULL | 248 | NULL |
249 | }; | 249 | }; |
250 | 250 | ||
251 | const static struct dev_pm_ops i2c_device_pm_ops = { | 251 | static const struct dev_pm_ops i2c_device_pm_ops = { |
252 | .suspend = i2c_device_pm_suspend, | 252 | .suspend = i2c_device_pm_suspend, |
253 | .resume = i2c_device_pm_resume, | 253 | .resume = i2c_device_pm_resume, |
254 | }; | 254 | }; |
@@ -843,6 +843,9 @@ int i2c_del_adapter(struct i2c_adapter *adap) | |||
843 | adap->dev.parent); | 843 | adap->dev.parent); |
844 | #endif | 844 | #endif |
845 | 845 | ||
846 | /* device name is gone after device_unregister */ | ||
847 | dev_dbg(&adap->dev, "adapter [%s] unregistered\n", adap->name); | ||
848 | |||
846 | /* clean up the sysfs representation */ | 849 | /* clean up the sysfs representation */ |
847 | init_completion(&adap->dev_released); | 850 | init_completion(&adap->dev_released); |
848 | device_unregister(&adap->dev); | 851 | device_unregister(&adap->dev); |
@@ -855,8 +858,6 @@ int i2c_del_adapter(struct i2c_adapter *adap) | |||
855 | idr_remove(&i2c_adapter_idr, adap->nr); | 858 | idr_remove(&i2c_adapter_idr, adap->nr); |
856 | mutex_unlock(&core_lock); | 859 | mutex_unlock(&core_lock); |
857 | 860 | ||
858 | dev_dbg(&adap->dev, "adapter [%s] unregistered\n", adap->name); | ||
859 | |||
860 | /* Clear the device structure in case this adapter is ever going to be | 861 | /* Clear the device structure in case this adapter is ever going to be |
861 | added again */ | 862 | added again */ |
862 | memset(&adap->dev, 0, sizeof(adap->dev)); | 863 | memset(&adap->dev, 0, sizeof(adap->dev)); |