i2c: fix brackets around if statement
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This commit is contained in:
@@ -89,18 +89,20 @@ mraa_i2c_init(int bus)
|
||||
}
|
||||
|
||||
int pos = plat->i2c_bus[bus].sda;
|
||||
if (plat->pins[pos].i2c.mux_total > 0)
|
||||
if (plat->pins[pos].i2c.mux_total > 0) {
|
||||
if (mraa_setup_mux_mapped(plat->pins[pos].i2c) != MRAA_SUCCESS) {
|
||||
syslog(LOG_ERR, "i2c: Failed to set-up i2c sda multiplexer");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
pos = plat->i2c_bus[bus].scl;
|
||||
if (plat->pins[pos].i2c.mux_total > 0)
|
||||
if (plat->pins[pos].i2c.mux_total > 0) {
|
||||
if (mraa_setup_mux_mapped(plat->pins[pos].i2c) != MRAA_SUCCESS) {
|
||||
syslog(LOG_ERR, "i2c: Failed to set-up i2c scl multiplexer");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
return mraa_i2c_init_raw((unsigned int) plat->i2c_bus[bus].bus_id);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user