Re: [PATCH 1/1] HPET: unmap unused I/O space

From: Clemens Ladisch
Date: Tue Aug 24 2010 - 02:38:25 EST


Jiri Slaby wrote:
> When the initialization code in hpet founds a memory resource and does
> not found IRQ, it does not unmap the memory resource previously
> mapped.
> [...]
> Since I got no reply previously, fix this by simply unmapping the
> space when IRQ is not found and memory region was mapped previously.
>
> Signed-off-by: Jiri Slaby <jslaby@xxxxxxx>
> Cc: Clemens Ladisch <clemens@xxxxxxxxxx>

Acked-by: Clemens Ladisch <clemens@xxxxxxxxxx>

> ---
> drivers/char/hpet.c | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> --- a/drivers/char/hpet.c
> +++ b/drivers/char/hpet.c
> @@ -1017,6 +1017,8 @@ static int hpet_acpi_add(struct acpi_device *device)
> return -ENODEV;
>
> if (!data.hd_address || !data.hd_nirqs) {
> + if (data.hd_address)
> + iounmap(data.hd_address);
> printk("%s: no address or irqs in _CRS\n", __func__);
> return -ENODEV;
> }
--
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/