summaryrefslogtreecommitdiffstats
path: root/drivers/w1/w1.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2005-07-12 15:54:36 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2005-07-12 15:54:36 -0700
commit22a4427972af371fddb49c0184a93851ad51070d (patch)
tree2d513301698bc8c5b691caf7268a57f296fdf69d /drivers/w1/w1.c
parent9f02d6b7b43d46a74dd385f06090104ecd0fb807 (diff)
parentede7fbdf526c314850c9f32dd8da1753bf8d0ad5 (diff)
downloadop-kernel-dev-22a4427972af371fddb49c0184a93851ad51070d.zip
op-kernel-dev-22a4427972af371fddb49c0184a93851ad51070d.tar.gz
Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/i2c-2.6
Diffstat (limited to 'drivers/w1/w1.c')
-rw-r--r--drivers/w1/w1.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/w1/w1.c b/drivers/w1/w1.c
index 312cf32..8a9c428 100644
--- a/drivers/w1/w1.c
+++ b/drivers/w1/w1.c
@@ -516,6 +516,7 @@ static void w1_slave_found(unsigned long data, u64 rn)
struct w1_reg_num *tmp;
int family_found = 0;
struct w1_master *dev;
+ u64 rn_le = cpu_to_le64(rn);
dev = w1_search_master(data);
if (!dev) {
@@ -544,10 +545,8 @@ static void w1_slave_found(unsigned long data, u64 rn)
slave_count++;
}
- rn = cpu_to_le64(rn);
-
if (slave_count == dev->slave_count &&
- rn && ((le64_to_cpu(rn) >> 56) & 0xff) == w1_calc_crc8((u8 *)&rn, 7)) {
+ rn && ((rn >> 56) & 0xff) == w1_calc_crc8((u8 *)&rn_le, 7)) {
w1_attach_slave_device(dev, tmp);
}
OpenPOWER on IntegriCloud