[patch][2.5] ISAPNP helper macros

Zwane Mwaikambo (zwane@holomorphy.com)
Mon, 16 Dec 2002 03:25:31 -0500 (EST)


I Don't think there is anything wrong with keeping these in, and they
simplify in the conversion process.

Index: linux-2.5.51/include/linux/pnp.h
===================================================================
RCS file: /build/cvsroot/linux-2.5.51/include/linux/pnp.h,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 pnp.h
--- linux-2.5.51/include/linux/pnp.h 10 Dec 2002 12:47:35 -0000 1.1.1.1
+++ linux-2.5.51/include/linux/pnp.h 11 Dec 2002 23:12:06 -0000
@@ -23,6 +23,16 @@
#define DEVICE_COUNT_RESOURCE 12
#define MAX_DEVICES 8

+#define ISAPNP_ANY_ID 0xffff
+#define ISAPNP_VENDOR(a,b,c) (((((a)-'A'+1)&0x3f)<<2)|\
+ ((((b)-'A'+1)&0x18)>>3)|((((b)-'A'+1)&7)<<13)|\
+ ((((c)-'A'+1)&0x1f)<<8))
+#define ISAPNP_DEVICE(x) ((((x)&0xf000)>>8)|\
+ (((x)&0x0f00)>>8)|\
+ (((x)&0x00f0)<<8)|\
+ (((x)&0x000f)<<8))
+#define ISAPNP_FUNCTION(x) ISAPNP_DEVICE(x)
+
struct pnp_resource;
struct pnp_protocol;
struct pnp_id;

-- 
function.linuxpower.ca
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/