--=_courier-17804-1055413587-0001-2
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
OK Here's the patch which :
1) Fixes the race conditions
2) Correctly reports the temps :-)
3) Removes a bit of gunk in the defines which I forgot
Margit
--=_courier-17804-1055413587-0001-2
Content-Type: application/octet-stream; name=lm85patch
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="lm85patch"
ZGlmZiAtTmF1ciBsaW51eC0yLjUuNzAvZHJpdmVycy9pMmMvY2hpcHMvbG04NS5jIGxpbnV4LTIu
NS43MG13L2RyaXZlcnMvaTJjL2NoaXBzL2xtODUuYwotLS0gbGludXgtMi41LjcwL2RyaXZlcnMv
aTJjL2NoaXBzL2xtODUuYwkyMDAzLTA2LTEyIDEwOjM3OjQ1LjAwMDAwMDAwMCArMDIwMAorKysg
bGludXgtMi41LjcwbXcvZHJpdmVycy9pMmMvY2hpcHMvbG04NS5jCTIwMDMtMDYtMTIgMTE6Mzg6
MTYuMDAwMDAwMDAwICswMjAwCkBAIC0xNDgsMjAgKzE0OCwxNyBAQAogI2RlZmluZSBTQ0FMRSh2
YWwsZnJvbSx0bykJCSgoKHZhbCkqKHRvKSArICgoZnJvbSkvMikpLyhmcm9tKSkKICNkZWZpbmUg
SU5TX1RPX1JFRyhuLHZhbCkJCShTRU5TT1JTX0xJTUlUKFNDQUxFKHZhbCxsbTg1X3NjYWxpbmdb
bl0sMTkyKSwwLDI1NSkpCiAjZGVmaW5lIElOU0VYVF9GUk9NX1JFRyhuLHZhbCxleHQpCShTQ0FM
RSgodmFsKSo0ICsgKGV4dCksMTkyKjQsbG04NV9zY2FsaW5nW25dKSkKLS8qCiAjZGVmaW5lIElO
U19GUk9NX1JFRyhuLHZhbCkJCShJTlNFWFRfRlJPTV9SRUcobix2YWwsMCkpCi0qLwotI2RlZmlu
ZSBJTlNfRlJPTV9SRUcobix2YWwpCQkoICggKHZhbCo0KmxtODVfc2NhbGluZ1tuXSkgKyAoMTky
KjQvMikgKSAvICg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