diff mbox

[07/79,media] drx-j: remove the "const" annotate on HICommand()

Message ID 1393841233-24840-8-git-send-email-m.chehab@samsung.com (mailing list archive)
State New, archived
Headers show

Commit Message

Mauro Carvalho Chehab March 3, 2014, 10:06 a.m. UTC
From: Mauro Carvalho Chehab <mchehab@redhat.com>

After removing the typedef, it is now clear that HICommand() were
abusing of a var that was expecting to be constant:

drivers/media/dvb-frontends/drx39xyj/drxj.c: In function ‘HICommand’:
drivers/media/dvb-frontends/drx39xyj/drxj.c:2272:3: warning: passing argument 1 of ‘drxDapDRXJFunct_g.writeReg16Func’ discards ‘const’ qualifier from pointer target type [enabled by default]
drivers/media/dvb-frontends/drx39xyj/drxj.c:2272:3: note: expected ‘struct i2c_device_addr *’ but argument is of type ‘const struct i2c_device_addr *’
drivers/media/dvb-frontends/drx39xyj/drxj.c:2273:3: warning: passing argument 1 of ‘drxDapDRXJFunct_g.writeReg16Func’ discards ‘const’ qualifier from pointer target type [enabled by default]
drivers/media/dvb-frontends/drx39xyj/drxj.c:2273:3: note: expected ‘struct i2c_device_addr *’ but argument is of type ‘const struct i2c_device_addr *’
drivers/media/dvb-frontends/drx39xyj/drxj.c:2274:3: warning: passing argument 1 of ‘drxDapDRXJFunct_g.writeReg16Func’ discards ‘const’ qualifier from pointer target type [enabled by default]
drivers/media/dvb-frontends/drx39xyj/drxj.c:2274:3: note: expected ‘struct i2c_device_addr *’ but argument is of type ‘const struct i2c_device_addr *’
drivers/media/dvb-frontends/drx39xyj/drxj.c:2275:3: warning: passing argument 1 of ‘drxDapDRXJFunct_g.writeReg16Func’ discards ‘const’ qualifier from pointer target type [enabled by default]
drivers/media/dvb-frontends/drx39xyj/drxj.c:2275:3: note: expected ‘struct i2c_device_addr *’ but argument is of type ‘const struct i2c_device_addr *’
drivers/media/dvb-frontends/drx39xyj/drxj.c:2278:3: warning: passing argument 1 of ‘drxDapDRXJFunct_g.writeReg16Func’ discards ‘const’ qualifier from pointer target type [enabled by default]
drivers/media/dvb-frontends/drx39xyj/drxj.c:2278:3: note: expected ‘struct i2c_device_addr *’ but argument is of type ‘const struct i2c_device_addr *’
drivers/media/dvb-frontends/drx39xyj/drxj.c:2279:3: warning: passing argument 1 of ‘drxDapDRXJFunct_g.writeReg16Func’ discards ‘const’ qualifier from pointer target type [enabled by default]
drivers/media/dvb-frontends/drx39xyj/drxj.c:2279:3: note: expected ‘struct i2c_device_addr *’ but argument is of type ‘const struct i2c_device_addr *’
drivers/media/dvb-frontends/drx39xyj/drxj.c:2291:2: warning: passing argument 1 of ‘drxDapDRXJFunct_g.writeReg16Func’ discards ‘const’ qualifier from pointer target type [enabled by default]
drivers/media/dvb-frontends/drx39xyj/drxj.c:2291:2: note: expected ‘struct i2c_device_addr *’ but argument is of type ‘const struct i2c_device_addr *’
drivers/media/dvb-frontends/drx39xyj/drxj.c:2311:4: warning: passing argument 1 of ‘drxDapDRXJFunct_g.readReg16Func’ discards ‘const’ qualifier from pointer target type [enabled by default]
drivers/media/dvb-frontends/drx39xyj/drxj.c:2311:4: note: expected ‘struct i2c_device_addr *’ but argument is of type ‘const struct i2c_device_addr *’
drivers/media/dvb-frontends/drx39xyj/drxj.c:2315:3: warning: passing argument 1 of ‘drxDapDRXJFunct_g.readReg16Func’ discards ‘const’ qualifier from pointer target type [enabled by default]
drivers/media/dvb-frontends/drx39xyj/drxj.c:2315:3: note: expected ‘struct i2c_device_addr *’ but argument is of type ‘const struct i2c_device_addr *’

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
---
 drivers/media/dvb-frontends/drx39xyj/drxj.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/drivers/media/dvb-frontends/drx39xyj/drxj.c b/drivers/media/dvb-frontends/drx39xyj/drxj.c
index 84f4e1823925..a41b2a9fe9b4 100644
--- a/drivers/media/dvb-frontends/drx39xyj/drxj.c
+++ b/drivers/media/dvb-frontends/drx39xyj/drxj.c
@@ -1146,7 +1146,7 @@  FUNCTIONS
 ----------------------------------------------------------------------------*/
 /* Some prototypes */
 static DRXStatus_t
-HICommand(const struct i2c_device_addr *devAddr,
+HICommand(struct i2c_device_addr *devAddr,
 	  const pDRXJHiCmd_t cmd, pu16_t result);
 
 static DRXStatus_t
@@ -2258,7 +2258,7 @@  rw_error:
 *
 */
 static DRXStatus_t
-HICommand(const struct i2c_device_addr *devAddr, const pDRXJHiCmd_t cmd, pu16_t result)
+HICommand(struct i2c_device_addr *devAddr, const pDRXJHiCmd_t cmd, pu16_t result)
 {
 	u16_t waitCmd = 0;
 	u16_t nrRetries = 0;