From: jiada_wang@mentor.com (Jiada Wang)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3] clk: implement clk_unregister
Date: Tue, 4 Jun 2013 16:43:04 +0900 [thread overview]
Message-ID: <51AD9A88.2070706@mentor.com> (raw)
In-Reply-To: <857E9EDCA6C0904DB3357321AA9123EB6246497F@NA-MBX-03.mgc.mentorg.com>
Hello
Wang, Jiada (ESD) wrote:
>
> -----Original Message-----
> From: Russell King - ARM Linux [mailto:linux at arm.linux.org.uk]
> Sent: Monday, June 03, 2013 6:46 PM
> To: Wang, Jiada (ESD)
> Cc: linux-arm-kernel at lists.infradead.org; u.kleine-koenig at pengutronix.de
> Subject: Re: [PATCH v3] clk: implement clk_unregister
>
> On Mon, Jun 03, 2013 at 05:37:06PM +0900, Jiada Wang wrote:
>> Currently clk_unregister is unimplemented, it is required in case sub
>> modules want actually remove clk device registered by clk_register.
>> This patch adds the implementation of clk_unregister.
>
> So what if someone has clk_get()'d this clock but not prepared it?
> No, this is the wrong approach. If we want to do this then clocks must be reference counted and freed when the refcount gets to zero, just like struct device etc.
>
> We have struct kref as the base structure in the kernel for dealing with these problems, please look at using it.
>
Russell
Thanks for your comment, I will look at kref.
Thanks,
jiada
next prev parent reply other threads:[~2013-06-04 7:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-03 8:37 [PATCH v3] clk: implement clk_unregister Jiada Wang
2013-06-03 9:11 ` Uwe Kleine-König
[not found] ` <857E9EDCA6C0904DB3357321AA9123EB6246498A@NA-MBX-03.mgc.mentorg.com>
2013-06-04 7:29 ` Jiada Wang
2013-06-03 9:46 ` Russell King - ARM Linux
[not found] ` <857E9EDCA6C0904DB3357321AA9123EB6246497F@NA-MBX-03.mgc.mentorg.com>
2013-06-04 7:43 ` Jiada Wang [this message]
2013-07-17 11:28 ` Sylwester Nawrocki
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=51AD9A88.2070706@mentor.com \
--to=jiada_wang@mentor.com \
--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.