[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 07 Jul 2015 17:04:24 +0300
From: "Ivan T. Ivanov" <ivan.ivanov@...aro.org>
To: Roger Quadros <rogerq@...com>
Cc: cw00.choi@...sung.com, linux-omap@...r.kernel.org,
linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: Re: [PATCH v2 1/2] extcon: fix hang and
extcon_get/set_cable_state().
On Tue, 2015-07-07 at 16:06 +0300, Roger Quadros wrote:
> Users of find_cable_index_by_name() will cause a kernel hang
> as the while loop counter is never incremented and end condition
> is never reached.
>
> extcon_get_cable_state() and extcon_set_cable_state() are broken
> because they use cable index instead of cable id. This causes
> the first cable state (cable.0) to be always invalid in sysfs
> or extcon_get_cable_state() users.
>
> Introduce a new function find_cable_id_by_name() that fixes
> both of the above issues.
>
> Fixes: commit 73b6ecdb93e8 ("extcon: Redefine the unique id of supported external connectors without 'enum extcon' type")
> Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
> Signed-off-by: Roger Quadros <rogerq@...com>
> ---
Thank you. It is fine now. For both patches.
Tested-by: Ivan T. Ivanov <ivan.ivanov@...aro.org>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists