From: Arnd Bergmann <arnd@arndb.de>
To: Peter Griffin <peter.griffin@linaro.org>
Cc: linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, gregkh@linuxfoundation.org,
stern@rowland.harvard.edu, srinivas.kandagatla@gmail.com,
maxime.coquelin@st.com, patrice.chotard@st.com,
lee.jones@linaro.org, devicetree@vger.kernel.org,
linux-usb@vger.kernel.org
Subject: Re: [PATCH v3 1/6] usb: host: usb-st-common: Add common code required by ohci-st and ehci-st
Date: Wed, 6 Aug 2014 22:59:10 +0200 [thread overview]
Message-ID: <201408062259.10697.arnd@arndb.de> (raw)
In-Reply-To: <1407344589-24863-2-git-send-email-peter.griffin@linaro.org>
On Wednesday 06 August 2014, Peter Griffin wrote:
> +int st_usb_platform_power_on(struct st_platform_priv *priv)
> +{
> + int clk, ret;
> +
> + if (priv->pwr) {
> + ret = reset_control_deassert(priv->pwr);
> + if (ret)
> + return ret;
> + }
> +
> + if (priv->rst) {
> + ret =
> (priv->rst);
> + if (ret)
> + goto err_assert_power;
> + }
I wouldn't make these optional, just call the functions
unconditionally and fail the probe function if they are
not available.
I'm not sure if it's worth keeping these functions in a
common file. You are adding complexity this way and I don't
think you are even saving a significant number of code lines
compared to just having two copies of them.
> +EXPORT_SYMBOL(st_usb_platform_power_on);
If you want to keep them, it would be best to make
Arnd
next prev parent reply other threads:[~2014-08-06 21:00 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-06 17:03 [PATCH v3 0/6] Add EHCI and OHCI drivers for STi SoC's Peter Griffin
2014-08-06 17:03 ` [PATCH v3 1/6] usb: host: usb-st-common: Add common code required by ohci-st and ehci-st Peter Griffin
2014-08-06 20:59 ` Arnd Bergmann [this message]
2014-08-07 14:14 ` Peter Griffin
2014-08-07 14:16 ` Peter Griffin
2014-08-06 17:03 ` [PATCH v3 2/6] usb: host: ehci-st: Add EHCI support for ST STB devices Peter Griffin
2014-08-06 21:07 ` Arnd Bergmann
2014-08-07 14:13 ` Peter Griffin
2014-08-06 17:03 ` [PATCH v3 3/6] usb: host: ohci-st: Add OHCI driver " Peter Griffin
2014-08-06 17:03 ` [PATCH v3 4/6] usb: host: ehci-st: Add ehci-st devicetree bindings documentation Peter Griffin
2014-08-06 17:03 ` [PATCH v3 5/6] usb: host: ohci-st: Add ohci-st " Peter Griffin
2014-08-06 17:03 ` [PATCH v3 6/6] MAINTAINERS: Add ehci-st.c and ohci-st.c to ARCH/STI architecture Peter Griffin
2014-08-06 21:18 ` [PATCH v3 0/6] Add EHCI and OHCI drivers for STi SoC's Arnd Bergmann
2014-08-07 14:47 ` Peter Griffin
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=201408062259.10697.arnd@arndb.de \
--to=arnd@arndb.de \
--cc=devicetree@vger.kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=lee.jones@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=maxime.coquelin@st.com \
--cc=patrice.chotard@st.com \
--cc=peter.griffin@linaro.org \
--cc=srinivas.kandagatla@gmail.com \
--cc=stern@rowland.harvard.edu \
/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