All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Boyd <sboyd@codeaurora.org>
To: Joachim Eastwood <manabian@gmail.com>
Cc: Michael Turquette <mturquette@baylibre.com>,
	linux-clk <linux-clk@vger.kernel.org>,
	devicetree@vger.kernel.org
Subject: Re: [PATCH v4 1/2] clk: add lpc18xx creg clk driver
Date: Thu, 3 Mar 2016 12:13:45 -0800	[thread overview]
Message-ID: <20160303201345.GD24999@codeaurora.org> (raw)
In-Reply-To: <CAGhQ9VzmTrDmKF+_8CRFgioyrXUOR9uOk-KADw2seEa16OP78A@mail.gmail.com>

On 03/03, Joachim Eastwood wrote:
> On 3 March 2016 at 00:01, Michael Turquette <mturquette@baylibre.com> wrote:
> >
> > This should be devm_clk_register with your struct device *dev passed
> > into it.
> 
> Since clk_register_creg_clk() is used both from early init and probe
> I'll need to change the function a bit.
> 
> I'll pass dev in as a parameter and either do clk_register() or
> devm_clk_register() depending on dev being NULL or not.
> Doesn't look like devm_clk_register() would like to be passed NULL for dev.
> 
> 
> I send out a new version tomorrow.
> 
> btw, this driver is a builtin_platform_driver. So is there a point in
> using devm_clk_register?
> 

Builtin drivers can still probe defer or fail for other reasons,
so just in case that happens it's better to use
devm_clk_register() to make sure we cleanup on the error path. It
may never actually happen in practice, but it's better to write
safe drivers.

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

  reply	other threads:[~2016-03-03 20:13 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-24 22:04 [PATCH v4 0/2] CREG clk driver for NXP LPC18xx family Joachim Eastwood
2016-02-24 22:04 ` [PATCH v4 1/2] clk: add lpc18xx creg clk driver Joachim Eastwood
2016-03-02 23:01   ` Michael Turquette
2016-03-02 23:01     ` Michael Turquette
2016-03-02 23:27     ` Joachim Eastwood
2016-03-03 20:13       ` Stephen Boyd [this message]
2016-02-24 22:04 ` [PATCH v4 2/2] doc: dt: add documentation for lpc1850-creg-clk driver Joachim Eastwood
2016-03-02 17:31   ` Rob Herring

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=20160303201345.GD24999@codeaurora.org \
    --to=sboyd@codeaurora.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=manabian@gmail.com \
    --cc=mturquette@baylibre.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 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.