From: Arnd Bergmann <arnd@arndb.de>
To: ashish.jangam@kpitcummins.com
Cc: rpurdie@rpsys.net, tfransosi@gmail.com,
linux-kernel@vger.kernel.org, linaro-dev@lists.linaro.org,
dchen@diasemi.com
Subject: Re: [PATCH 9/11] Backlight: DA9052 Backlight driver v1
Date: Tue, 5 Jul 2011 16:50:18 +0200 [thread overview]
Message-ID: <201107051650.19178.arnd@arndb.de> (raw)
In-Reply-To: <1309270692.376.227.camel@L-0532.kpit.com>
On Tuesday 28 June 2011, ashishj3 wrote:
> +static struct platform_driver da9052_wled1_driver = {
> + .probe = da9052_backlight_probe,
> + .remove = da9052_backlight_remove,
> + .driver = {
> + .name = "da9052-WLED1",
> + .owner = THIS_MODULE,
> + },
> +};
> +
> +static struct platform_driver da9052_wled2_driver = {
> + .probe = da9052_backlight_probe,
> + .remove = da9052_backlight_remove,
> + .driver = {
> + .name = "da9052-WLED2",
> + .owner = THIS_MODULE,
> + },
> +};
> +
> +static struct platform_driver da9052_wled3_driver = {
> + .probe = da9052_backlight_probe,
> + .remove = da9052_backlight_remove,
> + .driver = {
> + .name = "da9052-WLED3",
> + .owner = THIS_MODULE,
> + },
> +};
> +
> +static int __init da9052_backlight_init(void)
> +{
> + int ret;
> +
> + ret = platform_driver_register(&da9052_wled1_driver);
> + if (ret)
> + return ret;
> +
> + ret = platform_driver_register(&da9052_wled2_driver);
> + if (ret)
> + return ret;
> +
> + ret = platform_driver_register(&da9052_wled3_driver);
> + if (ret)
> + return ret;
> +
> + return 0;
> +}
> +module_init(da9052_backlight_init);
As mentioned before, you should only need to register a single driver
for these three devices: Either you name them all the same and just
give the individual devices a different platform_device->id, or
you leave them with different names and add a platform_driver->id_table
to match them all.
Arnd
prev parent reply other threads:[~2011-07-05 14:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-28 14:18 [PATCH 9/11] Backlight: DA9052 Backlight driver v1 ashishj3
2011-07-05 10:29 ` ashishj3
2011-07-05 14:50 ` Arnd Bergmann [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=201107051650.19178.arnd@arndb.de \
--to=arnd@arndb.de \
--cc=ashish.jangam@kpitcummins.com \
--cc=dchen@diasemi.com \
--cc=linaro-dev@lists.linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rpurdie@rpsys.net \
--cc=tfransosi@gmail.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