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. Ivan > + return id; > +}; > -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html