Commit b563cf59 authored by Rene Herman's avatar Rene Herman Committed by Linus Torvalds

pnp: make the resource type an unsigned long

PnP encodes the resource type directly as its struct resource->flags value
which is an unsigned long.  Make it so...
Signed-off-by: default avatarRene Herman <rene.herman@gmail.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Acked-by: default avatarBjorn Helgaas <bjorn.helgaas@hp.com>
Cc: Andi Kleen <andi@firstfloor.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent a63cc18f
...@@ -147,7 +147,7 @@ char *pnp_resource_type_name(struct resource *res); ...@@ -147,7 +147,7 @@ char *pnp_resource_type_name(struct resource *res);
void dbg_pnp_show_resources(struct pnp_dev *dev, char *desc); void dbg_pnp_show_resources(struct pnp_dev *dev, char *desc);
void pnp_free_resources(struct pnp_dev *dev); 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 pnp_resource {
struct list_head list; struct list_head list;
......
...@@ -245,7 +245,7 @@ static void quirk_system_pci_resources(struct pnp_dev *dev) ...@@ -245,7 +245,7 @@ static void quirk_system_pci_resources(struct pnp_dev *dev)
*/ */
for_each_pci_dev(pdev) { for_each_pci_dev(pdev) {
for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) { for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) {
unsigned int type; unsigned long type;
type = pci_resource_flags(pdev, i) & type = pci_resource_flags(pdev, i) &
(IORESOURCE_IO | IORESOURCE_MEM); (IORESOURCE_IO | IORESOURCE_MEM);
......
...@@ -467,14 +467,14 @@ int pnp_check_dma(struct pnp_dev *dev, struct resource *res) ...@@ -467,14 +467,14 @@ int pnp_check_dma(struct pnp_dev *dev, struct resource *res)
#endif #endif
} }
int pnp_resource_type(struct resource *res) unsigned long pnp_resource_type(struct resource *res)
{ {
return res->flags & (IORESOURCE_IO | IORESOURCE_MEM | return res->flags & (IORESOURCE_IO | IORESOURCE_MEM |
IORESOURCE_IRQ | IORESOURCE_DMA); IORESOURCE_IRQ | IORESOURCE_DMA);
} }
struct resource *pnp_get_resource(struct pnp_dev *dev, 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 pnp_resource *pnp_res;
struct resource *res; struct resource *res;
......
...@@ -22,9 +22,11 @@ struct pnp_dev; ...@@ -22,9 +22,11 @@ struct pnp_dev;
* Resource Management * Resource Management
*/ */
#ifdef CONFIG_PNP #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 #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; return NULL;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment