Skip to content
Snippets Groups Projects
Commit c88f2e02 authored by Alessandro Rubini's avatar Alessandro Rubini
Browse files

const fixups

parent dc773aaf
Branches
Tags
No related merge requests found
......@@ -189,8 +189,8 @@ struct fmc_operations {
char *name, int flags);
void (*irq_ack)(struct fmc_device *fmc);
int (*irq_free)(struct fmc_device *fmc);
int (*read_ee)(struct fmc_device *fmc, int pos, void *data, int len);
int (*write_ee)(struct fmc_device *fmc, int pos, void *data, int len);
int (*read_ee)(struct fmc_device *fmc, int pos, void *d, int l);
int (*write_ee)(struct fmc_device *fmc, int pos, const void *d, int l);
};
@end smallexample
......
......@@ -41,8 +41,8 @@ struct fmc_operations {
char *name, int flags);
void (*irq_ack)(struct fmc_device *fmc);
int (*irq_free)(struct fmc_device *fmc);
int (*read_ee)(struct fmc_device *fmc, int pos, void *data, int len);
int (*write_ee)(struct fmc_device *fmc, int pos, void *data, int len);
int (*read_ee)(struct fmc_device *fmc, int pos, void *d, int l);
int (*write_ee)(struct fmc_device *fmc, int pos, const void *d, int l);
};
/* The device reports all information needed to access hw */
......
......@@ -78,7 +78,8 @@ static int spec_read_ee(struct fmc_device *fmc, int pos, void *data, int len)
return spec_eeprom_read(fmc, SPEC_I2C_EEPROM_ADDR, pos, data, len);
}
static int spec_write_ee(struct fmc_device *fmc, int pos, void *data, int len)
static int spec_write_ee(struct fmc_device *fmc, int pos,
const void *data, int len)
{
return spec_eeprom_write(fmc, SPEC_I2C_EEPROM_ADDR, pos, data, len);
}
......
......@@ -167,10 +167,10 @@ int spec_eeprom_read(struct fmc_device *fmc, int i2c_addr, uint32_t offset,
}
int spec_eeprom_write(struct fmc_device *fmc, int i2c_addr, uint32_t offset,
void *buf, size_t size)
const void *buf, size_t size)
{
int i, busy;
uint8_t *buf8 = buf;
const uint8_t *buf8 = buf;
for(i = 0; i < size; i++) {
mi2c_start((fmc));
......
......@@ -126,7 +126,7 @@ extern void spec_i2c_exit(struct fmc_device *fmc);
extern int spec_eeprom_read(struct fmc_device *fmc, int i2c_addr,
uint32_t offset, void *buf, size_t size);
extern int spec_eeprom_write(struct fmc_device *fmc, int i2c_addr,
uint32_t offset, void *buf, size_t size);
uint32_t offset, const void *buf, size_t size);
/* The eeprom is at address 0x50 */
#define SPEC_I2C_EEPROM_ADDR 0x50
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment