X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fw1%2Fw1_therm.c;fp=drivers%2Fw1%2Fslaves%2Fw1_therm.c;h=4577df3cfc4839e8537ed22618f02381a1b1b079;hb=987b0145d94eecf292d8b301228356f44611ab7c;hp=536d16d78de75ce313fa7f4f2b394e2617f4033e;hpb=f7ed79d23a47594e7834d66a8f14449796d4f3e6;p=linux-2.6.git diff --git a/drivers/w1/slaves/w1_therm.c b/drivers/w1/w1_therm.c similarity index 98% rename from drivers/w1/slaves/w1_therm.c rename to drivers/w1/w1_therm.c index 536d16d78..4577df3cf 100644 --- a/drivers/w1/slaves/w1_therm.c +++ b/drivers/w1/w1_therm.c @@ -28,10 +28,10 @@ #include #include -#include "../w1.h" -#include "../w1_io.h" -#include "../w1_int.h" -#include "../w1_family.h" +#include "w1.h" +#include "w1_io.h" +#include "w1_int.h" +#include "w1_family.h" MODULE_LICENSE("GPL"); MODULE_AUTHOR("Evgeniy Polyakov "); @@ -123,12 +123,12 @@ static inline int w1_DS18S20_convert_temp(u8 rom[9]) if (!rom[7]) return 0; - + if (rom[1] == 0) t = ((s32)rom[0] >> 1)*1000; else t = 1000*(-1*(s32)(0x100-rom[0]) >> 1); - + t -= 250; h = 1000*((s32)rom[7] - (s32)rom[6]); h /= (s32)rom[7]; @@ -231,7 +231,7 @@ static ssize_t w1_therm_read_bin(struct kobject *kobj, char *buf, loff_t off, si for (i = 0; i < 9; ++i) count += sprintf(buf + count, "%02x ", sl->rom[i]); - + count += sprintf(buf + count, "t=%d\n", w1_convert_temp(rom, sl->family->fid)); out: up(&dev->mutex);