ChangeSet 1.1807.56.29, 2004/08/06 15:32:54-07:00, johnpol@2ka.mipt.ru [PATCH] w1: Debug output cleanup. memcpy instead of direct structure copying. Debug output cleanup. memcpy instead of direct structure copying. Signed-off-by: Evgeniy Polyakov Signed-off-by: Greg Kroah-Hartman drivers/w1/w1.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff -Nru a/drivers/w1/w1.c b/drivers/w1/w1.c --- a/drivers/w1/w1.c 2004-08-23 11:03:51 -07:00 +++ b/drivers/w1/w1.c 2004-08-23 11:03:51 -07:00 @@ -406,8 +406,8 @@ f = w1_family_registered(rn->family); if (!f) { spin_unlock(&w1_flock); - dev_info(&dev->dev, "Family %x is not registered.\n", - rn->family); + dev_info(&dev->dev, "Family %x for %02x.%012llx.%02x is not registered.\n", + rn->family, rn->family, rn->id, rn->crc); kfree(sl); return -ENODEV; } @@ -428,7 +428,7 @@ dev->slave_count++; - msg.id.id = *rn; + memcpy(&msg.id.id, rn, sizeof(msg.id.id)); msg.type = W1_SLAVE_ADD; w1_netlink_send(dev, &msg); @@ -449,7 +449,7 @@ device_unregister(&sl->dev); w1_family_put(sl->family); - msg.id.id = sl->reg_num; + memcpy(&msg.id.id, &sl->reg_num, sizeof(msg.id.id)); msg.type = W1_SLAVE_REMOVE; w1_netlink_send(sl->master, &msg); }