From: Dmitry Torokhov Date: Fri, 16 Jan 2015 08:07:22 +0000 (-0800) Subject: i2c: do not try to load modules for of-registered devices X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=c680eed5ccd4a1c99ee48cd41f4e5fdfad497dc2;p=linux-beck.git i2c: do not try to load modules for of-registered devices Trying to register an I2C device asynchronously (via async_schedule() call) results in an ugly warning from request_module() warning about potential deadlock (because request_module tries to wait for async works to complete). While we could try to switch to request_module_nowait(), other buses, as well as I2C itself when not using device tree, do not try to load modules, but rather rely on the standard infrastructure (udev) to execute module loading, and we should be doing the same. Signed-off-by: Dmitry Torokhov Signed-off-by: Wolfram Sang --- diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c index 7730a68fa2d0..72d53e40ebab 100644 --- a/drivers/i2c/i2c-core.c +++ b/drivers/i2c/i2c-core.c @@ -1291,8 +1291,6 @@ static struct i2c_client *of_i2c_register_device(struct i2c_adapter *adap, if (of_get_property(node, "wakeup-source", NULL)) info.flags |= I2C_CLIENT_WAKE; - request_module("%s%s", I2C_MODULE_PREFIX, info.type); - result = i2c_new_device(adap, &info); if (result == NULL) { dev_err(&adap->dev, "of_i2c: Failure registering %s\n",