[coreboot] r3109 - trunk/coreboot-v2/src/devices

svn at coreboot.org svn at coreboot.org
Tue Feb 19 21:30:26 CET 2008


Author: ruik
Date: 2008-02-19 21:30:25 +0100 (Tue, 19 Feb 2008)
New Revision: 3109

Modified:
   trunk/coreboot-v2/src/devices/pnp_device.c
Log:
 I'm attaching the patch which should fix both problems. Fix the 
undefined u8 type and the bitpos selection in currently unused 
pnp_read_enable function.
 
Signed-off-by: Rudolf Marek <r.marek at assembler.cz>

Acked-by: Stefan Reinauer <stepan at coresystems.de>



Modified: trunk/coreboot-v2/src/devices/pnp_device.c
===================================================================
--- trunk/coreboot-v2/src/devices/pnp_device.c	2008-02-18 20:43:09 UTC (rev 3108)
+++ trunk/coreboot-v2/src/devices/pnp_device.c	2008-02-19 20:30:25 UTC (rev 3109)
@@ -51,7 +51,7 @@
 
 void pnp_set_enable(device_t dev, int enable)
 {
-	u8 tmp, bitpos;
+	uint8_t tmp, bitpos;
 
 	tmp = pnp_read_config(dev, 0x30);
 	/* handle the virtual devices, which share same LDN register */
@@ -67,11 +67,11 @@
 
 int pnp_read_enable(device_t dev)
 {
-	u8 tmp, bitpos;
+	uint8_t tmp, bitpos;
 	tmp = pnp_read_config(dev, 0x30);
 	/* handle the virtual devices, which share same LDN register */
 	bitpos = (dev->path.u.pnp.device >> 8) & 0x7;
-	return !!(tmp & bitpos);
+	return !!(tmp & (1 << bitpos));
 }
 
 void pnp_set_iobase(device_t dev, unsigned index, unsigned iobase)





More information about the coreboot mailing list