Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c9a2c46d7f32a884510b20f0cfa79a2c6a2f1413
Commit:     c9a2c46d7f32a884510b20f0cfa79a2c6a2f1413
Parent:     4fa2b1cde0e3797549f711ce9e51c395b3d6d2a7
Author:     Jean Delvare <[EMAIL PROTECTED]>
AuthorDate: Sun Feb 24 20:03:41 2008 +0100
Committer:  Jean Delvare <[EMAIL PROTECTED]>
CommitDate: Sun Feb 24 20:03:41 2008 +0100

    ARM: OMAP: Release i2c_adapter after use (Siemens SX1)
    
    Each call to i2c_get_adapter() must be followed by a call to
    i2c_put_adapter() to release the grabbed reference. Otherwise the
    reference count grows forever and the adapter can never be
    unregistered.
    
    Signed-off-by: Jean Delvare <[EMAIL PROTECTED]>
    Acked-by: Vladimir Ananiev <[EMAIL PROTECTED]>
    Acked-by: Tony Lindgren <[EMAIL PROTECTED]>
---
 arch/arm/mach-omap1/board-sx1.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap1/board-sx1.c b/arch/arm/mach-omap1/board-sx1.c
index 1c7f09a..e473fa6 100644
--- a/arch/arm/mach-omap1/board-sx1.c
+++ b/arch/arm/mach-omap1/board-sx1.c
@@ -61,6 +61,7 @@ int sx1_i2c_write_byte(u8 devaddr, u8 regoffset, u8 value)
        data[0] = regoffset;    /* register num */
        data[1] = value;                /* register data */
        err = i2c_transfer(adap, msg, 1);
+       i2c_put_adapter(adap);
        if (err >= 0)
                return 0;
        return err;
@@ -91,6 +92,7 @@ int sx1_i2c_read_byte(u8 devaddr, u8 regoffset, u8 *value)
        msg->buf = data;
        err = i2c_transfer(adap, msg, 1);
        *value = data[0];
+       i2c_put_adapter(adap);
 
        if (err >= 0)
                return 0;
-
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