pnp: make the resource type an unsigned long
authorRene Herman <rene.herman@keyaccess.nl>
Thu, 16 Oct 2008 05:03:58 +0000 (22:03 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 16 Oct 2008 18:21:45 +0000 (11:21 -0700)
PnP encodes the resource type directly as its struct resource->flags value
which is an unsigned long.  Make it so...

Signed-off-by: Rene Herman <rene.herman@gmail.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Acked-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Cc: Andi Kleen <andi@firstfloor.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/pnp/base.h
drivers/pnp/quirks.c
drivers/pnp/resource.c
include/linux/pnp.h

index 9fd7bb9b7dce2579d1955a055ad5bf362f0e14b2..7cc7bf5304aa040cef5d6132642b5dc21d47c347 100644 (file)
@@ -147,7 +147,7 @@ char *pnp_resource_type_name(struct resource *res);
 void dbg_pnp_show_resources(struct pnp_dev *dev, char *desc);
 
 void pnp_free_resources(struct pnp_dev *dev);
-int pnp_resource_type(struct resource *res);
+unsigned long pnp_resource_type(struct resource *res);
 
 struct pnp_resource {
        struct list_head list;
index 0bdf9b8a5e58593d308ecc95f25fb7d2209e2998..d15e2b77af889fda464c269dc10ce919504bcfe7 100644 (file)
@@ -245,7 +245,7 @@ static void quirk_system_pci_resources(struct pnp_dev *dev)
         */
        for_each_pci_dev(pdev) {
                for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) {
-                       unsigned int type;
+                       unsigned long type;
 
                        type = pci_resource_flags(pdev, i) &
                                        (IORESOURCE_IO | IORESOURCE_MEM);
index 4cfe3a1efdfbc24a213abc838dab1631abf9f5d4..dbae23acdd5b12e1df4a83164dbec01a4c6d7a54 100644 (file)
@@ -467,14 +467,14 @@ int pnp_check_dma(struct pnp_dev *dev, struct resource *res)
 #endif
 }
 
-int pnp_resource_type(struct resource *res)
+unsigned long pnp_resource_type(struct resource *res)
 {
        return res->flags & (IORESOURCE_IO  | IORESOURCE_MEM |
                             IORESOURCE_IRQ | IORESOURCE_DMA);
 }
 
 struct resource *pnp_get_resource(struct pnp_dev *dev,
-                                 unsigned int type, unsigned int num)
+                                 unsigned long type, unsigned int num)
 {
        struct pnp_resource *pnp_res;
        struct resource *res;
index be764e514e35946eeced5615440769912da9e0fa..53b70fd1d9a535d92639a66757646ce5620e21f9 100644 (file)
@@ -22,9 +22,11 @@ struct pnp_dev;
  * Resource Management
  */
 #ifdef CONFIG_PNP
-struct resource *pnp_get_resource(struct pnp_dev *, unsigned int, unsigned int);
+struct resource *pnp_get_resource(struct pnp_dev *dev, unsigned long type,
+                               unsigned int num);
 #else
-static inline struct resource *pnp_get_resource(struct pnp_dev *dev, unsigned int type, unsigned int num)
+static inline struct resource *pnp_get_resource(struct pnp_dev *dev,
+                       unsigned long type, unsigned int num)
 {
        return NULL;
 }