diff packages/io/flash/current/include/flash_priv.h @ 1747:a221170fac3d

Add an optimization for the common case of a single flash device
author bartv
date Sun, 21 Nov 2004 23:39:01 +0000
parents 49e24a462730
children 80232dbac7fb
line wrap: on
line diff
--- a/packages/io/flash/current/include/flash_priv.h
+++ b/packages/io/flash/current/include/flash_priv.h
@@ -54,6 +54,9 @@
 #ifndef _IO_FLASH_PRIV_H_
 #define _IO_FLASH_PRIV_H_
 
+#include <pkgconf/system.h>
+#include <pkgconf/io_flash.h>
+
 // Forward reference of the device structure
 struct cyg_flash_dev;
 
@@ -94,7 +97,9 @@ struct cyg_flash_dev {
 #ifdef CYGPKG_KERNEL
   cyg_mutex_t                 mutex;           // Mutex for thread safeness
 #endif
+#if (CYGHWR_IO_FLASH_DEVICE > 1)    
   struct cyg_flash_dev        *next;           // Pointer to next device
+#endif    
 } CYG_HAL_TABLE_TYPE;
 
 #define CYG_FLASH_FUNS(funs,init,query,erase,prog,read,map,lock,unlock)\