Re: [PATCH V2 RESEND] tty/n_gsm.c: use gsm->num to remove mux itself from gsm_mux[]

From: Greg KH
Date: Wed Aug 31 2016 - 10:01:36 EST


On Thu, Jul 14, 2016 at 04:37:51PM +0800, xinhui wrote:
> From: Pan Xinhui <xinhui.pan@xxxxxxxxxxxxxxxxxx>
>
> There is one filed gsm->num to store mux's index of gsm_mux[]. So use
> gsm->num to remove itself from gsm_mux[] instead of the for-loop
> traverse in gsm_cleanup_mux().
>
> Signed-off-by: Pan Xinhui <xinhui.pan@xxxxxxxxxxxxxxxxxx>
> Reviewed-by: Alan Cox <alan@xxxxxxxxxxxxxxx>
> ---
> change from V1:
> lock is also held for the if()
> ---
> drivers/tty/n_gsm.c | 13 +++++--------
> 1 file changed, 5 insertions(+), 8 deletions(-)

Doesn't apply to my tree :(