From: Stephen Boyd <sboyd@codeaurora.org>
To: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Cc: Michael Turquette <mturquette@baylibre.com>,
s.hauer@pengutronix.de, jeremy.kerr@canonical.com,
linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3] clk: fixed-factor: Convert into a module platform driver
Date: Wed, 15 Jun 2016 17:47:41 -0700 [thread overview]
Message-ID: <20160616004741.GR28218@codeaurora.org> (raw)
In-Reply-To: <1465381201-11537-3-git-send-email-ricardo.ribalda@gmail.com>
On 06/08, Ricardo Ribalda Delgado wrote:
> if (of_property_read_u32(node, "clock-mult", &mult)) {
> pr_err("%s Fixed factor clock <%s> must have a clock-mult property\n",
> __func__, node->name);
> - return;
> + return ERR_PTR(-EIO);
> }
>
> of_property_read_string(node, "clock-output-names", &clk_name);
> @@ -171,8 +172,67 @@ void __init of_fixed_factor_clk_setup(struct device_node *node)
> mult, div);
> if (!IS_ERR(clk))
> of_clk_add_provider(node, of_clk_src_simple_get, clk);
What if this fails now?
> +
> + return clk;
> +}
> +
[..]
> +
> +static const struct of_device_id of_fixed_factor_clk_ids[] = {
> + {
> + .compatible = "fixed-factor-clock",
> + },
> + { },
> +};
Nitpick: Do it this way:
static const struct of_device_id of_fixed_factor_clk_ids[] = {
{ .compatible = "fixed-factor-clock" },
{ }
};
> +MODULE_DEVICE_TABLE(of, of_fixed_factor_clk_ids);
> +
> +static struct platform_driver of_fixed_factor_clk_driver = {
> + .driver = {
> + .name = "of_fixed_factor_clk",
> + .of_match_table = of_fixed_factor_clk_ids,
> + },
> + .probe = of_fixed_factor_clk_probe,
> + .remove = of_fixed_factor_clk_remove,
> +};
> +
> +module_platform_driver(of_fixed_factor_clk_driver);
> +
This should be builtin_platform_driver() because these are obj-y
right now.
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
next prev parent reply other threads:[~2016-06-16 0:47 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-08 10:19 [PATCH 0/3] Convert clk-fixed into module platform driver Ricardo Ribalda Delgado
2016-06-08 10:19 ` [PATCH 1/3] clk: Add new function of_clk_is_provider() Ricardo Ribalda Delgado
2016-06-16 0:44 ` Stephen Boyd
2016-06-20 13:31 ` Ricardo Ribalda Delgado
2016-06-21 1:30 ` Stephen Boyd
2016-06-21 8:38 ` Ricardo Ribalda Delgado
2016-06-08 10:20 ` [PATCH 2/3] clk: fixed-factor: Convert into a module platform driver Ricardo Ribalda Delgado
2016-06-16 0:47 ` Stephen Boyd [this message]
2016-06-08 10:20 ` [PATCH 3/3] clk: fixed-rate: " Ricardo Ribalda Delgado
2016-06-14 17:39 ` [PATCH 0/3] Convert clk-fixed into " Stephen Boyd
2016-06-14 22:59 ` Ricardo Ribalda Delgado
2016-06-16 0:27 ` Stephen Boyd
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=20160616004741.GR28218@codeaurora.org \
--to=sboyd@codeaurora.org \
--cc=jeremy.kerr@canonical.com \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=ricardo.ribalda@gmail.com \
--cc=s.hauer@pengutronix.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;
as well as URLs for NNTP newsgroup(s).