Dmitri wrote:

>Quoting Ravi Kumar B S <[EMAIL PROTECTED]>:
>
>>i am using the usb bluetooth driver. i have configured the usb bluetooth 
>>driver as a module. i have two versions of the driver. one with the 
>>comments, extensive debug statements(printks) etc. the other one is the 
>>one which is cleaned does not have that many debug statements.
>>now the problem is when i insmod the uncleaned one and connect the 
>>device, and do lsmod, the driver is listed as being used. (means, 1 in 
>>"used by" column of the lsmod result).
>>but when i insmod the cleaned one, it is not listed as being used and 
>>open call to the device fails.
>>
>>any idea what is going wrong?
>>
>
>Probably you made a mistake somewhere :-)
>
>In best case, you "cleaned out" too much, maybe overlook the scope of some
>operators (like 'if') and introduced a bug. Diff the sources with emacs or
>tkdiff, and review the changes.
>
>In worst case, presence of printk's moves the memory around, and you have
>a stray pointer somewhere that reads or writes past the allocated
>memory. With printks in place, this pointer happens to point to a safe
>place; without them all fails.
>
>It helps sometimes to *slowly* move changes from one file to another, one
>change at a time, and testing the driver. As soon as the change
>breaks/fixes the code you know where the problem is. But sometimes *any*
>change, *anywhere* affects the code (when you return something allocated
>on the stack, for example). Then you have to stare at the code until you
>find the bug.
>
>Dmitri
>
thanks. but the thing is that the cleaned up code works on another of my 
machine. and is not working only in a particular machine. i see the 
configuration as same in both the machines.

any idea?

/Ravi kumar b-s






_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to