Skip to contentSkip to conversation

fsl_i2c: Fix compile warning

PATCH New Kumar Gala 3 participants 4 messages Nov 8, 2011 – Nov 9, 2011 I2C

lore
Share & tools
lore

Kumar Gala

author
#0 lore raw

PATCH 1/1 fsl_i2c: Fix compile warning

fsl_i2c.c: In function 'i2c_init':
fsl_i2c.c:245:7: warning: assignment discards qualifiers from pointer target type

---
 drivers/i2c/fsl_i2c.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/i2c/fsl_i2c.c +1 -1
index 258be0a..5b017a9 100644
@@ -225,7 +225,7 @@ unsigned int get_i2c_clock(int bus)
 void
 i2c_init(int speed, int slaveadd)
 {
-	struct fsl_i2c *dev;
+	const struct fsl_i2c *dev;
 	unsigned int temp;
 	int bus_num, i;
 
Signature · 1 line
1.7.3.4
#1 lore raw

PATCH 1/1 fsl_i2c: Fix compile warning

Quoted 14 lines

fsl_i2c.c: In function 'i2c_init':
fsl_i2c.c:245:7: warning: assignment discards qualifiers from pointer target type

---
 drivers/i2c/fsl_i2c.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/i2c/fsl_i2c.c +0 -0
index 258be0a..5b017a9 100644

drivers/i2c/fsl_i2c.c unsigned int get_i2c_clock(int bus) · line 230

Quoted 7 lines
drivers/i2c/fsl_i2c.c +1 -1
@@ -225,7 +225,7 @@ unsigned int get_i2c_clock(int bus)
 void
 i2c_init(int speed, int slaveadd)
 {
-	struct fsl_i2c *dev;
+	const struct fsl_i2c *dev;
 	unsigned int temp;
 	int bus_num, i;

Kumar, just a offtopic question. Is this driver actually handling the same IP block as mxc_i2c driver (aka. is it the same IP block as used in iMX ARM CPUs)?

M

author
#2 lore raw

PATCH 1/1 fsl_i2c: Fix compile warning

Quoted 25 lines · Marek Vasut
Quoted 19 lines

fsl_i2c.c: In function 'i2c_init':
fsl_i2c.c:245:7: warning: assignment discards qualifiers from pointer target type

---
drivers/i2c/fsl_i2c.c | 2 +-

1 files changed, 1 insertions(+), 1 deletions(-)
drivers/i2c/fsl_i2c.c +0 -0
index 258be0a..5b017a9 100644
@@ -225,7 +225,7 @@ unsigned int get_i2c_clock(int bus)

void
i2c_init(int speed, int slaveadd)
{

drivers/i2c/fsl_i2c.c +1 -1
-	struct fsl_i2c *dev;
+	const struct fsl_i2c *dev;
Quoted 2 lines
	unsigned int temp;
	int bus_num, i;

Kumar, just a offtopic question. Is this driver actually handling the same IP block as mxc_i2c driver (aka. is it the same IP block as used in iMX ARM CPUs)?

Quoted 1 line

M

I believe it is but not 100% sure on that.

- k

#3 lore raw

PATCH 1/1 fsl_i2c: Fix compile warning

In reply to Kumar Gala

Hello Kumar,

Quoted 7 lines · Kumar Gala

fsl_i2c.c: In function 'i2c_init':
fsl_i2c.c:245:7: warning: assignment discards qualifiers from pointer target type

---
 drivers/i2c/fsl_i2c.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Thanks! Applied to u-boot-i2c.git

bye,
Heiko

Signature · 2 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany