diff options
Diffstat (limited to 'drivers/w1/slaves')
-rw-r--r-- | drivers/w1/slaves/w1_ds2433.c | 1 | ||||
-rw-r--r-- | drivers/w1/slaves/w1_ds2760.c | 1 | ||||
-rw-r--r-- | drivers/w1/slaves/w1_therm.c | 5 |
3 files changed, 4 insertions, 3 deletions
diff --git a/drivers/w1/slaves/w1_ds2433.c b/drivers/w1/slaves/w1_ds2433.c index 13944714882..d2bf32118a9 100644 --- a/drivers/w1/slaves/w1_ds2433.c +++ b/drivers/w1/slaves/w1_ds2433.c @@ -13,6 +13,7 @@ #include <linux/device.h> #include <linux/types.h> #include <linux/delay.h> +#include <linux/slab.h> #ifdef CONFIG_W1_SLAVE_DS2433_CRC #include <linux/crc16.h> diff --git a/drivers/w1/slaves/w1_ds2760.c b/drivers/w1/slaves/w1_ds2760.c index 59f708efe25..6e153343e11 100644 --- a/drivers/w1/slaves/w1_ds2760.c +++ b/drivers/w1/slaves/w1_ds2760.c @@ -16,6 +16,7 @@ #include <linux/platform_device.h> #include <linux/mutex.h> #include <linux/idr.h> +#include <linux/gfp.h> #include "../w1.h" #include "../w1_int.h" diff --git a/drivers/w1/slaves/w1_therm.c b/drivers/w1/slaves/w1_therm.c index 1ed3d554e37..17726a05a0a 100644 --- a/drivers/w1/slaves/w1_therm.c +++ b/drivers/w1/slaves/w1_therm.c @@ -115,9 +115,8 @@ static struct w1_therm_family_converter w1_therm_families[] = { static inline int w1_DS18B20_convert_temp(u8 rom[9]) { - int t = ((s16)rom[1] << 8) | rom[0]; - t = t*1000/16; - return t; + s16 t = le16_to_cpup((__le16 *)rom); + return t*1000/16; } static inline int w1_DS18S20_convert_temp(u8 rom[9]) |