diff options
Diffstat (limited to 'drivers/i2c/i2c-core.c')
-rw-r--r-- | drivers/i2c/i2c-core.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c index 0f2f8484e8ec..e584d88ee337 100644 --- a/drivers/i2c/i2c-core.c +++ b/drivers/i2c/i2c-core.c | |||
@@ -525,22 +525,16 @@ static int i2c_device_match(struct device *dev, struct device_driver *drv) | |||
525 | return 0; | 525 | return 0; |
526 | } | 526 | } |
527 | 527 | ||
528 | |||
529 | /* uevent helps with hotplug: modprobe -q $(MODALIAS) */ | ||
530 | static int i2c_device_uevent(struct device *dev, struct kobj_uevent_env *env) | 528 | static int i2c_device_uevent(struct device *dev, struct kobj_uevent_env *env) |
531 | { | 529 | { |
532 | struct i2c_client *client = to_i2c_client(dev); | 530 | struct i2c_client *client = to_i2c_client(dev); |
533 | int rc; | 531 | int rc; |
534 | 532 | ||
535 | rc = acpi_device_uevent_modalias(dev, env); | 533 | rc = acpi_device_uevent_modalias(dev, env); |
536 | if (rc != -ENODEV) | 534 | if (rc != -ENODEV) |
537 | return rc; | 535 | return rc; |
538 | 536 | ||
539 | if (add_uevent_var(env, "MODALIAS=%s%s", | 537 | return add_uevent_var(env, "MODALIAS=%s%s", I2C_MODULE_PREFIX, client->name); |
540 | I2C_MODULE_PREFIX, client->name)) | ||
541 | return -ENOMEM; | ||
542 | dev_dbg(dev, "uevent\n"); | ||
543 | return 0; | ||
544 | } | 538 | } |
545 | 539 | ||
546 | /* i2c bus recovery routines */ | 540 | /* i2c bus recovery routines */ |