Commit 8508159e authored by Jean Delvare's avatar Jean Delvare Committed by Jean Delvare
Browse files

i2c: Call client_unregister for new-style devices too

We call adapter->client_register for both legacy and new-style i2c
devices, however we only call adapter->client_unregister for legacy
drivers. This doesn't make much sense. Usually, drivers will undo
in client_unregister what they did in client_register, so we should
call neither or both for every given i2c device.

In order to ease the transition from legacy to new-style devices, it
seems preferable to actually call both.
Signed-off-by: default avatarJean Delvare <>
Cc: David Brownell <>
parent f741f673
......@@ -300,6 +300,14 @@ void i2c_unregister_device(struct i2c_client *client)
if (adapter->client_unregister) {
if (adapter->client_unregister(client)) {
"client_unregister [%s] failed\n",
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment