mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Maxime Ripard <maxime.ripard@free-electrons.com>
To: Felipe Balbi <balbi@ti.com>
Cc: p.zabel@pengutronix.de, marex@denx.de, wsa@the-dreams.de,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Alan Stern <stern@rowland.harvard.edu>
Subject: Re: [PATCH] reset: stub out devm_reset_control_get()
Date: Tue, 13 May 2014 17:54:01 +0200	[thread overview]
Message-ID: <20140513155401.GD29258@lukather> (raw)
In-Reply-To: <1399995245-15095-1-git-send-email-balbi@ti.com>

[-- Attachment #1: Type: text/plain, Size: 1148 bytes --]

On Tue, May 13, 2014 at 10:34:05AM -0500, Felipe Balbi wrote:
> without that stub, drivers will fail to build
> when CONFIG_RESET_CONTROLLER=n.
> 
> Signed-off-by: Felipe Balbi <balbi@ti.com>
> ---
>  include/linux/reset.h | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/include/linux/reset.h b/include/linux/reset.h
> index c0eda50..aa94420 100644
> --- a/include/linux/reset.h
> +++ b/include/linux/reset.h
> @@ -75,6 +75,12 @@ static inline struct reset_control *devm_reset_control_get_optional(
>  	return ERR_PTR(-ENOSYS);
>  }
>  
> +static inline struct reset_control *devm_reset_control_get(
> +					struct device *dev, const char *id)
> +{
> +	return ERR_PTR(-ENOSYS);
> +}
> +

reset_control_get should only be used in cases where the reset
controller is mandatory for the driver to work, and hence, this driver
should select or depend on CONFIG_RESET_CONTROLLER

If the reset controller is optional, reset_control_get_optional should
be preferred, that is stubed out.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2014-05-13 15:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-13 15:34 Felipe Balbi
2014-05-13 15:54 ` Maxime Ripard [this message]
2014-05-13 15:58   ` Felipe Balbi

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=20140513155401.GD29258@lukather \
    --to=maxime.ripard@free-electrons.com \
    --cc=balbi@ti.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marex@denx.de \
    --cc=p.zabel@pengutronix.de \
    --cc=stern@rowland.harvard.edu \
    --cc=wsa@the-dreams.de \
    /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®