Attention is currently required from: Peter Marheine.
3 comments:
Commit Message:
Patch Set #4, Line 9: As with the lspcon_i2c_spi programmer
I'd suggest looking into moving the I2C bus handling code to a common place, i2c_helper_linux.c for example?
This would be done in two commits:
1. Move common I2C stuff from lspcon_i2c_spi into i2c_helper_linux
2. Adapt realtek_mst_i2c_spi to use the common I2C stuff
File realtek_mst_i2c_spi.c:
Patch Set #4, Line 466: // free bus_str later.
nit: For consistency with existing comments, I'd use C-style
Patch Set #4, Line 536: // bus= and devpath= should be mutually exclusive, but defensively handle both here
This would already be guaranteed by the `get_params` function. If you're worried about leaking `i2c_devpath`, one could do:
if (i2c_devpath != NULL) {
fd = i2c_open_path(i2c_devpath, REGISTER_ADDRESS, 0);
free(i2c_devpath);
} else if (i2c_bus != -1) {
fd = i2c_open(i2c_bus, REGISTER_ADDRESS, 0);
}
To view, visit change 52405. To unsubscribe, or for help writing mail filters, visit settings.