- tm = jiffies + msecs_to_jiffies(750);
- while(time_before(jiffies, tm)) {
- set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout(tm-jiffies);
-
- if (signal_pending(current))
- flush_signals(current);
- }
-
- if (!w1_reset_bus (dev)) {
- w1_write_block(dev, match, 9);
-
- w1_write_8(dev, W1_READ_SCRATCHPAD);
- if ((count = w1_read_block(dev, rom, 9)) != 9) {
- dev_warn(&dev->dev, "w1_read_block() returned %d instead of 9.\n", count);
- }
+ if (count < 10) {
+ if (!w1_reset_bus(dev)) {
+ w1_write_block(dev, match, 9);