Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

authored by

Rene Herman and committed by
Linus Torvalds
b563cf59 a63cc18f

+8 -6
+1 -1
drivers/pnp/base.h
··· 147 147 void dbg_pnp_show_resources(struct pnp_dev *dev, char *desc); 148 148 149 149 void pnp_free_resources(struct pnp_dev *dev); 150 - int pnp_resource_type(struct resource *res); 150 + unsigned long pnp_resource_type(struct resource *res); 151 151 152 152 struct pnp_resource { 153 153 struct list_head list;
+1 -1
drivers/pnp/quirks.c
··· 245 245 */ 246 246 for_each_pci_dev(pdev) { 247 247 for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) { 248 - unsigned int type; 248 + unsigned long type; 249 249 250 250 type = pci_resource_flags(pdev, i) & 251 251 (IORESOURCE_IO | IORESOURCE_MEM);
+2 -2
drivers/pnp/resource.c
··· 467 467 #endif 468 468 } 469 469 470 - int pnp_resource_type(struct resource *res) 470 + unsigned long pnp_resource_type(struct resource *res) 471 471 { 472 472 return res->flags & (IORESOURCE_IO | IORESOURCE_MEM | 473 473 IORESOURCE_IRQ | IORESOURCE_DMA); 474 474 } 475 475 476 476 struct resource *pnp_get_resource(struct pnp_dev *dev, 477 - unsigned int type, unsigned int num) 477 + unsigned long type, unsigned int num) 478 478 { 479 479 struct pnp_resource *pnp_res; 480 480 struct resource *res;
+4 -2
include/linux/pnp.h
··· 22 22 * Resource Management 23 23 */ 24 24 #ifdef CONFIG_PNP 25 - struct resource *pnp_get_resource(struct pnp_dev *, unsigned int, unsigned int); 25 + struct resource *pnp_get_resource(struct pnp_dev *dev, unsigned long type, 26 + unsigned int num); 26 27 #else 27 - static inline struct resource *pnp_get_resource(struct pnp_dev *dev, unsigned int type, unsigned int num) 28 + static inline struct resource *pnp_get_resource(struct pnp_dev *dev, 29 + unsigned long type, unsigned int num) 28 30 { 29 31 return NULL; 30 32 }