From: Mark Brown <broonie@kernel.org>
To: Wenyou Yang <wenyou.yang@atmel.com>
Cc: Liam Girdwood <lgirdwood@gmail.com>,
Rob Herring <robh+dt@kernel.org>, Pawel Moll <pawel.moll@arm.com>,
Mark Rutland <mark.rutland@arm.com>,
Ian Campbell <ijc+devicetree@hellion.org.uk>,
Kumar Gala <galak@codeaurora.org>,
Nicolas Ferre <nicolas.ferre@atmel.com>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH 1/2] regulator: act8945a: add regulator driver for ACT8945A
Date: Fri, 15 Jan 2016 17:57:57 +0000 [thread overview]
Message-ID: <20160115175757.GA6588@sirena.org.uk> (raw)
In-Reply-To: <1452218938-10621-2-git-send-email-wenyou.yang@atmel.com>
[-- Attachment #1: Type: text/plain, Size: 871 bytes --]
On Fri, Jan 08, 2016 at 10:08:57AM +0800, Wenyou Yang wrote:
> + np = of_get_child_by_name(pdev->dev.of_node, "regulators");
> + if (!np) {
> + dev_err(&pdev->dev, "regulator node not found\n");
> + return -EINVAL;
> + }
> +
> + matches = act8945a_matches;
> + num_matches = ARRAY_SIZE(act8945a_matches);
> +
> + ret = of_regulator_match(&pdev->dev, np, matches, num_matches);
Don't open code this, use the core regulators_node and of_match
implementation instead.
> + dev_info(act8945a_dev->dev, "%s regulator registered\n",
> + desc->name);
This is just noise, please remove it - let the core handle notifying
users.
> +static int __init act8945a_pmic_init(void)
> +{
> + return platform_driver_register(&act8945a_pmic_driver);
> +}
> +subsys_initcall(act8945a_pmic_init);
Please use module_platform_driver() unless there is a strong reason to
do otherwise.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
next prev parent reply other threads:[~2016-01-15 17:58 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-08 2:08 [PATCH 0/2] regulator: act8945a: add regulator driver for the sub-device of ACT8945A MFD Wenyou Yang
2016-01-08 2:08 ` [PATCH 1/2] regulator: act8945a: add regulator driver for ACT8945A Wenyou Yang
2016-01-15 17:57 ` Mark Brown [this message]
2016-01-20 7:12 ` Yang, Wenyou
2016-01-08 2:08 ` [PATCH 2/2] regulator: add documentation for ACT8945A's regulator DT bindings Wenyou Yang
2016-01-09 15:35 ` Rob Herring
2016-01-12 7:55 ` Yang, Wenyou
2016-01-15 17:59 ` Mark Brown
2016-01-18 1:31 ` Yang, Wenyou
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=20160115175757.GA6588@sirena.org.uk \
--to=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=galak@codeaurora.org \
--cc=ijc+devicetree@hellion.org.uk \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=nicolas.ferre@atmel.com \
--cc=pawel.moll@arm.com \
--cc=robh+dt@kernel.org \
--cc=wenyou.yang@atmel.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