Skip to contentSkip to conversation

i2c_eeprom: add static to i2c_eeprom_std_ops/probe

PATCH New Masahiro Yamada 4 participants 4 messages Jun 22, 2017 – Jul 7, 2017 Char and misc drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 i2c_eeprom: add static to i2c_eeprom_std_ops/probe

These are only used in drivers/mis/i2c_eeprom.c

---

 drivers/misc/i2c_eeprom.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/misc/i2c_eeprom.c +2 -2
index da6e2b05f730..a14e83225bcc 100644
@@ -42,7 +42,7 @@ static int i2c_eeprom_std_write(struct udevice *dev, int offset,
 	return -ENODEV;
 }
 
-struct i2c_eeprom_ops i2c_eeprom_std_ops = {
+static const struct i2c_eeprom_ops i2c_eeprom_std_ops = {
 	.read	= i2c_eeprom_std_read,
 	.write	= i2c_eeprom_std_write,
 };
@@ -59,7 +59,7 @@ static int i2c_eeprom_std_ofdata_to_platdata(struct udevice *dev)
 	return 0;
 }
 
-int i2c_eeprom_std_probe(struct udevice *dev)
+static int i2c_eeprom_std_probe(struct udevice *dev)
 {
 	return 0;
 }
Signature · 1 line
2.7.4
#2 lore raw

PATCH 1/1 i2c_eeprom: add static to i2c_eeprom_std_ops/probe

In reply to Masahiro Yamada

Hello Masahiro,

Am 22.06.2017 um 09:51 schrieb Masahiro Yamada:

Quoted 7 lines

These are only used in drivers/mis/i2c_eeprom.c

---

  drivers/misc/i2c_eeprom.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

Thanks!

bye,
Heiko

Quoted 24 lines
drivers/misc/i2c_eeprom.c +2 -2
index da6e2b05f730..a14e83225bcc 100644
@@ -42,7 +42,7 @@ static int i2c_eeprom_std_write(struct udevice *dev, int offset,
  	return -ENODEV;
  }
 
-struct i2c_eeprom_ops i2c_eeprom_std_ops = {
+static const struct i2c_eeprom_ops i2c_eeprom_std_ops = {
  	.read	= i2c_eeprom_std_read,
  	.write	= i2c_eeprom_std_write,
  };
@@ -59,7 +59,7 @@ static int i2c_eeprom_std_ofdata_to_platdata(struct udevice *dev)
  	return 0;
  }
 
-int i2c_eeprom_std_probe(struct udevice *dev)
+static int i2c_eeprom_std_probe(struct udevice *dev)
  {
  	return 0;
  }
Signature · 2 lines
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany