From: Jean Delvare <khali@linux-fr.org>
To: Aaron Sierra <asierra@xes-inc.com>
Cc: Guenter Roeck <guenter@roeck-us.net>,
Peter Tyser <ptyser@xes-inc.com>,
Grant Likely <grant.likely@secretlab.ca>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/3 v4] mfd: Add LPC driver for Intel ICH chipsets
Date: Sat, 18 Feb 2012 20:44:48 +0100 [thread overview]
Message-ID: <20120218204448.224903bf@endymion.delvare> (raw)
In-Reply-To: <f493506b-2223-4c1d-8572-d8f7f06961b6@zimbra>
Oh, BTW...
On Fri, 17 Feb 2012 17:28:23 -0600 (CST), Aaron Sierra wrote:
> This driver currently creates resources for use by a forthcoming ICH
> chipset GPIO driver. It could be expanded to created the resources for
> converting the esb2rom (mtd) and iTCO_wdt (wdt), and potentially more,
> drivers to use the mfd model.
>
> Signed-off-by: Aaron Sierra <asierra@xes-inc.com>
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
> ---
> (...)
> +static void lpc_ich_finalize_cell(struct mfd_cell *cell,
> + const struct pci_device_id *id)
> +{
> + cell->id = id->driver_data;
I don't think this makes any sense. By using global variables for
per-device resources and states, your driver pretty much assumes that
at most one supported device is present on every given system (which is
indeed always the case AFAIK.) So you should set id to 0 here...
> + cell->platform_data = &lpc_chipset_info[id->driver_data];
> + cell->pdata_size = sizeof(struct lpc_ich_info);
> +}
> (...)
> + ret = mfd_add_devices(&dev->dev, 0, &lpc_ich_cells[LPC_GPIO],
> + 1, NULL, 0);
... and to -1 here, so that the platform devices created don't receive a
number at all. Many mfd drivers do exactly this.
--
Jean Delvare
prev parent reply other threads:[~2012-02-18 19:44 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <c68928fc-816e-4738-9108-ee3dfbf6427b@zimbra>
2012-02-17 23:28 ` Aaron Sierra
2012-02-18 17:31 ` Jean Delvare
2012-02-20 20:36 ` Aaron Sierra
2012-02-21 14:28 ` Jean Delvare
2012-02-21 22:21 ` Aaron Sierra
2012-02-18 19:44 ` Jean Delvare [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=20120218204448.224903bf@endymion.delvare \
--to=khali@linux-fr.org \
--cc=asierra@xes-inc.com \
--cc=grant.likely@secretlab.ca \
--cc=guenter@roeck-us.net \
--cc=linux-kernel@vger.kernel.org \
--cc=ptyser@xes-inc.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
all inboxes | Powered by JetHome®