lkml.org 
[lkml]   [2010]   [Mar]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 1/3] hpet: convert to PNP driver
From
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?

> 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?

Thanks,
Venki
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2010-03-17 23:21    [W:0.073 / U:1.260 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site