[media] media: mtk-mdp: fix build warning in arch x86
authorMinghsiu Tsai <minghsiu.tsai@mediatek.com>
Mon, 19 Sep 2016 06:34:42 +0000 (03:34 -0300)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Fri, 21 Oct 2016 14:09:50 +0000 (12:09 -0200)
This patch fix build warning in arch x86

Signed-off-by: Minghsiu Tsai <minghsiu.tsai@mediatek.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/platform/mtk-mdp/mtk_mdp_m2m.c
drivers/media/platform/mtk-mdp/mtk_mdp_vpu.c

index a90972efec5cd0bd5a89c86d56285ec1ff4662ef..9a747e7321ccf616d8522af27ac4e88fbd07a0c6 100644 (file)
@@ -17,6 +17,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/pm_runtime.h>
+#include <linux/slab.h>
 #include <linux/workqueue.h>
 #include <media/v4l2-event.h>
 #include <media/v4l2-ioctl.h>
index fb07bf3dbd8bc3aa63f0493bb1ceb25bc650f2be..39188e5e46d0372fdcc1f6585c6ed1b8250ab433 100644 (file)
@@ -25,7 +25,8 @@ static inline struct mtk_mdp_ctx *vpu_to_ctx(struct mtk_mdp_vpu *vpu)
 
 static void mtk_mdp_vpu_handle_init_ack(struct mdp_ipi_comm_ack *msg)
 {
-       struct mtk_mdp_vpu *vpu = (struct mtk_mdp_vpu *)msg->ap_inst;
+       struct mtk_mdp_vpu *vpu = (struct mtk_mdp_vpu *)
+                                       (unsigned long)msg->ap_inst;
 
        /* mapping VPU address to kernel virtual address */
        vpu->vsi = (struct mdp_process_vsi *)
@@ -37,7 +38,8 @@ static void mtk_mdp_vpu_ipi_handler(void *data, unsigned int len, void *priv)
 {
        unsigned int msg_id = *(unsigned int *)data;
        struct mdp_ipi_comm_ack *msg = (struct mdp_ipi_comm_ack *)data;
-       struct mtk_mdp_vpu *vpu = (struct mtk_mdp_vpu *)msg->ap_inst;
+       struct mtk_mdp_vpu *vpu = (struct mtk_mdp_vpu *)
+                                       (unsigned long)msg->ap_inst;
        struct mtk_mdp_ctx *ctx;
 
        vpu->failure = msg->status;
@@ -108,7 +110,7 @@ static int mtk_mdp_vpu_send_ap_ipi(struct mtk_mdp_vpu *vpu, uint32_t msg_id)
        msg.msg_id = msg_id;
        msg.ipi_id = IPI_MDP;
        msg.vpu_inst_addr = vpu->inst_addr;
-       msg.ap_inst = (uint64_t)vpu;
+       msg.ap_inst = (unsigned long)vpu;
        err = mtk_mdp_vpu_send_msg((void *)&msg, sizeof(msg), vpu, IPI_MDP);
        if (!err && vpu->failure)
                err = -EINVAL;
@@ -126,7 +128,7 @@ int mtk_mdp_vpu_init(struct mtk_mdp_vpu *vpu)
 
        msg.msg_id = AP_MDP_INIT;
        msg.ipi_id = IPI_MDP;
-       msg.ap_inst = (uint64_t)vpu;
+       msg.ap_inst = (unsigned long)vpu;
        err = mtk_mdp_vpu_send_msg((void *)&msg, sizeof(msg), vpu, IPI_MDP);
        if (!err && vpu->failure)
                err = -EINVAL;