DivestOS/Patches/OLD/bacon/Kernel-All/ch-12.1/23.patch
2016-12-21 19:30:02 -05:00

45 lines
1.8 KiB
Diff

From 2d79c0f689eb823053b8eb50337d80f0aad70793 Mon Sep 17 00:00:00 2001
From: Daniel Micay <danielmicay@gmail.com>
Date: Thu, 23 Jul 2015 02:36:09 -0400
Subject: [PATCH] fix PaX const issue with the msm camera driver
---
drivers/media/platform/msm/camera_v2/pproc/cpp/msm_cpp.c | 3 ++-
include/media/v4l2-dev.h | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/media/platform/msm/camera_v2/pproc/cpp/msm_cpp.c b/drivers/media/platform/msm/camera_v2/pproc/cpp/msm_cpp.c
index 93b8665..b8c432d 100755
--- a/drivers/media/platform/msm/camera_v2/pproc/cpp/msm_cpp.c
+++ b/drivers/media/platform/msm/camera_v2/pproc/cpp/msm_cpp.c
@@ -32,6 +32,7 @@
#include <mach/iommu.h>
#include <mach/vreg.h>
#include <media/msm_isp.h>
+#include <media/v4l2-dev.h>
#include <media/v4l2-event.h>
#include <media/v4l2-ioctl.h>
#include <media/msmb_camera.h>
@@ -1884,7 +1885,7 @@ static const struct v4l2_subdev_ops msm_cpp_subdev_ops = {
.core = &msm_cpp_subdev_core_ops,
};
-static struct v4l2_file_operations msm_cpp_v4l2_subdev_fops;
+static v4l2_file_operations_no_const msm_cpp_v4l2_subdev_fops;
static long msm_cpp_subdev_do_ioctl(
struct file *file, unsigned int cmd, void *arg)
diff --git a/include/media/v4l2-dev.h b/include/media/v4l2-dev.h
index 2292f89..1af15f4 100644
--- a/include/media/v4l2-dev.h
+++ b/include/media/v4l2-dev.h
@@ -56,7 +56,7 @@ int v4l2_prio_check(struct v4l2_prio_state *global, enum v4l2_priority local);
struct v4l2_file_operations {
- struct module * const owner;
+ struct module *owner;
ssize_t (*read) (struct file *, char __user *, size_t, loff_t *);
ssize_t (*write) (struct file *, const char __user *, size_t, loff_t *);
unsigned int (*poll) (struct file *, struct poll_table_struct *);