Re: [PATCH 1/3] hpet: convert to PNP driver
From: Venkatesh Pallipadi
Date: Wed Mar 17 2010 - 18:18:39 EST
On Wed, Mar 17, 2010 at 10:35 AM, Bjorn Helgaas <bjorn.helgaas@xxxxxx> 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?
> Signed-off-by: Bjorn Helgaas <bjorn.helgaas@xxxxxx>
> ---
>
> 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?
Thanks,
Venki
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/