From: Vitaly Kuznetsov Date: Fri, 16 Sep 2016 16:01:17 +0000 (-0700) Subject: Drivers: hv: make VMBus bus ids persistent X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=b294809dbfa7e50229d00253d43f9a56e5d6a0ba;p=linux-beck.git Drivers: hv: make VMBus bus ids persistent Some tools use bus ids to identify devices and they count on the fact that these ids are persistent across reboot. This may be not true for VMBus as we use auto incremented counter from alloc_channel() as such id. Switch to using if_instance from channel offer, this id is supposed to be persistent. Signed-off-by: Vitaly Kuznetsov Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c index 6cbe07462785..a259e18d22d5 100644 --- a/drivers/hv/vmbus_drv.c +++ b/drivers/hv/vmbus_drv.c @@ -961,8 +961,8 @@ int vmbus_device_register(struct hv_device *child_device_obj) { int ret = 0; - dev_set_name(&child_device_obj->device, "vmbus_%d", - child_device_obj->channel->id); + dev_set_name(&child_device_obj->device, "vmbus-%pUl", + child_device_obj->channel->offermsg.offer.if_instance.b); child_device_obj->device.bus = &hv_bus; child_device_obj->device.parent = &hv_acpi_dev->dev;