[media] media: s5p-mfc: fix broken pointer cast on 64bit arch

Unsigned int cannot be used to store casted pointer on 64bit
architecture, so correct such casts to properly use unsigned long
variables.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
[k.debski@samsung.com: removed volatile and __iomem from cast]

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
This commit is contained in:
Marek Szyprowski 2015-03-04 10:55:22 -03:00 committed by Mauro Carvalho Chehab
parent a301ea1f50
commit 6c9fe76536
3 changed files with 7 additions and 7 deletions

View File

@ -302,7 +302,7 @@ struct s5p_mfc_hw_ops {
void (*write_info)(struct s5p_mfc_ctx *ctx, unsigned int data, void (*write_info)(struct s5p_mfc_ctx *ctx, unsigned int data,
unsigned int ofs); unsigned int ofs);
unsigned int (*read_info)(struct s5p_mfc_ctx *ctx, unsigned int (*read_info)(struct s5p_mfc_ctx *ctx,
unsigned int ofs); unsigned long ofs);
int (*get_dspl_y_adr)(struct s5p_mfc_dev *dev); int (*get_dspl_y_adr)(struct s5p_mfc_dev *dev);
int (*get_dec_y_adr)(struct s5p_mfc_dev *dev); int (*get_dec_y_adr)(struct s5p_mfc_dev *dev);
int (*get_dspl_status)(struct s5p_mfc_dev *dev); int (*get_dspl_status)(struct s5p_mfc_dev *dev);

View File

@ -263,15 +263,15 @@ static void s5p_mfc_release_dev_context_buffer_v5(struct s5p_mfc_dev *dev)
static void s5p_mfc_write_info_v5(struct s5p_mfc_ctx *ctx, unsigned int data, static void s5p_mfc_write_info_v5(struct s5p_mfc_ctx *ctx, unsigned int data,
unsigned int ofs) unsigned int ofs)
{ {
writel(data, (volatile void __iomem *)(ctx->shm.virt + ofs)); writel(data, (void *)(ctx->shm.virt + ofs));
wmb(); wmb();
} }
static unsigned int s5p_mfc_read_info_v5(struct s5p_mfc_ctx *ctx, static unsigned int s5p_mfc_read_info_v5(struct s5p_mfc_ctx *ctx,
unsigned int ofs) unsigned long ofs)
{ {
rmb(); rmb();
return readl((volatile void __iomem *)(ctx->shm.virt + ofs)); return readl((void *)(ctx->shm.virt + ofs));
} }
static void s5p_mfc_dec_calc_dpb_size_v5(struct s5p_mfc_ctx *ctx) static void s5p_mfc_dec_calc_dpb_size_v5(struct s5p_mfc_ctx *ctx)

View File

@ -1852,17 +1852,17 @@ static void s5p_mfc_write_info_v6(struct s5p_mfc_ctx *ctx, unsigned int data,
unsigned int ofs) unsigned int ofs)
{ {
s5p_mfc_clock_on(); s5p_mfc_clock_on();
writel(data, (volatile void __iomem *)((unsigned long)ofs)); writel(data, (void *)((unsigned long)ofs));
s5p_mfc_clock_off(); s5p_mfc_clock_off();
} }
static unsigned int static unsigned int
s5p_mfc_read_info_v6(struct s5p_mfc_ctx *ctx, unsigned int ofs) s5p_mfc_read_info_v6(struct s5p_mfc_ctx *ctx, unsigned long ofs)
{ {
int ret; int ret;
s5p_mfc_clock_on(); s5p_mfc_clock_on();
ret = readl((volatile void __iomem *)((unsigned long)ofs)); ret = readl((void *)ofs);
s5p_mfc_clock_off(); s5p_mfc_clock_off();
return ret; return ret;