Commit f7050bd7 authored by Jean Delvare's avatar Jean Delvare Committed by Jean Delvare
Browse files

i2c: Simplify i2c_del_driver()

i2c_del_driver() can be simplified a bit.
Signed-off-by: default avatarJean Delvare <>
parent 6a03cd93
......@@ -743,13 +743,11 @@ void i2c_del_driver(struct i2c_driver *driver)
/* new-style driver? */
if (is_newstyle_driver(driver))
goto unregister;
class_for_each_device(&i2c_adapter_class, driver, __detach_adapter);
/* legacy driver? */
if (!is_newstyle_driver(driver))
class_for_each_device(&i2c_adapter_class, driver,
pr_debug("i2c-core: driver [%s] unregistered\n", driver->;
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