All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sourav <sourav.poddar@ti.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: devicetree-discuss@lists.ozlabs.org,
	linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-input@vger.kernel.org,
	b-cousson@ti.com, balbi@ti.com, santosh.shilimkar@ti.com
Subject: Re: [PATCHv3 2/4] Input: keypad: Add smsc ece1099 keypad driver
Date: Thu, 4 Oct 2012 13:45:23 +0530	[thread overview]
Message-ID: <506D459B.3070504@ti.com> (raw)
In-Reply-To: <20121004072426.GB14217@core.coreip.homeip.net>

Hi Dmitry,
On Thursday 04 October 2012 12:54 PM, Dmitry Torokhov wrote:
> On Wed, Oct 03, 2012 at 11:26:46AM +0530, Poddar, Sourav wrote:
>> Hi Dmitry,
>>
>> On Tue, Oct 2, 2012 at 11:48 AM, Dmitry Torokhov
>> <dmitry.torokhov@gmail.com> wrote:
>>> Hi Sourav,
>>>
>>> On Mon, Oct 01, 2012 at 04:31:50PM +0530, Sourav Poddar wrote:
>>>> From: G, Manjunath Kondaiah <manjugk@ti.com>
>>>>
>>>> +
>>>> +     /* Enable smsc keypad interrupts */
>>>> +     ret = smsc_write(dev, SMSC_KP_INT_MASK, 0xff);
>>>> +     if (ret < 0)
>>>> +             goto err2;
>>>> +
>>>> +     return 0;
>>>> +
>>>> +err2:
>>>> +     input_unregister_device(input);
>>>> +err1:
>>>> +     input_free_device(input);
>>> Double free.
>>>
>> I believe what you are trying to say here is that we dont really
>> need a " input_unregister_device" (as also I checked in other keypad
>> implementations) and do a "unregister_device" in the remove api ??
> What I was trying to say is that if input device has been registered
> then you need to call input_unregister_device() to unregister and free
> it, otherwise you need to call input_free_device(), but not both.
>
> Thanks.
Ok. Thanks for the clarification. Will update and post a new version.

~Sourav


WARNING: multiple messages have this Message-ID (diff)
From: sourav.poddar@ti.com (Sourav)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCHv3 2/4] Input: keypad: Add smsc ece1099 keypad driver
Date: Thu, 4 Oct 2012 13:45:23 +0530	[thread overview]
Message-ID: <506D459B.3070504@ti.com> (raw)
In-Reply-To: <20121004072426.GB14217@core.coreip.homeip.net>

Hi Dmitry,
On Thursday 04 October 2012 12:54 PM, Dmitry Torokhov wrote:
> On Wed, Oct 03, 2012 at 11:26:46AM +0530, Poddar, Sourav wrote:
>> Hi Dmitry,
>>
>> On Tue, Oct 2, 2012 at 11:48 AM, Dmitry Torokhov
>> <dmitry.torokhov@gmail.com> wrote:
>>> Hi Sourav,
>>>
>>> On Mon, Oct 01, 2012 at 04:31:50PM +0530, Sourav Poddar wrote:
>>>> From: G, Manjunath Kondaiah <manjugk@ti.com>
>>>>
>>>> +
>>>> +     /* Enable smsc keypad interrupts */
>>>> +     ret = smsc_write(dev, SMSC_KP_INT_MASK, 0xff);
>>>> +     if (ret < 0)
>>>> +             goto err2;
>>>> +
>>>> +     return 0;
>>>> +
>>>> +err2:
>>>> +     input_unregister_device(input);
>>>> +err1:
>>>> +     input_free_device(input);
>>> Double free.
>>>
>> I believe what you are trying to say here is that we dont really
>> need a " input_unregister_device" (as also I checked in other keypad
>> implementations) and do a "unregister_device" in the remove api ??
> What I was trying to say is that if input device has been registered
> then you need to call input_unregister_device() to unregister and free
> it, otherwise you need to call input_free_device(), but not both.
>
> Thanks.
Ok. Thanks for the clarification. Will update and post a new version.

~Sourav

WARNING: multiple messages have this Message-ID (diff)
From: Sourav <sourav.poddar@ti.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: <devicetree-discuss@lists.ozlabs.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-omap@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<linux-input@vger.kernel.org>, <b-cousson@ti.com>, <balbi@ti.com>,
	<santosh.shilimkar@ti.com>
Subject: Re: [PATCHv3 2/4] Input: keypad: Add smsc ece1099 keypad driver
Date: Thu, 4 Oct 2012 13:45:23 +0530	[thread overview]
Message-ID: <506D459B.3070504@ti.com> (raw)
In-Reply-To: <20121004072426.GB14217@core.coreip.homeip.net>

Hi Dmitry,
On Thursday 04 October 2012 12:54 PM, Dmitry Torokhov wrote:
> On Wed, Oct 03, 2012 at 11:26:46AM +0530, Poddar, Sourav wrote:
>> Hi Dmitry,
>>
>> On Tue, Oct 2, 2012 at 11:48 AM, Dmitry Torokhov
>> <dmitry.torokhov@gmail.com> wrote:
>>> Hi Sourav,
>>>
>>> On Mon, Oct 01, 2012 at 04:31:50PM +0530, Sourav Poddar wrote:
>>>> From: G, Manjunath Kondaiah <manjugk@ti.com>
>>>>
>>>> +
>>>> +     /* Enable smsc keypad interrupts */
>>>> +     ret = smsc_write(dev, SMSC_KP_INT_MASK, 0xff);
>>>> +     if (ret < 0)
>>>> +             goto err2;
>>>> +
>>>> +     return 0;
>>>> +
>>>> +err2:
>>>> +     input_unregister_device(input);
>>>> +err1:
>>>> +     input_free_device(input);
>>> Double free.
>>>
>> I believe what you are trying to say here is that we dont really
>> need a " input_unregister_device" (as also I checked in other keypad
>> implementations) and do a "unregister_device" in the remove api ??
> What I was trying to say is that if input device has been registered
> then you need to call input_unregister_device() to unregister and free
> it, otherwise you need to call input_free_device(), but not both.
>
> Thanks.
Ok. Thanks for the clarification. Will update and post a new version.

~Sourav


  reply	other threads:[~2012-10-04  8:15 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-01 11:01 [PATCHv3 2/4] Input: keypad: Add smsc ece1099 keypad driver Sourav Poddar
2012-10-01 11:01 ` Sourav Poddar
2012-10-01 11:01 ` Sourav Poddar
2012-10-01 14:58 ` Shubhrajyoti
2012-10-01 14:58   ` Shubhrajyoti
2012-10-02  6:18 ` Dmitry Torokhov
2012-10-02  6:18   ` Dmitry Torokhov
2012-10-03  5:56   ` Poddar, Sourav
2012-10-03  5:56     ` Poddar, Sourav
2012-10-04  7:24     ` Dmitry Torokhov
2012-10-04  7:24       ` Dmitry Torokhov
2012-10-04  8:15       ` Sourav [this message]
2012-10-04  8:15         ` Sourav
2012-10-04  8:15         ` Sourav

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=506D459B.3070504@ti.com \
    --to=sourav.poddar@ti.com \
    --cc=b-cousson@ti.com \
    --cc=balbi@ti.com \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=santosh.shilimkar@ti.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.