Hi,
On 07/07/15 15:40, Ivan T. Ivanov wrote:
On Mon, 2015-07-06 at 17:46 +0300, Roger Quadros wrote:
-static int find_cable_index_by_name(struct extcon_dev *edev, const char *name)
+static int find_cable_id_by_name(struct extcon_dev *edev, const char *name)
{
- unsigned int id = EXTCON_NONE;
+ unsigned int id = -EINVAL;
int i = 0;
- if (edev->max_supported == 0)
- return -EINVAL;
-
- /* Find the the number of extcon cable */
+ /* Find the id of extcon cable */
while (extcon_name[i]) {
if (!strncmp(extcon_name[i], name, CABLE_NAME_MAX)) {
id = i;
@@ -140,6 +137,19 @@ static int find_cable_index_by_name(struct extcon_dev
*edev, const char *name)
}
}
Thank you Roger, but this still hang. 'i' is not incremented.
You are right. Thanks for pointing out.
I will send out a v2.
Ivan
+ return id;
+};
cheers,
-roger
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/