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 v3] mfd: Add LPC driver for Intel ICH chipsets
Date: Fri, 17 Feb 2012 22:21:55 +0100 [thread overview]
Message-ID: <20120217222155.435195d2@endymion.delvare> (raw)
In-Reply-To: <cd679d99-46c9-4f8a-8f03-474637e013a8@zimbra>
Hi Aaron,
On Fri, 17 Feb 2012 12:18:18 -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>
Tested-by: Jean Delvare <khali@linux-fr.org>
> ---
> drivers/mfd/Kconfig | 9 +
> drivers/mfd/Makefile | 1 +
> drivers/mfd/lpc_ich.c | 513 +++++++++++++++++++++++++++++++++++++++++++
> include/linux/mfd/lpc_ich.h | 32 +++
> 4 files changed, 555 insertions(+), 0 deletions(-)
> create mode 100644 drivers/mfd/lpc_ich.c
> create mode 100644 include/linux/mfd/lpc_ich.h
Looks alright this time, except:
> +static void __devexit lpc_ich_remove(struct pci_dev *dev)
> +{
> + mfd_remove_devices(&dev->dev);
> +
> + if (lpc_ich_gpio_save > 0)
> + pci_write_config_byte(dev, GPIOCTRL, (u8)lpc_ich_gpio_save);
> + if (lpc_ich_acpi_save > 0)
> + pci_write_config_byte(dev, ACPICTRL, (u8)lpc_ich_acpi_save);
I think you really mean >= 0 above. And the casts aren't needed. You
should also reset lpc_ich_gpio_save and lpc_ich_acpi_save to -1 after
restoring the values, it matters if the device is removed and re-added
through sysfs.
This cleanup is missing from the error path in lpc_ich_probe, BTW. You
may want to move it to a separate function so that you can call it from
both lpc_ich_probe and lpc_ich_remove.
--
Jean Delvare
next prev parent reply other threads:[~2012-02-17 21:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <0080ec60-4f91-4642-bf3b-42ab667b3b13@zimbra>
2012-02-17 18:18 ` Aaron Sierra
2012-02-17 21:21 ` Jean Delvare [this message]
2012-02-17 22:03 ` Aaron Sierra
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=20120217222155.435195d2@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®