From: corbet@lwn.net (Jonathan Corbet)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2] [media] marvell-ccic: simplify and fix clk handling (a bit)
Date: Wed, 25 Sep 2013 01:15:20 -0600 [thread overview]
Message-ID: <20130925011520.1fa24013@lwn.net> (raw)
In-Reply-To: <1380049187-16036-1-git-send-email-u.kleine-koenig@pengutronix.de>
On Tue, 24 Sep 2013 20:59:47 +0200
Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de> wrote:
> The marvell-ccic does several things wrong or ineffectively in the clock
> handling and it's usage of the devm_* stuff
>
> - it assumes clk_get doesn't return NULL
> - it explicitly calls devm_clk_put instead just keeping the reference
> during it's lifetime and let the driver core call it
> - it calls kfree, gpio_free and free_irq for resources it requested
> using devm_kzalloc, devm_gpio_request and devm_request_irq
> respectively.
> - it mixes devm_ and unmanaged resources which probably results in a
> race condition during remove
OK, all of that stuff was added this time around by Libin; my
understanding of that particular hardware is ... minimal. The basic
idea of the patch seems sound. I do note, though, that you've changed
the behavior of the driver somewhat. The MIPI clock is current
obtained at power-up time and released on power-down; you've moved it
to probe time instead, and it's held for the lifetime of the driver.
Perhaps that's even better, I don't know...Libin, what do you say on
that?
The free_irq() call is also removed by a patch previously submitted by
Wei Yongjun.
> This patch fixes all but the last issue in this list. This patch doesn't
> introduce new reasons for not building, but there are already several
> bulid problems.
Care to report those?
Thanks,
jon
next prev parent reply other threads:[~2013-09-25 7:15 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-23 15:45 [PATCH] clk: fix function name in devm_clk_put kernel-doc comment Uwe Kleine-König
2013-09-23 15:53 ` [PATCH] serial: clps711x: drop needless devm_clk_put Uwe Kleine-König
2013-09-23 15:53 ` Uwe Kleine-König
2013-09-23 16:00 ` [PATCH] remoteproc/davinci: " Uwe Kleine-König
2014-02-24 15:07 ` Ohad Ben-Cohen
2013-09-23 16:13 ` [PATCH] video: mmp: drop needless devm cleanup Uwe Kleine-König
2013-09-23 16:13 ` Uwe Kleine-König
2013-09-23 16:19 ` Russell King - ARM Linux
2013-09-23 16:19 ` Russell King - ARM Linux
2013-09-24 7:34 ` Tomi Valkeinen
2013-09-24 7:34 ` Tomi Valkeinen
2013-09-24 7:55 ` Zhou Zhu
2013-09-24 7:55 ` Zhou Zhu
2013-09-26 8:43 ` Tomi Valkeinen
2013-09-26 8:43 ` Tomi Valkeinen
2013-09-23 16:28 ` [PATCH] clk: fix function name in devm_clk_put kernel-doc comment Russell King - ARM Linux
2013-09-24 18:12 ` [PATCH] ASoC: kirkwood: simplify clock handling Uwe Kleine-König
2013-09-24 18:12 ` Uwe Kleine-König
2013-09-24 18:38 ` Russell King - ARM Linux
2013-09-24 18:38 ` Russell King - ARM Linux
2013-09-24 19:04 ` Jean-Francois Moine
2013-09-24 19:04 ` Jean-Francois Moine
2013-09-24 19:05 ` Russell King - ARM Linux
2013-09-24 19:05 ` Russell King - ARM Linux
2013-09-24 19:24 ` Uwe Kleine-König
2013-09-24 19:24 ` Uwe Kleine-König
2013-09-24 18:42 ` [PATCH] [media] marvell-ccic: simplify and fix clk handling (a bit) Uwe Kleine-König
2013-09-24 18:59 ` [PATCH v2] " Uwe Kleine-König
2013-09-25 7:15 ` Jonathan Corbet [this message]
2013-09-26 2:47 ` Libin Yang
2013-09-26 8:13 ` Uwe Kleine-König
2013-09-26 8:24 ` Russell King - ARM Linux
2013-09-26 10:08 ` Libin Yang
2013-09-26 10:03 ` Libin Yang
2013-09-24 19:20 ` [PATCH] [RFC] devm: drop devm_clk_put Uwe Kleine-König
2013-09-24 19:20 ` Uwe Kleine-König
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=20130925011520.1fa24013@lwn.net \
--to=corbet@lwn.net \
--cc=linux-arm-kernel@lists.infradead.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 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.