diff options
| -rw-r--r-- | drivers/i2c/i2c-core.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c index d610e995bbfd..10be7b5fbe97 100644 --- a/drivers/i2c/i2c-core.c +++ b/drivers/i2c/i2c-core.c | |||
| @@ -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)); |
