From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Fabio Estevam <fabio.estevam@freescale.com>
Cc: shawn.guo@linaro.org, linux-input@vger.kernel.org
Subject: Re: [PATCH] Input: egalax_ts - Provide a .remove function
Date: Wed, 24 Jul 2013 14:08:23 -0700 [thread overview]
Message-ID: <1706568.zcsuYSPDks@dtor-d630.eng.vmware.com> (raw)
In-Reply-To: <1374698769-25664-1-git-send-email-fabio.estevam@freescale.com>
Hi Fabio,
On Wednesday, July 24, 2013 05:46:09 PM Fabio Estevam wrote:
> Provide a .remove function so that we can unregister the input device.
>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---
> drivers/input/touchscreen/egalax_ts.c | 11 +++++++++++
> 1 file changed, 11 insertions(+)
>
> diff --git a/drivers/input/touchscreen/egalax_ts.c
> b/drivers/input/touchscreen/egalax_ts.c index ef5fcb0..e46be61 100644
> --- a/drivers/input/touchscreen/egalax_ts.c
> +++ b/drivers/input/touchscreen/egalax_ts.c
> @@ -234,6 +234,16 @@ static int egalax_ts_probe(struct i2c_client *client,
> return 0;
> }
>
> +static int egalax_ts_remove(struct i2c_client *client)
> +{
> + struct egalax_ts *ts = i2c_get_clientdata(client);
> +
> + input_unregister_device(ts->input_dev);
> + kfree(ts);
The egalax_ts driver has been converted to devm* infrastructure, using kfree()
to free memory not only unnecessary, but wrong.
Thanks.
--
Dmitry
prev parent reply other threads:[~2013-07-24 21:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-24 20:46 [PATCH] Input: egalax_ts - Provide a .remove function Fabio Estevam
2013-07-24 21:08 ` Dmitry Torokhov [this message]
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=1706568.zcsuYSPDks@dtor-d630.eng.vmware.com \
--to=dmitry.torokhov@gmail.com \
--cc=fabio.estevam@freescale.com \
--cc=linux-input@vger.kernel.org \
--cc=shawn.guo@linaro.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).