public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Samuel Ortiz <sameo@openedhand.com>
To: pHilipp Zabel <philipp.zabel@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/7] MFD: ASIC3: add clock handling for MFD cells
Date: Fri, 5 Jun 2009 18:58:14 +0200	[thread overview]
Message-ID: <20090605165813.GC1039@sortiz.org> (raw)
In-Reply-To: <74d0deb30906050927i428f732ehc76ac592c87d44b3@mail.gmail.com>

On Fri, Jun 05, 2009 at 06:27:20PM +0200, pHilipp Zabel wrote:
> On Fri, Jun 5, 2009 at 1:49 AM, Samuel Ortiz<sameo@openedhand.com> wrote:
> > Hi Philipp,
> >
> > On Thu, Jun 04, 2009 at 08:36:11PM +0200, Philipp Zabel wrote:
> >> +
> >> +struct asic3_clk {
> >> +     int enabled;
> > You probably want to use a kref here.
> >
> >> +static int asic3_clk_enable(struct asic3 *asic, struct asic3_clk *clk)
> >> +{
> >> +     unsigned long flags;
> >> +     u32 cdex;
> >> +
> >> +     spin_lock_irqsave(&asic->lock, flags);
> >> +     if (clk->enabled++ == 0) {
> > using the kref API here would definitely be nicer.
> 
> While I agree that the kref API looks nice, I'm not convinced it is
> intended to be used in this case. We are not counting references here.
> There is no way to get the count back from the API, which we need to
> decide whether or not to flip the CDEX bits. 
Fair enough.


> We could misuse the
> release function pointer given to kref_put to turn off the clock, but
> I'd prefer to leave it the way it is now.
That's fine with me.

Cheers,
Samuel.

-- 
Intel Open Source Technology Centre
http://oss.intel.com/

  reply	other threads:[~2009-06-05 16:56 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-04 18:36 [PATCH 0/7] ASIC3 updates Philipp Zabel
2009-06-04 18:36 ` [PATCH 1/7] MFD: ASIC3: add API for EXTCF and SDHWCTRL register manipulation Philipp Zabel
2009-06-04 23:46   ` Samuel Ortiz
2009-06-05 16:25     ` pHilipp Zabel
2009-06-04 18:36 ` [PATCH 2/7] MFD: ASIC3: add clock handling for MFD cells Philipp Zabel
2009-06-04 23:49   ` Samuel Ortiz
2009-06-05 16:27     ` pHilipp Zabel
2009-06-05 16:58       ` Samuel Ortiz [this message]
2009-06-04 18:36 ` [PATCH 3/7] MFD: ASIC3: add ASIC3 IRQ numbers Philipp Zabel
2009-06-04 18:36 ` [PATCH 4/7] MFD: ASIC3: use resource_size macro instead of local variable Philipp Zabel
2009-06-04 18:36 ` [PATCH 5/7] MFD: ASIC3: remove SD/SDIO controller register definitions Philipp Zabel
2009-06-04 18:36 ` [PATCH 6/7] MFD: ASIC3: enable DS1WM cell Philipp Zabel
2009-06-04 18:36 ` [PATCH 7/7] MFD: ASIC3: enable SD/SDIO cell Philipp Zabel
  -- strict thread matches above, loose matches on Subject: below --
2009-06-05 16:31 [PATCH 0/7] ASIC3 updates (v2) Philipp Zabel
2009-06-05 16:31 ` [PATCH 2/7] MFD: ASIC3: add clock handling for MFD cells Philipp Zabel

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=20090605165813.GC1039@sortiz.org \
    --to=sameo@openedhand.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=philipp.zabel@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