]> git.hungrycats.org Git - linux/commitdiff
[PATCH] HPET copyrights, cleanup
authorBjorn Helgaas <bjorn.helgaas@hp.com>
Mon, 2 Aug 2004 03:14:28 +0000 (20:14 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Mon, 2 Aug 2004 03:14:28 +0000 (20:14 -0700)
This patch
- adds copyright and license info
- changes sense of mmap config option (setting option enables mmap
  instead of disabling it, to avoid the double negative)
- removes an #ifdef CONFIG_IA64 now that acpi_register_gsi()
  is generic.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/char/Kconfig
drivers/char/hpet.c

index 60c50c2eb1af16b183caeacc128322b09aad4228..37e0673510752220d5f4b95891e5f59e26a1a54d 100644 (file)
@@ -976,14 +976,18 @@ config HPET_RTC_IRQ
          is assumed the platform called hpet_alloc with the RTC IRQ values for
          the HPET timers.
 
-config HPET_NOMMAP
-       bool "HPET - Control mmap capability."
-       default n
+config HPET_MMAP
+       bool "Allow mmap of HPET"
+       default y
        depends on HPET
        help
-         If you say Y here, then the mmap interface for the HPET driver returns ENOSYS.
-         Some hardware implementations might not want all the memory in the page the
-         HPET control registers reside to be exposed.
+         If you say Y here, user applications will be able to mmap
+         the HPET registers.
+
+         In some hardware implementations, the page containing HPET
+         registers may also contain other things that shouldn't be
+         exposed to the user.  If this applies to your hardware,
+         say N here.
 
 config MAX_RAW_DEVS
        int "Maximum number of RAW devices to support (1-8192)"
index 36d9d2876b1606eb825e5d8b47d1bf2c7dce6124..5e8c472446ef0855626add5a852bf8a2113a4bda 100644 (file)
@@ -1,8 +1,14 @@
 /*
  * Intel & MS High Precision Event Timer Implementation.
- * Contributors:
+ *
+ * Copyright (C) 2003 Intel Corporation
  *     Venki Pallipadi
- *     Bob Picco
+ * (c) Copyright 2004 Hewlett-Packard Development Company, L.P.
+ *     Bob Picco <robert.picco@hp.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
  */
 
 #include <linux/config.h>
@@ -250,9 +256,7 @@ static unsigned int hpet_poll(struct file *file, poll_table * wait)
 
 static int hpet_mmap(struct file *file, struct vm_area_struct *vma)
 {
-#ifdef CONFIG_HPET_NOMMAP
-       return -ENOSYS;
-#else
+#ifdef CONFIG_HPET_MMAP
        struct hpet_dev *devp;
        unsigned long addr;
 
@@ -276,6 +280,8 @@ static int hpet_mmap(struct file *file, struct vm_area_struct *vma)
        }
 
        return 0;
+#else
+       return -ENOSYS;
 #endif
 }
 
@@ -901,14 +907,10 @@ static acpi_status __init hpet_resources(struct acpi_resource *res, void *data)
                        hdp->hd_nirqs = irqp->number_of_interrupts;
 
                        for (i = 0; i < hdp->hd_nirqs; i++)
-#ifdef CONFIG_IA64
                                hdp->hd_irq[i] =
                                    acpi_register_gsi(irqp->interrupts[i],
                                                      irqp->edge_level,
                                                      irqp->active_high_low);
-#else
-                               hdp->hd_irq[i] = irqp->interrupts[i];
-#endif
                }
        }