mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
To: alessandro.zummo@towertech.it
Cc: andy.sharp@lsi.com, thomas.hommel@gefanuc.com,
	rtc-linux@googlegroups.com, linux-kernel@vger.kernel.org,
	akpm@linux-foundation.org
Subject: Re: [PATCH 1/2] rtc-ds1511: Fix races around device registration
Date: Tue, 13 Oct 2009 02:04:15 +0900 (JST)	[thread overview]
Message-ID: <20091013.020415.78716977.anemo@mba.ocn.ne.jp> (raw)
In-Reply-To: <20091012184739.46bb1052@i1501.lan.towertech.it>

On Mon, 12 Oct 2009 18:47:39 +0200, Alessandro Zummo <alessandro.zummo@towertech.it> wrote:
> > * Call dev_set_drvdata before rtc device creation
> > * Use its own spinlock instead of rtc->irq_lock
> 
>  why?

Because pdata->rtc must be initialized to use the irq_lock
(pdata->rtc->irq_lock).  There is a small window which rtc methods can
be called before pdata->rtc is initialized.

And there is no need use the irq_lock to protect hardware registers.
The driver's own spinlock shoule be enough.

---
Atsushi Nemoto

  reply	other threads:[~2009-10-12 17:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-12 16:37 Atsushi Nemoto
2009-10-12 16:47 ` Alessandro Zummo
2009-10-12 17:04   ` Atsushi Nemoto [this message]
  -- strict thread matches above, loose matches on Subject: below --
2009-10-11 17:50 Atsushi Nemoto

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=20091013.020415.78716977.anemo@mba.ocn.ne.jp \
    --to=anemo@mba.ocn.ne.jp \
    --cc=akpm@linux-foundation.org \
    --cc=alessandro.zummo@towertech.it \
    --cc=andy.sharp@lsi.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rtc-linux@googlegroups.com \
    --cc=thomas.hommel@gefanuc.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

all inboxes | Powered by JetHome®