2000-11-16 11:30:52

by Adam J. Richter

[permalink] [raw]
Subject: Patch(?): linux-2.4.0-test11-pre5 ISAPNP_DEVICE simplification


I think the definition of ISAPNP_DEVICE in
linux-2.4.0-test11-pre5/include/linux/isapnp.h is unnecessarily complex.
Here is a proposed patch.

Adam J. Richter __ ______________ 4880 Stevens Creek Blvd, Suite 104
[email protected] \ / San Jose, California 95129-1034
+1 408 261-6630 | g g d r a s i l United States of America
fax +1 408 261-6631 "Free Software For The Rest Of Us."


--- linux/include/linux/isapnp.h.orig Thu Nov 16 02:20:14 2000
+++ linux/include/linux/isapnp.h Thu Nov 16 02:20:33 2000
@@ -42,10 +42,8 @@
#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_DEVICE(x) ((((x)&0xff00)>>8)|\
+ (((x)&0x00ff)<<8))
#define ISAPNP_FUNCTION(x) ISAPNP_DEVICE(x)

/*