Could you please help with the following situation?

The Company A (subsidiary) has financial liability to the third party. This liability is recognized at amortized cost using effective interest rate method as it repayable in 2020. We expect that this liability will be sold in 2010 by third party to parent of company A. After this transaction we expect that Company A will issue new shares as full settlement of this liability.

My question relates to derecognition of this liability => difference between carrying amount of liability and its fair value. Is it necessary to expense this difference or is there any option to recognize it within the equity? (preferable..:)

Thanks for your help.