Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a2a6c74d34c3ae9de6825767a30ab17f709b59ce
Commit:     a2a6c74d34c3ae9de6825767a30ab17f709b59ce
Parent:     cb2a52052cebe4716e83b9d2e53682ba00f67de6
Author:     Evgeniy Polyakov <[EMAIL PROTECTED]>
AuthorDate: Mon Jan 14 00:55:08 2008 -0800
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Mon Jan 14 08:52:22 2008 -0800

    w1: decrement slave counter only in ->release() callback
    
    Decrement the slave counter only in ->release() callback instead of both
    in ->release() and w1 control.
    
    Patch is based on debug work and preliminary patch made by Henri Laakso.
    Henri noticed in debug that this counter becomes negative after w1 slave
    device is physically removed.
    
    Signed-off-by: Evgeniy Polyakov <[EMAIL PROTECTED]>
    Cc: Henri Laakso <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 drivers/w1/w1.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/w1/w1.c b/drivers/w1/w1.c
index 0702173..33e5031 100644
--- a/drivers/w1/w1.c
+++ b/drivers/w1/w1.c
@@ -869,11 +869,9 @@ void w1_search_process(struct w1_master *dev, u8 
search_type)
        w1_search_devices(dev, search_type, w1_slave_found);
 
        list_for_each_entry_safe(sl, sln, &dev->slist, w1_slave_entry) {
-               if (!test_bit(W1_SLAVE_ACTIVE, (unsigned long *)&sl->flags) && 
!--sl->ttl) {
+               if (!test_bit(W1_SLAVE_ACTIVE, (unsigned long *)&sl->flags) && 
!--sl->ttl)
                        w1_slave_detach(sl);
-
-                       dev->slave_count--;
-               } else if (test_bit(W1_SLAVE_ACTIVE, (unsigned long 
*)&sl->flags))
+               else if (test_bit(W1_SLAVE_ACTIVE, (unsigned long *)&sl->flags))
                        sl->ttl = dev->slave_ttl;
        }
 
-
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