linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Roger Quadros <rogerq@ti.com>
To: "Ivan T. Ivanov" <ivan.ivanov@linaro.org>
Cc: cw00.choi@samsung.com, linux-omap@vger.kernel.org,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: Re: [PATCH 1/2] extcon: fix hang and extcon_get/set_cable_state().
Date: Tue, 7 Jul 2015 15:58:43 +0300	[thread overview]
Message-ID: <559BCD03.30103@ti.com> (raw)
In-Reply-To: <1436272845.2190.3.camel@linaro.org>

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

  reply	other threads:[~2015-07-07 12:58 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-06 14:46 [PATCH 0/2] extcon: fixes for v4.2-rc1 Roger Quadros
2015-07-06 14:46 ` [PATCH 1/2] extcon: fix hang and extcon_get/set_cable_state() Roger Quadros
     [not found]   ` <1436194018-18696-2-git-send-email-rogerq-l0cyMroinI0@public.gmane.org>
2015-07-07 12:40     ` Ivan T. Ivanov
2015-07-07 12:58       ` Roger Quadros [this message]
2015-07-07 13:06     ` [PATCH v2 " Roger Quadros
2015-07-10 15:54       ` Chanwoo Choi
     [not found]         ` <CAGTfZH3qM6_R8F8bE7oEUYhS0hW0hv7fKzYJ6K6z+dZmExCExA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-07-27 10:39           ` Roger Quadros
2015-07-27 23:26             ` Chanwoo Choi
     [not found]       ` <1436274375-10308-1-git-send-email-rogerq-l0cyMroinI0@public.gmane.org>
2015-07-07 14:04         ` Ivan T. Ivanov
2015-07-31  3:43         ` Chanwoo Choi
2015-07-06 14:46 ` [PATCH 2/2] extcon: Fix extcon_cable_get_state() from getting old state after notification Roger Quadros
2015-07-31  6:38   ` Chanwoo Choi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=559BCD03.30103@ti.com \
    --to=rogerq@ti.com \
    --cc=cw00.choi@samsung.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=ivan.ivanov@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).