From: Bjorn Helgaas <bjorn.helgaas@hp.com>
To: Venkatesh Pallipadi <venki@google.com>
Cc: Clemens Ladisch <clemens@ladisch.de>,
linux-acpi@vger.kernel.org, Vojtech Pavlik <vojtech@suse.cz>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] hpet: convert to PNP driver
Date: Wed, 17 Mar 2010 16:00:18 -0700 [thread overview]
Message-ID: <201003171700.19573.bjorn.helgaas@hp.com> (raw)
In-Reply-To: <3055132f1003171518o46c4712bk5089a7bab8574019@mail.gmail.com>
On Wednesday 17 March 2010 04:18:27 pm Venkatesh Pallipadi wrote:
> On Wed, Mar 17, 2010 at 10:35 AM, Bjorn Helgaas <bjorn.helgaas@hp.com> wrote:
> >
> > PNPACPI already parses _CRS, and does a more complete job than we did here,
> > so let's just take advantage of that.
>
> Patch looks good.
> One comment is that we now have a dependency on CONFIG_PNP. That
> probably needs to be added in drivers/char/Kconfig. But, that also
> means we may fail for users who do not have PNP in their config today.
> May be just select PNP when HPET is selected?
Good point; I missed that. I could just add #ifdef CONFIG_PNP around
the relevant code in hpet.c. That's the typical way we handle this.
drivers/char/hpet.c already depends on ACPI for another reason
(acpi_irq_model), and we do select PNP whenever CONFIG_ACPI=y, so
I don't think the CONFIG_PNP=n case will arise in practice. But
it'd probably be better to have the #ifdef wrapper than to have the
implicit dependency on the "select PNP" in drivers/acpi/Kconfig.
> > Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
> > ---
> >
> > drivers/char/hpet.c | 103 +++++++++++++--------------------------------------
> > 1 files changed, 27 insertions(+), 76 deletions(-)
> >
> >
> >
> > - if (!data.hd_address || !data.hd_nirqs) {
> > - printk("%s: no address or irqs in _CRS\n", __func__);
> > - return -ENODEV;
> > - }
> > + data.hd_address = ioremap(mem->start, resource_size(mem));
> >
> > return hpet_alloc(&data);
> > }
>
> Not a problem with this patch. But, don't we have a problem of rogue
> ioremap when hpet_alloc() fails here?
You're right. I'll add a patch to fix that while I'm at it.
Bjorn
next prev parent reply other threads:[~2010-03-17 23:00 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-17 17:34 [PATCH 0/3] hpet: convert from ACPI " Bjorn Helgaas
2010-03-17 17:35 ` [PATCH 1/3] hpet: convert " Bjorn Helgaas
2010-03-17 22:18 ` Venkatesh Pallipadi
2010-03-17 23:00 ` Bjorn Helgaas [this message]
2010-03-17 17:35 ` [PATCH 2/3] hpet: pass physical address, not entire hpet_data, to hpet_is_known() Bjorn Helgaas
2010-03-18 7:27 ` Clemens Ladisch
2010-03-17 17:35 ` [PATCH 3/3] MAINTAINERS: remove obsolete HPET ACPI entry Bjorn Helgaas
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=201003171700.19573.bjorn.helgaas@hp.com \
--to=bjorn.helgaas@hp.com \
--cc=clemens@ladisch.de \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=venki@google.com \
--cc=vojtech@suse.cz \
/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®