From: Florian Fainelli <f.fainelli@gmail.com>
To: Timur Tabi <timur@codeaurora.org>,
David Miller <davem@davemloft.net>,
netdev@vger.kernel.org,
Christopher Covington <cov@codeaurora.org>,
alokc@codeaurora.org
Subject: Re: [PATCH] net: qcom/emac: don't try to claim clocks on ACPI systems
Date: Tue, 13 Dec 2016 13:46:31 -0800 [thread overview]
Message-ID: <d6683e1c-803d-3859-f125-93fecaa0df02@gmail.com> (raw)
In-Reply-To: <1481658930-565-1-git-send-email-timur@codeaurora.org>
On 12/13/2016 11:55 AM, Timur Tabi wrote:
> On ACPI systems, clocks are not available to drivers directly. They are
> handled exclusively by ACPI and/or firmware, so there is no clock driver.
> Calls to clk_get() always fail, so we should not even attempt to claim
> any clocks on ACPI systems.
>
> Signed-off-by: Timur Tabi <timur@codeaurora.org>
> ---
> drivers/net/ethernet/qualcomm/emac/emac.c | 22 ++++++++++++----------
> 1 file changed, 12 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/net/ethernet/qualcomm/emac/emac.c b/drivers/net/ethernet/qualcomm/emac/emac.c
> index ae32f85..b1c1cdc 100644
> --- a/drivers/net/ethernet/qualcomm/emac/emac.c
> +++ b/drivers/net/ethernet/qualcomm/emac/emac.c
> @@ -627,11 +627,12 @@ static int emac_probe(struct platform_device *pdev)
> if (ret)
> goto err_undo_netdev;
>
> - /* initialize clocks */
> - ret = emac_clks_phase1_init(pdev, adpt);
> - if (ret) {
> - dev_err(&pdev->dev, "could not initialize clocks\n");
> - goto err_undo_netdev;
> + if (!has_acpi_companion(&pdev->dev)) {
Is there a reason why the check is not moved down inwo
emac_clks_phase{1,2}_init functions? Do you anticipate other
ACPI-related changes in the future that would warrant having this check
moved at a higher level?
--
Florian
next prev parent reply other threads:[~2016-12-13 21:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-13 19:55 [PATCH] net: qcom/emac: don't try to claim clocks on ACPI systems Timur Tabi
2016-12-13 21:46 ` Florian Fainelli [this message]
2016-12-13 21:54 ` Timur Tabi
2016-12-13 22:02 ` Florian Fainelli
2016-12-13 22:05 ` Timur Tabi
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=d6683e1c-803d-3859-f125-93fecaa0df02@gmail.com \
--to=f.fainelli@gmail.com \
--cc=alokc@codeaurora.org \
--cc=cov@codeaurora.org \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=timur@codeaurora.org \
/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;
as well as URLs for NNTP newsgroup(s).