diff options
| -rw-r--r-- | drivers/w1/w1.c | 10 | ||||
| -rw-r--r-- | drivers/w1/w1.h | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/drivers/w1/w1.c b/drivers/w1/w1.c index fa932c2f7d97..66efa96c4603 100644 --- a/drivers/w1/w1.c +++ b/drivers/w1/w1.c | |||
| @@ -709,7 +709,7 @@ static int w1_attach_slave_device(struct w1_master *dev, struct w1_reg_num *rn) | |||
| 709 | 709 | ||
| 710 | sl->owner = THIS_MODULE; | 710 | sl->owner = THIS_MODULE; |
| 711 | sl->master = dev; | 711 | sl->master = dev; |
| 712 | set_bit(W1_SLAVE_ACTIVE, (long *)&sl->flags); | 712 | set_bit(W1_SLAVE_ACTIVE, &sl->flags); |
| 713 | 713 | ||
| 714 | memset(&msg, 0, sizeof(msg)); | 714 | memset(&msg, 0, sizeof(msg)); |
| 715 | memcpy(&sl->reg_num, rn, sizeof(sl->reg_num)); | 715 | memcpy(&sl->reg_num, rn, sizeof(sl->reg_num)); |
| @@ -866,7 +866,7 @@ void w1_slave_found(struct w1_master *dev, u64 rn) | |||
| 866 | 866 | ||
| 867 | sl = w1_slave_search_device(dev, tmp); | 867 | sl = w1_slave_search_device(dev, tmp); |
| 868 | if (sl) { | 868 | if (sl) { |
| 869 | set_bit(W1_SLAVE_ACTIVE, (long *)&sl->flags); | 869 | set_bit(W1_SLAVE_ACTIVE, &sl->flags); |
| 870 | } else { | 870 | } else { |
| 871 | if (rn && tmp->crc == w1_calc_crc8((u8 *)&rn_le, 7)) | 871 | if (rn && tmp->crc == w1_calc_crc8((u8 *)&rn_le, 7)) |
| 872 | w1_attach_slave_device(dev, tmp); | 872 | w1_attach_slave_device(dev, tmp); |
| @@ -984,14 +984,14 @@ void w1_search_process_cb(struct w1_master *dev, u8 search_type, | |||
| 984 | struct w1_slave *sl, *sln; | 984 | struct w1_slave *sl, *sln; |
| 985 | 985 | ||
| 986 | list_for_each_entry(sl, &dev->slist, w1_slave_entry) | 986 | list_for_each_entry(sl, &dev->slist, w1_slave_entry) |
| 987 | clear_bit(W1_SLAVE_ACTIVE, (long *)&sl->flags); | 987 | clear_bit(W1_SLAVE_ACTIVE, &sl->flags); |
| 988 | 988 | ||
| 989 | w1_search_devices(dev, search_type, cb); | 989 | w1_search_devices(dev, search_type, cb); |
| 990 | 990 | ||
| 991 | list_for_each_entry_safe(sl, sln, &dev->slist, w1_slave_entry) { | 991 | list_for_each_entry_safe(sl, sln, &dev->slist, w1_slave_entry) { |
| 992 | if (!test_bit(W1_SLAVE_ACTIVE, (unsigned long *)&sl->flags) && !--sl->ttl) | 992 | if (!test_bit(W1_SLAVE_ACTIVE, &sl->flags) && !--sl->ttl) |
| 993 | w1_slave_detach(sl); | 993 | w1_slave_detach(sl); |
| 994 | else if (test_bit(W1_SLAVE_ACTIVE, (unsigned long *)&sl->flags)) | 994 | else if (test_bit(W1_SLAVE_ACTIVE, &sl->flags)) |
| 995 | sl->ttl = dev->slave_ttl; | 995 | sl->ttl = dev->slave_ttl; |
| 996 | } | 996 | } |
| 997 | 997 | ||
diff --git a/drivers/w1/w1.h b/drivers/w1/w1.h index 45908e56c2f8..ca8081a101d6 100644 --- a/drivers/w1/w1.h +++ b/drivers/w1/w1.h | |||
| @@ -67,8 +67,8 @@ struct w1_slave | |||
| 67 | struct w1_reg_num reg_num; | 67 | struct w1_reg_num reg_num; |
| 68 | atomic_t refcnt; | 68 | atomic_t refcnt; |
| 69 | u8 rom[9]; | 69 | u8 rom[9]; |
| 70 | u32 flags; | ||
| 71 | int ttl; | 70 | int ttl; |
| 71 | unsigned long flags; | ||
| 72 | 72 | ||
| 73 | struct w1_master *master; | 73 | struct w1_master *master; |
| 74 | struct w1_family *family; | 74 | struct w1_family *family; |
