Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=de81d2aaebc8e5e5167cb93f674c57705898e45e
Commit:     de81d2aaebc8e5e5167cb93f674c57705898e45e
Parent:     d25790532370e7448e3d3bd25a17e1e9f1299816
Author:     David Brownell <[EMAIL PROTECTED]>
AuthorDate: Tue May 22 19:49:16 2007 +0200
Committer:  Jean Delvare <[EMAIL PROTECTED]>
CommitDate: Tue May 22 19:49:16 2007 +0200

    i2c: Legacy i2c drivers shouldn't issue uevents
    
    Prevent legacy drivers from issuing uevents for device creation/removal,
    so that userspace can't cause modprobing loops for them.  This became a
    problem for some legacy PC drivers.  I can't easily see it becoming an
    issue with I2C legacy drivers, but consistency-in-paranoia seems likely
    to be a good thing here.  For usable i2c-level driver model uevents, just
    switch to a new-style driver.
    
    Signed-off-by: David Brownell <[EMAIL PROTECTED]>
    Signed-off-by: Jean Delvare <[EMAIL PROTECTED]>
---
 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 64f8e56..435925e 100644
--- a/drivers/i2c/i2c-core.c
+++ b/drivers/i2c/i2c-core.c
@@ -697,9 +697,10 @@ int i2c_attach_client(struct i2c_client *client)
        if (client->driver)
                client->dev.driver = &client->driver->driver;
 
-       if (client->driver && !is_newstyle_driver(client->driver))
+       if (client->driver && !is_newstyle_driver(client->driver)) {
                client->dev.release = i2c_client_release;
-       else
+               client->dev.uevent_suppress = 1;
+       } else
                client->dev.release = i2c_client_dev_release;
 
        snprintf(&client->dev.bus_id[0], sizeof(client->dev.bus_id),
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to