Fix debug bug in lm83 driver
PATCH 1/1 Fix debug bug in lm83 driver
Hi Greg,
The following patch fixes lm83 failing to compile if DEBUG is set.
BTW, how does one enable DEBUG? I tried to add "-DDEBUG" in the main Makefile with no success, then I tried to add "#define DEBUG" in the driver itself but it didn't work either. I had to run the correct compilation command directly by myself with -DDEBUG to get it to work. I just can't understand why the two other ways (especially the second) fails to work. Does Voodoo magic surround us? Help! ;)
drivers/i2c/chips/lm83.c renamed from drivers/i2c/chips/lm83.c.orig +1 -1
@@ -270,7 +270,7 @@ & 0x48) != 0x00) || ((i2c_smbus_read_byte_data(new_client, LM83_REG_R_CONFIG) & 0x41) != 0x00)) { -dev_dbg (&client->dev, +dev_dbg (&adapter->dev,"LM83 detection failed at 0x%02x.\n" , address); goto exit_free; }
Signature · 2 lines
Jean Delvare http://www.ensicaen.ismra.fr/~delvare/
Greg KH
AppliedPATCH 1/1 Fix debug bug in lm83 driver
Quoted 3 lines · Jean Delvare
Hi Greg,
The following patch fixes lm83 failing to compile if DEBUG is set.
Applied.
Quoted 6 lines
BTW, how does one enable DEBUG? I tried to add "-DDEBUG" in the main
Makefilewith no success, then I tried to add "#define DEBUG" in the driver itself but it didn't work either. I had to run the correct compilation command directly by myself with -DDEBUG to get it to work. I just can't understand why the two other ways (especially the second) fails to work. Does Voodoo magic surround us? Help! ;)
Add #define DEBUG at the start of the file, no vodo magic needed :)
thanks,
greg k-h
PATCH 1/1 Fix debug bug in lm83 driver
In reply to Jean DelvareQuoted 1 line
Add #define DEBUG at the start of the file, no vodo magic needed :)
Hm. I wonder if I should really tell you what I did. I'll be ridiculous. Hm.
Anyway... My "#define DEBUG" was after all other includes. So dev_dbg was resolved to nothing. Because the call to dev_dbg was after my #define, I expected it to resolve correctly...
Shame on me, and thanks for the explanation.
Still doesn't explain why adding -DDEBUG to the main Makefile didn't do the trick, but I don't have that much time to waste to investigate it all.
Signature · 2 lines
Jean Delvare http://www.ensicaen.ismra.fr/~delvare/