diff options
author | Sylwester Nawrocki <s.nawrocki@samsung.com> | 2012-08-07 03:58:35 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-10-01 13:56:29 -0400 |
commit | e169c9baa31b23d8e0641359772c47291c485c14 (patch) | |
tree | 6b21ab62b71f446d6df2be6612d2f08d629c525c | |
parent | 9064cb5e03b1502782d314b03ea3cbe09992f9a7 (diff) |
[media] m5mols: Fix cast warnings from m5mols_[set/get]_ctrl_mode
Fixes following warnings on 64-bit architectures:
m5mols.h: In function 'm5mols_set_ctrl_mode':
m5mols.h:326:15: warning: cast to pointer from integer of different
size [-Wint-to-pointer-cast]
m5mols.h: In function 'm5mols_get_ctrl_mode':
m5mols.h:331:9: warning: cast from pointer to integer of different
size [-Wpointer-to-int-cast]
drivers/media/i2c/m5mols/m5mols_controls.c:466:2: warning: cast
from pointer to integer of different size
Cc: Heungjun Kim <riverful.kim@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r-- | drivers/media/i2c/m5mols/m5mols.h | 4 | ||||
-rw-r--r-- | drivers/media/i2c/m5mols/m5mols_controls.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/drivers/media/i2c/m5mols/m5mols.h b/drivers/media/i2c/m5mols/m5mols.h index bb589917b65b..527e7b2965df 100644 --- a/drivers/media/i2c/m5mols/m5mols.h +++ b/drivers/media/i2c/m5mols/m5mols.h | |||
@@ -323,12 +323,12 @@ static inline struct v4l2_subdev *to_sd(struct v4l2_ctrl *ctrl) | |||
323 | static inline void m5mols_set_ctrl_mode(struct v4l2_ctrl *ctrl, | 323 | static inline void m5mols_set_ctrl_mode(struct v4l2_ctrl *ctrl, |
324 | unsigned int mode) | 324 | unsigned int mode) |
325 | { | 325 | { |
326 | ctrl->priv = (void *)mode; | 326 | ctrl->priv = (void *)(uintptr_t)mode; |
327 | } | 327 | } |
328 | 328 | ||
329 | static inline unsigned int m5mols_get_ctrl_mode(struct v4l2_ctrl *ctrl) | 329 | static inline unsigned int m5mols_get_ctrl_mode(struct v4l2_ctrl *ctrl) |
330 | { | 330 | { |
331 | return (unsigned int)ctrl->priv; | 331 | return (unsigned int)(uintptr_t)ctrl->priv; |
332 | } | 332 | } |
333 | 333 | ||
334 | #endif /* M5MOLS_H */ | 334 | #endif /* M5MOLS_H */ |
diff --git a/drivers/media/i2c/m5mols/m5mols_controls.c b/drivers/media/i2c/m5mols/m5mols_controls.c index fdbc205a2969..f34429e452ab 100644 --- a/drivers/media/i2c/m5mols/m5mols_controls.c +++ b/drivers/media/i2c/m5mols/m5mols_controls.c | |||
@@ -463,8 +463,8 @@ static int m5mols_s_ctrl(struct v4l2_ctrl *ctrl) | |||
463 | return 0; | 463 | return 0; |
464 | } | 464 | } |
465 | 465 | ||
466 | v4l2_dbg(1, m5mols_debug, sd, "%s: %s, val: %d, priv: %#x\n", | 466 | v4l2_dbg(1, m5mols_debug, sd, "%s: %s, val: %d, priv: %p\n", |
467 | __func__, ctrl->name, ctrl->val, (int)ctrl->priv); | 467 | __func__, ctrl->name, ctrl->val, ctrl->priv); |
468 | 468 | ||
469 | if (ctrl_mode && ctrl_mode != info->mode) { | 469 | if (ctrl_mode && ctrl_mode != info->mode) { |
470 | ret = m5mols_set_mode(info, ctrl_mode); | 470 | ret = m5mols_set_mode(info, ctrl_mode); |