Update unregister_device_internal.