[flash_v2] Strata compiler warning fixes
Andrew Lunn
andrew@lunn.ch
Thu Nov 25 13:41:00 GMT 2004
This patch fixes a couple of compiler warnings for the strata driver.
Andrew
-------------- next part --------------
Index: devs/flash/intel/stratav2/current/ChangeLog
===================================================================
RCS file: /cvs/ecos/ecos/packages/devs/flash/intel/stratav2/current/Attic/ChangeLog,v
retrieving revision 1.1.2.7
diff -u -r1.1.2.7 ChangeLog
--- devs/flash/intel/stratav2/current/ChangeLog 22 Nov 2004 20:17:06 -0000 1.1.2.7
+++ devs/flash/intel/stratav2/current/ChangeLog 25 Nov 2004 13:37:03 -0000
@@ -1,3 +1,9 @@
+2004-11-25 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * include/flash_strata_v2.inl: Correct the usage of const
+ parameters. strata_init() needs to be able to modify priv.
+ strata_program_buf() does not need to modify priv.
+
2004-11-22 Bart Veer <bartv@ecoscentric.com>
* include/flash_strata_v2.inl: adjust const parameters as per
Index: devs/flash/intel/stratav2/current/include/flash_strata_v2.inl
===================================================================
RCS file: /cvs/ecos/ecos/packages/devs/flash/intel/stratav2/current/include/Attic/flash_strata_v2.inl,v
retrieving revision 1.1.2.6
diff -u -r1.1.2.6 flash_strata_v2.inl
--- devs/flash/intel/stratav2/current/include/flash_strata_v2.inl 22 Nov 2004 20:17:05 -0000 1.1.2.6
+++ devs/flash/intel/stratav2/current/include/flash_strata_v2.inl 25 Nov 2004 13:37:04 -0000
@@ -122,7 +122,9 @@
{
struct FLASH_query data, *qp;
int num_regions, region_size, buffer_size;
- struct cyg_flash_strata_v2_priv *priv = dev->priv;
+ // remove const property. We need to change the block_info and num_blocks
+ struct cyg_flash_strata_v2_priv *priv =
+ (struct cyg_flash_strata_v2_priv *)dev->priv;
dev->funs->flash_query(dev, &data, sizeof(data));
qp = &data;
@@ -337,7 +339,7 @@
const void* data_addr,
size_t total_len)
{
- struct cyg_flash_strata_v2_priv *priv = dev->priv;
+ const struct cyg_flash_strata_v2_priv *priv = dev->priv;
volatile flash_t *ROM;
volatile flash_t *BA, *addr;
flash_t * data = (flash_t *)data_addr;
More information about the Ecos-patches
mailing list