Commit 518c3559 authored by Alessandro Rubini's avatar Alessandro Rubini

dev/sdb-eeprom.c: register the storage tree with sdb-lib

It is not mandatory to actually register the tree, but it's
a good move for consistency.

Later we'll need to scan several devices, for example to look for a
mac address in carrier flash or eeprom. To do that we'll need to have
devices properly registered.

This costs 150 bytes of binary size in gsi_defconfig.
Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent d7b938d7
......@@ -64,7 +64,7 @@ static void eeprom_sdb_list(struct sdbfs *fs)
}
/* The sdb filesystem itself */
static struct sdbfs wrc_sdb = {
.name = "wrpc-storage",
.name = "eeprom",
.blocksize = 1, /* Not currently used */
/* .read and .write according to device type */
};
......@@ -97,6 +97,7 @@ uint8_t eeprom_present(uint8_t i2cif, uint8_t i2c_addr)
wrc_sdb.read = sdb_w1_read;
wrc_sdb.write = sdb_w1_write;
has_eeprom = 1;
sdbfs_dev_create(&wrc_sdb);
eeprom_sdb_list(&wrc_sdb);
return 0;
}
......
Markdown is supported
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