src/include: Open brace on same line as enum or struct
Fix the following errors and warning detected by checkpatch.pl:
ERROR: open brace '{' following enum go on the same line
ERROR: open brace '{' following struct go on the same line
ERROR: that open brace { should be on the previous line
WARNING: missing space after struct definition
TEST=Build and run on Galileo Gen2
Change-Id: I856235d0cc3a3e59376df52561b17b872b3416b2
Signed-off-by: Lee Leahy <Leroy.P.Leahy@intel.com>
Reviewed-on: https://review.coreboot.org/18653
Tested-by: build bot (Jenkins)
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
diff --git a/src/include/device/i2c.h b/src/include/device/i2c.h
index b3a5cca..6115bd1 100644
--- a/src/include/device/i2c.h
+++ b/src/include/device/i2c.h
@@ -32,8 +32,7 @@
I2C_MODE_10_BIT
};
-struct i2c_seg
-{
+struct i2c_seg {
int read;
uint8_t chip;
uint8_t *buf;
@@ -89,8 +88,10 @@
static inline int i2c_read_raw(unsigned int bus, uint8_t chip, uint8_t *data,
int len)
{
- struct i2c_seg seg =
- { .read = 1, .chip = chip, .buf = data, .len = len };
+ struct i2c_seg seg = {
+ .read = 1, .chip = chip, .buf = data, .len = len
+ };
+
return i2c_transfer(bus, &seg, 1);
}
@@ -102,8 +103,10 @@
static inline int i2c_write_raw(unsigned int bus, uint8_t chip, uint8_t *data,
int len)
{
- struct i2c_seg seg =
- { .read = 0, .chip = chip, .buf = data, .len = len };
+ struct i2c_seg seg = {
+ .read = 0, .chip = chip, .buf = data, .len = len
+ };
+
return i2c_transfer(bus, &seg, 1);
}