From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Daniel Mack <zonque@gmail.com>
Cc: linux-input@vger.kernel.org, jhovold@gmail.com,
hartleys@visionengravers.com
Subject: Re: [PATCH v2 1/2] input: rotary-encoder: switch to devm_* allocation of GPIOs and IRQs
Date: Wed, 25 Jul 2012 09:05:10 -0700 [thread overview]
Message-ID: <20120725160510.GA6276@core.coreip.homeip.net> (raw)
In-Reply-To: <1343202228-1507-1-git-send-email-zonque@gmail.com>
On Wed, Jul 25, 2012 at 09:43:47AM +0200, Daniel Mack wrote:
> @@ -263,12 +243,7 @@ exit_free_mem:
> static int __devexit rotary_encoder_remove(struct platform_device *pdev)
> {
> struct rotary_encoder *encoder = platform_get_drvdata(pdev);
> - struct rotary_encoder_platform_data *pdata = pdev->dev.platform_data;
>
> - free_irq(encoder->irq_a, encoder);
> - free_irq(encoder->irq_b, encoder);
> - gpio_free(pdata->gpio_a);
> - gpio_free(pdata->gpio_b);
> input_unregister_device(encoder->input);
Another botched devm_ conversion. *sigh*
Input device gone, IRQ arrives, kernel goes oops, machine hangs hard.
Please, do not use devm_ interfaces unless... Actually, just do not use
nor suggest devm_interfaces until all resources are devm-ized. Mixing 2
styles of releasing resources leads to trouble.
Thanks.
--
Dmitry
next prev parent reply other threads:[~2012-07-25 16:05 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-25 7:43 [PATCH v2 1/2] input: rotary-encoder: switch to devm_* allocation of GPIOs and IRQs Daniel Mack
2012-07-25 7:43 ` [PATCH v2 2/2] input: rotary-encoder: add DT bindings Daniel Mack
2012-07-25 16:05 ` Dmitry Torokhov [this message]
2012-07-25 16:07 ` [PATCH v2 1/2] input: rotary-encoder: switch to devm_* allocation of GPIOs and IRQs Daniel Mack
2012-07-25 16:29 ` Dmitry Torokhov
2012-07-25 18:04 ` Daniel Mack
2012-07-25 16:07 ` H Hartley Sweeten
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=20120725160510.GA6276@core.coreip.homeip.net \
--to=dmitry.torokhov@gmail.com \
--cc=hartleys@visionengravers.com \
--cc=jhovold@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=zonque@gmail.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 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).