Calculation of current-induced torque from spin continuity equation