mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Philipp Zabel <p.zabel@pengutronix.de>
To: Axel Lin <axel.lin@ingics.com>
Cc: Mark Brown <broonie@kernel.org>, Takashi Iwai <tiwai@suse.com>,
	Arnaud Pouliquen <arnaud.pouliquen@st.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] reset: Add (devm_)reset_control_get stub functions
Date: Mon, 31 Aug 2015 18:01:26 +0200	[thread overview]
Message-ID: <1441036886.3234.50.camel@pengutronix.de> (raw)
In-Reply-To: <1441012943.22251.1.camel@ingics.com>

Hi Axel,

thank you for the patch.

Am Montag, den 31.08.2015, 17:22 +0800 schrieb Axel Lin:
> So the drivers can be compiled with CONFIG_RESET_CONTROLLER disabled.
> 
> Signed-off-by: Axel Lin <axel.lin@ingics.com>
> ---
>  include/linux/reset.h | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/include/linux/reset.h b/include/linux/reset.h
> index da5602b..cd42c1b 100644
> --- a/include/linux/reset.h
> +++ b/include/linux/reset.h
> @@ -74,6 +74,18 @@ static inline int device_reset_optional(struct device *dev)
>  	return -ENOSYS;
>  }
>  
> +static inline struct reset_control *reset_control_get(
> +					struct device *dev, const char *id)
> +{
> +	return ERR_PTR(-ENOSYS);
> +}
> +
> +static inline struct reset_control *devm_reset_control_get(
> +					struct device *dev, const char *id)
> +{
> +	return ERR_PTR(-ENOSYS);
> +}
> +

Could you add a WARN_ON(1) to both, make them __must_check, and return
something other than -ENOSYS. For example the gpio stubs return -EINVAL.

regards
Philipp


      parent reply	other threads:[~2015-08-31 16:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-31  9:22 Axel Lin
2015-08-31 14:56 ` Mark Brown
2015-08-31 16:01 ` Philipp Zabel [this message]

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=1441036886.3234.50.camel@pengutronix.de \
    --to=p.zabel@pengutronix.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=arnaud.pouliquen@st.com \
    --cc=axel.lin@ingics.com \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tiwai@suse.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®