mirror of
https://github.com/tbsdtv/media_build.git
synced 2025-07-23 04:13:02 +02:00
Merge branch 'master' of git://linuxtv.org/media_build
Conflicts: v4l/versions.txt
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
diff --git a/drivers/media/cec/cec-api.c b/drivers/media/cec/cec-api.c
|
||||
index 0860fb458757..60fd48214142 100644
|
||||
index 10b67fc..64b0250 100644
|
||||
--- a/drivers/media/cec/cec-api.c
|
||||
+++ b/drivers/media/cec/cec-api.c
|
||||
@@ -93,7 +93,7 @@ static long cec_adap_g_caps(struct cec_adapter *adap,
|
||||
@@ -82,7 +82,7 @@ static long cec_adap_g_caps(struct cec_adapter *adap,
|
||||
strlcpy(caps.name, adap->name, sizeof(caps.name));
|
||||
caps.available_log_addrs = adap->available_log_addrs;
|
||||
caps.capabilities = adap->capabilities;
|
||||
@@ -11,21 +11,8 @@ index 0860fb458757..60fd48214142 100644
|
||||
if (copy_to_user(parg, &caps, sizeof(caps)))
|
||||
return -EFAULT;
|
||||
return 0;
|
||||
diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c
|
||||
index 4f27cfa134a1..e0fb14c851d5 100644
|
||||
--- a/drivers/media/v4l2-core/v4l2-ioctl.c
|
||||
+++ b/drivers/media/v4l2-core/v4l2-ioctl.c
|
||||
@@ -1000,7 +1000,7 @@ static int v4l_querycap(const struct v4l2_ioctl_ops *ops,
|
||||
struct video_device *vfd = video_devdata(file);
|
||||
int ret;
|
||||
|
||||
- cap->version = LINUX_VERSION_CODE;
|
||||
+ cap->version = V4L2_VERSION;
|
||||
cap->device_caps = vfd->device_caps;
|
||||
cap->capabilities = vfd->device_caps | V4L2_CAP_DEVICE_CAPS;
|
||||
|
||||
diff --git a/drivers/media/media-device.c b/drivers/media/media-device.c
|
||||
index e79f72b8b858..77c2abad24b7 100644
|
||||
index 35e81f7..9c3361c 100644
|
||||
--- a/drivers/media/media-device.c
|
||||
+++ b/drivers/media/media-device.c
|
||||
@@ -69,7 +69,7 @@ static int media_device_get_info(struct media_device *dev,
|
||||
@@ -37,3 +24,16 @@ index e79f72b8b858..77c2abad24b7 100644
|
||||
info->driver_version = info->media_version;
|
||||
info->hw_revision = dev->hw_revision;
|
||||
|
||||
diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c
|
||||
index a5dab16..ce0d711 100644
|
||||
--- a/drivers/media/v4l2-core/v4l2-ioctl.c
|
||||
+++ b/drivers/media/v4l2-core/v4l2-ioctl.c
|
||||
@@ -1004,7 +1004,7 @@ static int v4l_querycap(const struct v4l2_ioctl_ops *ops,
|
||||
struct video_device *vfd = video_devdata(file);
|
||||
int ret;
|
||||
|
||||
- cap->version = LINUX_VERSION_CODE;
|
||||
+ cap->version = V4L2_VERSION;
|
||||
cap->device_caps = vfd->device_caps;
|
||||
cap->capabilities = vfd->device_caps | V4L2_CAP_DEVICE_CAPS;
|
||||
|
||||
|
@@ -25,6 +25,7 @@ add api_version.patch
|
||||
add pr_fmt.patch
|
||||
add debug.patch
|
||||
add drx39xxj.patch
|
||||
add noretpoline.patch
|
||||
|
||||
[4.14.255]
|
||||
add v4.14_compiler_h.patch
|
||||
@@ -51,6 +52,8 @@ add v4.8_em28xx_bitfield.patch
|
||||
[4.7.255]
|
||||
add v4.7_dma_attrs.patch
|
||||
add v4.7_pci_alloc_irq_vectors.patch
|
||||
add v4.7_copy_to_user_warning.patch
|
||||
add v4.7_objtool_warning.patch
|
||||
|
||||
[4.6.255]
|
||||
add v4.6_i2c_mux.patch
|
||||
@@ -59,12 +62,14 @@ add v4.6_i2c_mux.patch
|
||||
add v4.5_gpiochip_data_pointer.patch
|
||||
add v4.5_get_user_pages.patch
|
||||
add v4.5_uvc_super_plus.patch
|
||||
add v4.5_copy_to_user_warning.patch
|
||||
|
||||
[4.4.255]
|
||||
add v4.4_gpio_chip_parent.patch
|
||||
|
||||
[4.3.255]
|
||||
add v4.3_add_autorepeat_handling.patch
|
||||
add v4.3_bt87x_const_fix.patch
|
||||
|
||||
[4.2.255]
|
||||
add v4.2_atomic64.patch
|
||||
@@ -107,6 +112,7 @@ add v3.11_dev_groups.patch
|
||||
[3.10.255]
|
||||
add v3.10_fw_driver_probe.patch
|
||||
add v3.10_ir_hix5hd2.patch
|
||||
add v3.10_const_snd_pcm_ops.patch
|
||||
|
||||
[3.9.255]
|
||||
add v3.9_drxj_warnings.patch
|
||||
@@ -120,6 +126,7 @@ add v3.6_i2c_add_mux_adapter.patch
|
||||
|
||||
[3.4.255]
|
||||
add v3.4_i2c_add_mux_adapter.patch
|
||||
add v3.4_stk_webcam.patch
|
||||
|
||||
[3.3.255]
|
||||
add v3.3_eprobe_defer.patch
|
||||
@@ -132,7 +139,6 @@ add v3.2_alloc_ordered_workqueue.patch
|
||||
add v3.1_no_export_h.patch
|
||||
add v3.1_no_dma_buf_h.patch
|
||||
add v3.1_no_pm_qos.patch
|
||||
add v3.1_stk_webcam.patch
|
||||
|
||||
[3.0.255]
|
||||
add no_atomic_include.patch
|
||||
@@ -142,6 +148,7 @@ add v3.0_remove_ida_lird_dev.patch
|
||||
|
||||
[2.6.39]
|
||||
add v2.6_rc_main_bsearch_h.patch
|
||||
add v2.6.39_const_rc_main.patch
|
||||
|
||||
[2.6.38]
|
||||
add v2.6.38_use_getkeycode_new_setkeycode_new.patch
|
||||
|
15
backports/noretpoline.patch
Normal file
15
backports/noretpoline.patch
Normal file
@@ -0,0 +1,15 @@
|
||||
diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h
|
||||
index e2c7f43..901c1cc 100644
|
||||
--- a/include/linux/compiler-gcc.h
|
||||
+++ b/include/linux/compiler-gcc.h
|
||||
@@ -93,10 +93,6 @@
|
||||
#define __weak __attribute__((weak))
|
||||
#define __alias(symbol) __attribute__((alias(#symbol)))
|
||||
|
||||
-#ifdef RETPOLINE
|
||||
-#define __noretpoline __attribute__((indirect_branch("keep")))
|
||||
-#endif
|
||||
-
|
||||
/*
|
||||
* it doesn't make sense on ARM (currently the only user of __naked)
|
||||
* to trace naked functions because then mcount is called without
|
@@ -120,7 +120,7 @@ index f450912..9c4e466 100644
|
||||
|
||||
#include <linux/sched/signal.h>
|
||||
diff --git a/drivers/media/dvb-core/dvb_frontend.c b/drivers/media/dvb-core/dvb_frontend.c
|
||||
index a7ed16e..3f966ad 100644
|
||||
index 21a7d4b..aaa67d3 100644
|
||||
--- a/drivers/media/dvb-core/dvb_frontend.c
|
||||
+++ b/drivers/media/dvb-core/dvb_frontend.c
|
||||
@@ -25,6 +25,7 @@
|
||||
@@ -144,7 +144,7 @@ index ba39f99..3efe25c 100644
|
||||
|
||||
#include <linux/module.h>
|
||||
diff --git a/drivers/media/dvb-core/dvbdev.c b/drivers/media/dvb-core/dvbdev.c
|
||||
index cf747d7..d47265c 100644
|
||||
index 787fe06..9030dfb 100644
|
||||
--- a/drivers/media/dvb-core/dvbdev.c
|
||||
+++ b/drivers/media/dvb-core/dvbdev.c
|
||||
@@ -17,6 +17,7 @@
|
||||
@@ -441,7 +441,7 @@ index eccd1e3..fe5bd28 100644
|
||||
|
||||
#include <linux/module.h>
|
||||
diff --git a/drivers/media/pci/bt8xx/bttv-input.c b/drivers/media/pci/bt8xx/bttv-input.c
|
||||
index da49c55..247f845 100644
|
||||
index 08266b2..0552001 100644
|
||||
--- a/drivers/media/pci/bt8xx/bttv-input.c
|
||||
+++ b/drivers/media/pci/bt8xx/bttv-input.c
|
||||
@@ -14,6 +14,7 @@
|
||||
@@ -837,7 +837,7 @@ index f2639d0..1040fa1 100644
|
||||
|
||||
#include <linux/kernel.h>
|
||||
diff --git a/drivers/media/rc/imon.c b/drivers/media/rc/imon.c
|
||||
index 950d068..8e31a6a 100644
|
||||
index 1041c056..6194983 100644
|
||||
--- a/drivers/media/rc/imon.c
|
||||
+++ b/drivers/media/rc/imon.c
|
||||
@@ -22,6 +22,7 @@
|
||||
@@ -848,6 +848,18 @@ index 950d068..8e31a6a 100644
|
||||
#define pr_fmt(fmt) KBUILD_MODNAME ":%s: " fmt, __func__
|
||||
|
||||
#include <linux/errno.h>
|
||||
diff --git a/drivers/media/rc/ir-imon-decoder.c b/drivers/media/rc/ir-imon-decoder.c
|
||||
index a1ff06a..53e88dd 100644
|
||||
--- a/drivers/media/rc/ir-imon-decoder.c
|
||||
+++ b/drivers/media/rc/ir-imon-decoder.c
|
||||
@@ -3,6 +3,7 @@
|
||||
//
|
||||
// Copyright (C) 2018 by Sean Young <sean@mess.org>
|
||||
|
||||
+#undef pr_fmt
|
||||
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
|
||||
|
||||
#include <linux/module.h>
|
||||
diff --git a/drivers/media/rc/lirc_dev.c b/drivers/media/rc/lirc_dev.c
|
||||
index 24e9fbb..2f9e0c1 100644
|
||||
--- a/drivers/media/rc/lirc_dev.c
|
||||
@@ -873,7 +885,7 @@ index 5e1d866..418d57a 100644
|
||||
|
||||
#include <linux/kernel.h>
|
||||
diff --git a/drivers/media/rc/rc-main.c b/drivers/media/rc/rc-main.c
|
||||
index 4a95210..dc06268 100644
|
||||
index b67be33..176c4d3 100644
|
||||
--- a/drivers/media/rc/rc-main.c
|
||||
+++ b/drivers/media/rc/rc-main.c
|
||||
@@ -3,6 +3,7 @@
|
||||
|
13
backports/v2.6.39_const_rc_main.patch
Normal file
13
backports/v2.6.39_const_rc_main.patch
Normal file
@@ -0,0 +1,13 @@
|
||||
diff --git a/drivers/media/rc/rc-main.c b/drivers/media/rc/rc-main.c
|
||||
index 1040f2f..593949c 100644
|
||||
--- a/drivers/media/rc/rc-main.c
|
||||
+++ b/drivers/media/rc/rc-main.c
|
||||
@@ -1623,7 +1623,7 @@ static const struct attribute_group rc_dev_wakeup_filter_attr_grp = {
|
||||
.attrs = rc_dev_wakeup_filter_attrs,
|
||||
};
|
||||
|
||||
-static const struct device_type rc_dev_type = {
|
||||
+static struct device_type rc_dev_type = {
|
||||
.release = rc_dev_release,
|
||||
.uevent = rc_dev_uevent,
|
||||
};
|
156
backports/v3.10_const_snd_pcm_ops.patch
Normal file
156
backports/v3.10_const_snd_pcm_ops.patch
Normal file
@@ -0,0 +1,156 @@
|
||||
diff --git a/drivers/media/pci/cx18/cx18-alsa-pcm.c b/drivers/media/pci/cx18/cx18-alsa-pcm.c
|
||||
index 4f31042..c40558c 100644
|
||||
--- a/drivers/media/pci/cx18/cx18-alsa-pcm.c
|
||||
+++ b/drivers/media/pci/cx18/cx18-alsa-pcm.c
|
||||
@@ -308,7 +308,7 @@ static struct page *snd_pcm_get_vmalloc_page(struct snd_pcm_substream *subs,
|
||||
return vmalloc_to_page(pageptr);
|
||||
}
|
||||
|
||||
-static const struct snd_pcm_ops snd_cx18_pcm_capture_ops = {
|
||||
+static struct snd_pcm_ops snd_cx18_pcm_capture_ops = {
|
||||
.open = snd_cx18_pcm_capture_open,
|
||||
.close = snd_cx18_pcm_capture_close,
|
||||
.ioctl = snd_cx18_pcm_ioctl,
|
||||
diff --git a/drivers/media/pci/cx23885/cx23885-alsa.c b/drivers/media/pci/cx23885/cx23885-alsa.c
|
||||
index 20b3cb1..07f0734 100644
|
||||
--- a/drivers/media/pci/cx23885/cx23885-alsa.c
|
||||
+++ b/drivers/media/pci/cx23885/cx23885-alsa.c
|
||||
@@ -501,7 +501,7 @@ static struct page *snd_cx23885_page(struct snd_pcm_substream *substream,
|
||||
/*
|
||||
* operators
|
||||
*/
|
||||
-static const struct snd_pcm_ops snd_cx23885_pcm_ops = {
|
||||
+static struct snd_pcm_ops snd_cx23885_pcm_ops = {
|
||||
.open = snd_cx23885_pcm_open,
|
||||
.close = snd_cx23885_close,
|
||||
.ioctl = snd_pcm_lib_ioctl,
|
||||
diff --git a/drivers/media/pci/cx25821/cx25821-alsa.c b/drivers/media/pci/cx25821/cx25821-alsa.c
|
||||
index a45bf03..f80d9ba 100644
|
||||
--- a/drivers/media/pci/cx25821/cx25821-alsa.c
|
||||
+++ b/drivers/media/pci/cx25821/cx25821-alsa.c
|
||||
@@ -645,7 +645,7 @@ static struct page *snd_cx25821_page(struct snd_pcm_substream *substream,
|
||||
/*
|
||||
* operators
|
||||
*/
|
||||
-static const struct snd_pcm_ops snd_cx25821_pcm_ops = {
|
||||
+static struct snd_pcm_ops snd_cx25821_pcm_ops = {
|
||||
.open = snd_cx25821_pcm_open,
|
||||
.close = snd_cx25821_close,
|
||||
.ioctl = snd_pcm_lib_ioctl,
|
||||
diff --git a/drivers/media/pci/cx88/cx88-alsa.c b/drivers/media/pci/cx88/cx88-alsa.c
|
||||
index ab09bb5..e6ccf0c 100644
|
||||
--- a/drivers/media/pci/cx88/cx88-alsa.c
|
||||
+++ b/drivers/media/pci/cx88/cx88-alsa.c
|
||||
@@ -591,7 +591,7 @@ static struct page *snd_cx88_page(struct snd_pcm_substream *substream,
|
||||
/*
|
||||
* operators
|
||||
*/
|
||||
-static const struct snd_pcm_ops snd_cx88_pcm_ops = {
|
||||
+static struct snd_pcm_ops snd_cx88_pcm_ops = {
|
||||
.open = snd_cx88_pcm_open,
|
||||
.close = snd_cx88_close,
|
||||
.ioctl = snd_pcm_lib_ioctl,
|
||||
diff --git a/drivers/media/pci/ivtv/ivtv-alsa-pcm.c b/drivers/media/pci/ivtv/ivtv-alsa-pcm.c
|
||||
index 5326d86..dc59e47 100644
|
||||
--- a/drivers/media/pci/ivtv/ivtv-alsa-pcm.c
|
||||
+++ b/drivers/media/pci/ivtv/ivtv-alsa-pcm.c
|
||||
@@ -313,7 +313,7 @@ static struct page *snd_pcm_get_vmalloc_page(struct snd_pcm_substream *subs,
|
||||
return vmalloc_to_page(pageptr);
|
||||
}
|
||||
|
||||
-static const struct snd_pcm_ops snd_ivtv_pcm_capture_ops = {
|
||||
+static struct snd_pcm_ops snd_ivtv_pcm_capture_ops = {
|
||||
.open = snd_ivtv_pcm_capture_open,
|
||||
.close = snd_ivtv_pcm_capture_close,
|
||||
.ioctl = snd_ivtv_pcm_ioctl,
|
||||
diff --git a/drivers/media/pci/saa7134/saa7134-alsa.c b/drivers/media/pci/saa7134/saa7134-alsa.c
|
||||
index 7231144..4a5508d 100644
|
||||
--- a/drivers/media/pci/saa7134/saa7134-alsa.c
|
||||
+++ b/drivers/media/pci/saa7134/saa7134-alsa.c
|
||||
@@ -871,7 +871,7 @@ static struct page *snd_card_saa7134_page(struct snd_pcm_substream *substream,
|
||||
* ALSA capture callbacks definition
|
||||
*/
|
||||
|
||||
-static const struct snd_pcm_ops snd_card_saa7134_capture_ops = {
|
||||
+static struct snd_pcm_ops snd_card_saa7134_capture_ops = {
|
||||
.open = snd_card_saa7134_capture_open,
|
||||
.close = snd_card_saa7134_capture_close,
|
||||
.ioctl = snd_pcm_lib_ioctl,
|
||||
diff --git a/drivers/media/pci/tw686x/tw686x-audio.c b/drivers/media/pci/tw686x/tw686x-audio.c
|
||||
index 7719076..96e444c 100644
|
||||
--- a/drivers/media/pci/tw686x/tw686x-audio.c
|
||||
+++ b/drivers/media/pci/tw686x/tw686x-audio.c
|
||||
@@ -269,7 +269,7 @@ static snd_pcm_uframes_t tw686x_pcm_pointer(struct snd_pcm_substream *ss)
|
||||
return bytes_to_frames(ss->runtime, ac->ptr);
|
||||
}
|
||||
|
||||
-static const struct snd_pcm_ops tw686x_pcm_ops = {
|
||||
+static struct snd_pcm_ops tw686x_pcm_ops = {
|
||||
.open = tw686x_pcm_open,
|
||||
.close = tw686x_pcm_close,
|
||||
.ioctl = snd_pcm_lib_ioctl,
|
||||
diff --git a/drivers/media/usb/em28xx/em28xx-audio.c b/drivers/media/usb/em28xx/em28xx-audio.c
|
||||
index 8e799ae..535d7f7 100644
|
||||
--- a/drivers/media/usb/em28xx/em28xx-audio.c
|
||||
+++ b/drivers/media/usb/em28xx/em28xx-audio.c
|
||||
@@ -705,7 +705,7 @@ static int em28xx_cvol_new(struct snd_card *card, struct em28xx *dev,
|
||||
/*
|
||||
* register/unregister code and data
|
||||
*/
|
||||
-static const struct snd_pcm_ops snd_em28xx_pcm_capture = {
|
||||
+static struct snd_pcm_ops snd_em28xx_pcm_capture = {
|
||||
.open = snd_em28xx_capture_open,
|
||||
.close = snd_em28xx_pcm_close,
|
||||
.ioctl = snd_pcm_lib_ioctl,
|
||||
diff --git a/drivers/media/usb/go7007/snd-go7007.c b/drivers/media/usb/go7007/snd-go7007.c
|
||||
index f84a213..8e4006f 100644
|
||||
--- a/drivers/media/usb/go7007/snd-go7007.c
|
||||
+++ b/drivers/media/usb/go7007/snd-go7007.c
|
||||
@@ -198,7 +198,7 @@ static struct page *go7007_snd_pcm_page(struct snd_pcm_substream *substream,
|
||||
return vmalloc_to_page(substream->runtime->dma_area + offset);
|
||||
}
|
||||
|
||||
-static const struct snd_pcm_ops go7007_snd_capture_ops = {
|
||||
+static struct snd_pcm_ops go7007_snd_capture_ops = {
|
||||
.open = go7007_snd_capture_open,
|
||||
.close = go7007_snd_capture_close,
|
||||
.ioctl = snd_pcm_lib_ioctl,
|
||||
diff --git a/drivers/media/usb/tm6000/tm6000-alsa.c b/drivers/media/usb/tm6000/tm6000-alsa.c
|
||||
index f18cffae..153732f 100644
|
||||
--- a/drivers/media/usb/tm6000/tm6000-alsa.c
|
||||
+++ b/drivers/media/usb/tm6000/tm6000-alsa.c
|
||||
@@ -380,7 +380,7 @@ static struct page *snd_pcm_get_vmalloc_page(struct snd_pcm_substream *subs,
|
||||
/*
|
||||
* operators
|
||||
*/
|
||||
-static const struct snd_pcm_ops snd_tm6000_pcm_ops = {
|
||||
+static struct snd_pcm_ops snd_tm6000_pcm_ops = {
|
||||
.open = snd_tm6000_pcm_open,
|
||||
.close = snd_tm6000_close,
|
||||
.ioctl = snd_pcm_lib_ioctl,
|
||||
diff --git a/drivers/media/usb/usbtv/usbtv-audio.c b/drivers/media/usb/usbtv/usbtv-audio.c
|
||||
index 2c2ca77..14400f3 100644
|
||||
--- a/drivers/media/usb/usbtv/usbtv-audio.c
|
||||
+++ b/drivers/media/usb/usbtv/usbtv-audio.c
|
||||
@@ -332,7 +332,7 @@ static snd_pcm_uframes_t snd_usbtv_pointer(struct snd_pcm_substream *substream)
|
||||
return chip->snd_buffer_pos;
|
||||
}
|
||||
|
||||
-static const struct snd_pcm_ops snd_usbtv_pcm_ops = {
|
||||
+static struct snd_pcm_ops snd_usbtv_pcm_ops = {
|
||||
.open = snd_usbtv_pcm_open,
|
||||
.close = snd_usbtv_pcm_close,
|
||||
.ioctl = snd_pcm_lib_ioctl,
|
||||
diff --git a/sound/pci/bt87x.c b/sound/pci/bt87x.c
|
||||
index d8ade87..f9122fa 100644
|
||||
--- a/sound/pci/bt87x.c
|
||||
+++ b/sound/pci/bt87x.c
|
||||
@@ -550,7 +550,7 @@ static snd_pcm_uframes_t snd_bt87x_pointer(struct snd_pcm_substream *substream)
|
||||
return (snd_pcm_uframes_t)bytes_to_frames(runtime, chip->current_line * chip->line_bytes);
|
||||
}
|
||||
|
||||
-static const struct snd_pcm_ops snd_bt87x_pcm_ops = {
|
||||
+static struct snd_pcm_ops snd_bt87x_pcm_ops = {
|
||||
.open = snd_bt87x_pcm_open,
|
||||
.close = snd_bt87x_close,
|
||||
.ioctl = snd_pcm_lib_ioctl,
|
@@ -1,5 +1,5 @@
|
||||
diff --git a/drivers/media/rc/lirc_dev.c b/drivers/media/rc/lirc_dev.c
|
||||
index 133ff8f..dbb9ce9 100644
|
||||
index 2f9e0c1..dc1a534 100644
|
||||
--- a/drivers/media/rc/lirc_dev.c
|
||||
+++ b/drivers/media/rc/lirc_dev.c
|
||||
@@ -92,9 +92,11 @@ void ir_lirc_raw_event(struct rc_dev *dev, struct ir_raw_event ev)
|
||||
@@ -10,7 +10,7 @@ index 133ff8f..dbb9ce9 100644
|
||||
- kfifo_put(&fh->rawir,
|
||||
- LIRC_SPACE(dev->gap_duration));
|
||||
+ list_for_each_entry(fh, &dev->lirc_fh, list) {
|
||||
+ u64 gap_duration = LIRC_SPACE(dev->gap_duration);
|
||||
+ unsigned int gap_duration = LIRC_SPACE(dev->gap_duration);
|
||||
+ kfifo_in(&fh->rawir, &gap_duration, sizeof(gap_duration));
|
||||
+ }
|
||||
+
|
||||
@@ -37,7 +37,7 @@ index 133ff8f..dbb9ce9 100644
|
||||
}
|
||||
spin_unlock_irqrestore(&dev->lirc_fh_lock, flags);
|
||||
diff --git a/drivers/media/rc/rc-ir-raw.c b/drivers/media/rc/rc-ir-raw.c
|
||||
index dbb0ad1..4e86abc 100644
|
||||
index 213394b..7fe73f0 100644
|
||||
--- a/drivers/media/rc/rc-ir-raw.c
|
||||
+++ b/drivers/media/rc/rc-ir-raw.c
|
||||
@@ -69,7 +69,7 @@ int ir_raw_event_store(struct rc_dev *dev, struct ir_raw_event *ev)
|
||||
|
@@ -58,7 +58,7 @@ index b50c9cc..942c741 100644
|
||||
|
||||
obj-$(CONFIG_VIDEO_V4L2) += videodev.o
|
||||
diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c
|
||||
index 0a1785c..1f32a9a 100644
|
||||
index ce0d711..84cab64 100644
|
||||
--- a/drivers/media/v4l2-core/v4l2-ioctl.c
|
||||
+++ b/drivers/media/v4l2-core/v4l2-ioctl.c
|
||||
@@ -30,8 +30,6 @@
|
||||
@@ -70,7 +70,7 @@ index 0a1785c..1f32a9a 100644
|
||||
/* Zero out the end of the struct pointed to by p. Everything after, but
|
||||
* not including, the specified field is cleared. */
|
||||
#define CLEAR_AFTER_FIELD(p, field) \
|
||||
@@ -2905,13 +2903,6 @@ video_usercopy(struct file *file, unsigned int cmd, unsigned long arg,
|
||||
@@ -2907,13 +2905,6 @@ video_usercopy(struct file *file, unsigned int cmd, unsigned long arg,
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
@@ -1,8 +1,20 @@
|
||||
diff --git a/drivers/media/cec/cec-pin-error-inj.c b/drivers/media/cec/cec-pin-error-inj.c
|
||||
index aaa899a..3915403 100644
|
||||
--- a/drivers/media/cec/cec-pin-error-inj.c
|
||||
+++ b/drivers/media/cec/cec-pin-error-inj.c
|
||||
@@ -5,7 +5,6 @@
|
||||
|
||||
#include <linux/delay.h>
|
||||
#include <linux/slab.h>
|
||||
-#include <linux/sched/types.h>
|
||||
|
||||
#include <media/cec-pin.h>
|
||||
#include "cec-pin-priv.h"
|
||||
diff --git a/drivers/media/cec/cec-pin.c b/drivers/media/cec/cec-pin.c
|
||||
index b48dfe844118..d87639004496 100644
|
||||
index fafe1eb..fc587fb 100644
|
||||
--- a/drivers/media/cec/cec-pin.c
|
||||
+++ b/drivers/media/cec/cec-pin.c
|
||||
@@ -17,7 +17,6 @@
|
||||
@@ -5,7 +5,6 @@
|
||||
|
||||
#include <linux/delay.h>
|
||||
#include <linux/slab.h>
|
||||
@@ -11,7 +23,7 @@ index b48dfe844118..d87639004496 100644
|
||||
#include <media/cec-pin.h>
|
||||
#include "cec-pin-priv.h"
|
||||
diff --git a/drivers/media/dvb-core/dvb_ca_en50221.c b/drivers/media/dvb-core/dvb_ca_en50221.c
|
||||
index e5a3a5bf26ec..c632f0781f40 100644
|
||||
index f0298b5..b17bd97 100644
|
||||
--- a/drivers/media/dvb-core/dvb_ca_en50221.c
|
||||
+++ b/drivers/media/dvb-core/dvb_ca_en50221.c
|
||||
@@ -35,7 +35,7 @@
|
||||
@@ -22,9 +34,9 @@ index e5a3a5bf26ec..c632f0781f40 100644
|
||||
+#include <linux/sched.h>
|
||||
#include <linux/kthread.h>
|
||||
|
||||
#include "dvb_ca_en50221.h"
|
||||
#include <media/dvb_ca_en50221.h>
|
||||
diff --git a/drivers/media/dvb-core/dvb_demux.c b/drivers/media/dvb-core/dvb_demux.c
|
||||
index d83dff4d3a4d..965f6afb2281 100644
|
||||
index 9c4e466..f5eb4ee 100644
|
||||
--- a/drivers/media/dvb-core/dvb_demux.c
|
||||
+++ b/drivers/media/dvb-core/dvb_demux.c
|
||||
@@ -20,7 +20,7 @@
|
||||
@@ -37,7 +49,7 @@ index d83dff4d3a4d..965f6afb2281 100644
|
||||
#include <linux/slab.h>
|
||||
#include <linux/vmalloc.h>
|
||||
diff --git a/drivers/media/dvb-core/dvb_frontend.c b/drivers/media/dvb-core/dvb_frontend.c
|
||||
index d4742bace046..da86a4dd6193 100644
|
||||
index aaa67d3..13e97a2 100644
|
||||
--- a/drivers/media/dvb-core/dvb_frontend.c
|
||||
+++ b/drivers/media/dvb-core/dvb_frontend.c
|
||||
@@ -30,7 +30,7 @@
|
||||
@@ -50,7 +62,7 @@ index d4742bace046..da86a4dd6193 100644
|
||||
#include <linux/slab.h>
|
||||
#include <linux/poll.h>
|
||||
diff --git a/drivers/media/pci/cx18/cx18-driver.h b/drivers/media/pci/cx18/cx18-driver.h
|
||||
index 7be2088c45fe..fef3c736fcba 100644
|
||||
index 0b707fa..dfdf65d 100644
|
||||
--- a/drivers/media/pci/cx18/cx18-driver.h
|
||||
+++ b/drivers/media/pci/cx18/cx18-driver.h
|
||||
@@ -24,7 +24,7 @@
|
||||
@@ -63,7 +75,7 @@ index 7be2088c45fe..fef3c736fcba 100644
|
||||
#include <linux/pci.h>
|
||||
#include <linux/interrupt.h>
|
||||
diff --git a/drivers/media/pci/ivtv/ivtv-driver.c b/drivers/media/pci/ivtv/ivtv-driver.c
|
||||
index 6b2ffdc96961..01c229252fe1 100644
|
||||
index 6b2ffdc..01c2292 100644
|
||||
--- a/drivers/media/pci/ivtv/ivtv-driver.c
|
||||
+++ b/drivers/media/pci/ivtv/ivtv-driver.c
|
||||
@@ -59,7 +59,6 @@
|
||||
@@ -75,7 +87,7 @@ index 6b2ffdc96961..01c229252fe1 100644
|
||||
/* If you have already X v4l cards, then set this to X. This way
|
||||
the device numbers stay matched. Example: you have a WinTV card
|
||||
diff --git a/drivers/media/pci/ivtv/ivtv-driver.h b/drivers/media/pci/ivtv/ivtv-driver.h
|
||||
index f0aa5efecfa3..6477f5151a48 100644
|
||||
index 6b099da..81f3c19 100644
|
||||
--- a/drivers/media/pci/ivtv/ivtv-driver.h
|
||||
+++ b/drivers/media/pci/ivtv/ivtv-driver.h
|
||||
@@ -39,38 +39,37 @@
|
||||
@@ -135,7 +147,7 @@ index f0aa5efecfa3..6477f5151a48 100644
|
||||
/* Memory layout */
|
||||
#define IVTV_ENCODER_OFFSET 0x00000000
|
||||
diff --git a/drivers/media/pci/pt1/pt1.c b/drivers/media/pci/pt1/pt1.c
|
||||
index acc3afeb6224..1e7992dcd138 100644
|
||||
index 4f6867a..d0aa6bb 100644
|
||||
--- a/drivers/media/pci/pt1/pt1.c
|
||||
+++ b/drivers/media/pci/pt1/pt1.c
|
||||
@@ -18,7 +18,6 @@
|
||||
@@ -147,7 +159,7 @@ index acc3afeb6224..1e7992dcd138 100644
|
||||
#include <linux/slab.h>
|
||||
#include <linux/vmalloc.h>
|
||||
diff --git a/drivers/media/pci/pt3/pt3.c b/drivers/media/pci/pt3/pt3.c
|
||||
index 34044a45fecc..abe7f962195c 100644
|
||||
index da74828..198829d 100644
|
||||
--- a/drivers/media/pci/pt3/pt3.c
|
||||
+++ b/drivers/media/pci/pt3/pt3.c
|
||||
@@ -21,7 +21,6 @@
|
||||
@@ -156,10 +168,10 @@ index 34044a45fecc..abe7f962195c 100644
|
||||
#include <linux/string.h>
|
||||
-#include <linux/sched/signal.h>
|
||||
|
||||
#include "dmxdev.h"
|
||||
#include "dvbdev.h"
|
||||
#include <media/dmxdev.h>
|
||||
#include <media/dvbdev.h>
|
||||
diff --git a/drivers/media/pci/solo6x10/solo6x10-i2c.c b/drivers/media/pci/solo6x10/solo6x10-i2c.c
|
||||
index 89f2f2a493c2..0456f2db5878 100644
|
||||
index 89f2f2a..0456f2d 100644
|
||||
--- a/drivers/media/pci/solo6x10/solo6x10-i2c.c
|
||||
+++ b/drivers/media/pci/solo6x10/solo6x10-i2c.c
|
||||
@@ -27,7 +27,6 @@
|
||||
@@ -171,7 +183,7 @@ index 89f2f2a493c2..0456f2db5878 100644
|
||||
#include "solo6x10.h"
|
||||
|
||||
diff --git a/drivers/media/pci/zoran/zoran_device.c b/drivers/media/pci/zoran/zoran_device.c
|
||||
index 40adceebca7e..671907a6e6b6 100644
|
||||
index 40adcee..671907a 100644
|
||||
--- a/drivers/media/pci/zoran/zoran_device.c
|
||||
+++ b/drivers/media/pci/zoran/zoran_device.c
|
||||
@@ -28,7 +28,6 @@
|
||||
@@ -183,10 +195,10 @@ index 40adceebca7e..671907a6e6b6 100644
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/proc_fs.h>
|
||||
diff --git a/drivers/media/platform/vivid/vivid-radio-rx.c b/drivers/media/platform/vivid/vivid-radio-rx.c
|
||||
index 35fbff490535..f2bf92bca62b 100644
|
||||
index 1f86d7d..854325d 100644
|
||||
--- a/drivers/media/platform/vivid/vivid-radio-rx.c
|
||||
+++ b/drivers/media/platform/vivid/vivid-radio-rx.c
|
||||
@@ -22,8 +22,6 @@
|
||||
@@ -10,8 +10,6 @@
|
||||
#include <linux/delay.h>
|
||||
#include <linux/videodev2.h>
|
||||
#include <linux/v4l2-dv-timings.h>
|
||||
@@ -196,10 +208,10 @@ index 35fbff490535..f2bf92bca62b 100644
|
||||
#include <media/v4l2-event.h>
|
||||
#include <media/v4l2-dv-timings.h>
|
||||
diff --git a/drivers/media/platform/vivid/vivid-radio-tx.c b/drivers/media/platform/vivid/vivid-radio-tx.c
|
||||
index 897b56195ca7..9c2114898875 100644
|
||||
index 1a3749b..89a1ee6 100644
|
||||
--- a/drivers/media/platform/vivid/vivid-radio-tx.c
|
||||
+++ b/drivers/media/platform/vivid/vivid-radio-tx.c
|
||||
@@ -19,7 +19,6 @@
|
||||
@@ -7,7 +7,6 @@
|
||||
|
||||
#include <linux/errno.h>
|
||||
#include <linux/kernel.h>
|
||||
@@ -208,7 +220,7 @@ index 897b56195ca7..9c2114898875 100644
|
||||
#include <linux/videodev2.h>
|
||||
#include <linux/v4l2-dv-timings.h>
|
||||
diff --git a/drivers/media/usb/cpia2/cpia2_core.c b/drivers/media/usb/cpia2/cpia2_core.c
|
||||
index 0efba0da0a45..5d8aa65ab40b 100644
|
||||
index 3dfbb54..30784fa 100644
|
||||
--- a/drivers/media/usb/cpia2/cpia2_core.c
|
||||
+++ b/drivers/media/usb/cpia2/cpia2_core.c
|
||||
@@ -32,7 +32,6 @@
|
||||
@@ -220,7 +232,7 @@ index 0efba0da0a45..5d8aa65ab40b 100644
|
||||
#define FIRMWARE "cpia2/stv0672_vp4.bin"
|
||||
MODULE_FIRMWARE(FIRMWARE);
|
||||
diff --git a/drivers/media/usb/gspca/cpia1.c b/drivers/media/usb/gspca/cpia1.c
|
||||
index 3244857169f1..32e492df4d1b 100644
|
||||
index 67afabf..272a8bc 100644
|
||||
--- a/drivers/media/usb/gspca/cpia1.c
|
||||
+++ b/drivers/media/usb/gspca/cpia1.c
|
||||
@@ -28,8 +28,6 @@
|
||||
@@ -233,7 +245,7 @@ index 3244857169f1..32e492df4d1b 100644
|
||||
|
||||
MODULE_AUTHOR("Hans de Goede <hdegoede@redhat.com>");
|
||||
diff --git a/drivers/media/v4l2-core/videobuf-dma-sg.c b/drivers/media/v4l2-core/videobuf-dma-sg.c
|
||||
index 0b5c43f7e020..36bd904946bd 100644
|
||||
index add2edb..8eb0f49 100644
|
||||
--- a/drivers/media/v4l2-core/videobuf-dma-sg.c
|
||||
+++ b/drivers/media/v4l2-core/videobuf-dma-sg.c
|
||||
@@ -21,7 +21,7 @@
|
||||
@@ -246,7 +258,7 @@ index 0b5c43f7e020..36bd904946bd 100644
|
||||
#include <linux/interrupt.h>
|
||||
|
||||
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm_bo.c b/drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm_bo.c
|
||||
index 79bd540d7882..c9a61ba74002 100644
|
||||
index 79bd540..c9a61ba 100644
|
||||
--- a/drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm_bo.c
|
||||
+++ b/drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm_bo.c
|
||||
@@ -34,7 +34,7 @@
|
||||
@@ -259,7 +271,7 @@ index 79bd540d7882..c9a61ba74002 100644
|
||||
|
||||
#include <asm/set_memory.h>
|
||||
diff --git a/include/media/v4l2-ioctl.h b/include/media/v4l2-ioctl.h
|
||||
index a7b3f7c75d62..a63034b58e47 100644
|
||||
index a7b3f7c..a63034b 100644
|
||||
--- a/include/media/v4l2-ioctl.h
|
||||
+++ b/include/media/v4l2-ioctl.h
|
||||
@@ -13,7 +13,6 @@
|
||||
|
@@ -6,60 +6,66 @@ Date: Fri Jul 21 20:41:49 2017 +0200
|
||||
|
||||
This reverts commit 1facf21e8b903524b34f09c39a7d27b4b71a07f7.
|
||||
|
||||
Update by Jasmin Jessich <jasmin@anw.at>
|
||||
Revert also commit 43e69758e6c0cc05adc4d39316f65abb120a00a0.
|
||||
|
||||
diff --git a/drivers/media/pci/solo6x10/solo6x10-g723.c b/drivers/media/pci/solo6x10/solo6x10-g723.c
|
||||
index 3ca947092775..36e93540bb49 100644
|
||||
index 2ac33b5..f9717ed 100644
|
||||
--- a/drivers/media/pci/solo6x10/solo6x10-g723.c
|
||||
+++ b/drivers/media/pci/solo6x10/solo6x10-g723.c
|
||||
@@ -223,9 +223,9 @@ static snd_pcm_uframes_t snd_solo_pcm_pointer(struct snd_pcm_substream *ss)
|
||||
return idx * G723_FRAMES_PER_PAGE;
|
||||
}
|
||||
|
||||
-static int __snd_solo_pcm_copy(struct snd_pcm_substream *ss,
|
||||
- unsigned long pos, void *dst,
|
||||
- unsigned long count, bool in_kernel)
|
||||
-static int snd_solo_pcm_copy_user(struct snd_pcm_substream *ss, int channel,
|
||||
- unsigned long pos, void __user *dst,
|
||||
- unsigned long count)
|
||||
+static int snd_solo_pcm_copy(struct snd_pcm_substream *ss, int channel,
|
||||
+ snd_pcm_uframes_t pos, void __user *dst,
|
||||
+ snd_pcm_uframes_t count)
|
||||
{
|
||||
struct solo_snd_pcm *solo_pcm = snd_pcm_substream_chip(ss);
|
||||
struct solo_dev *solo_dev = solo_pcm->solo_dev;
|
||||
@@ -242,31 +242,16 @@ static int __snd_solo_pcm_copy(struct snd_pcm_substream *ss,
|
||||
@@ -242,35 +242,11 @@ static int snd_solo_pcm_copy_user(struct snd_pcm_substream *ss, int channel,
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
- if (in_kernel)
|
||||
- memcpy(dst, solo_pcm->g723_buf, G723_PERIOD_BYTES);
|
||||
- else if (copy_to_user((void __user *)dst,
|
||||
- solo_pcm->g723_buf, G723_PERIOD_BYTES))
|
||||
- if (copy_to_user(dst, solo_pcm->g723_buf, G723_PERIOD_BYTES))
|
||||
- return -EFAULT;
|
||||
- dst += G723_PERIOD_BYTES;
|
||||
- }
|
||||
-
|
||||
- return 0;
|
||||
-}
|
||||
+ err = copy_to_user(dst + (i * G723_PERIOD_BYTES),
|
||||
+ solo_pcm->g723_buf, G723_PERIOD_BYTES);
|
||||
+
|
||||
+ if (err)
|
||||
return -EFAULT;
|
||||
- dst += G723_PERIOD_BYTES;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
-static int snd_solo_pcm_copy_user(struct snd_pcm_substream *ss, int channel,
|
||||
- unsigned long pos, void __user *dst,
|
||||
- unsigned long count)
|
||||
-{
|
||||
- return __snd_solo_pcm_copy(ss, pos, (void *)dst, count, false);
|
||||
-}
|
||||
-
|
||||
-static int snd_solo_pcm_copy_kernel(struct snd_pcm_substream *ss, int channel,
|
||||
- unsigned long pos, void *dst,
|
||||
- unsigned long count)
|
||||
-{
|
||||
- return __snd_solo_pcm_copy(ss, pos, dst, count, true);
|
||||
-}
|
||||
- struct solo_snd_pcm *solo_pcm = snd_pcm_substream_chip(ss);
|
||||
- struct solo_dev *solo_dev = solo_pcm->solo_dev;
|
||||
- int err, i;
|
||||
-
|
||||
static const struct snd_pcm_ops snd_solo_pcm_ops = {
|
||||
.open = snd_solo_pcm_open,
|
||||
.close = snd_solo_pcm_close,
|
||||
@@ -276,8 +261,7 @@ static const struct snd_pcm_ops snd_solo_pcm_ops = {
|
||||
- for (i = 0; i < (count / G723_FRAMES_PER_PAGE); i++) {
|
||||
- int page = (pos / G723_FRAMES_PER_PAGE) + i;
|
||||
-
|
||||
- err = solo_p2m_dma_t(solo_dev, 0, solo_pcm->g723_dma,
|
||||
- SOLO_G723_EXT_ADDR(solo_dev) +
|
||||
- (page * G723_PERIOD_BLOCK) +
|
||||
- (ss->number * G723_PERIOD_BYTES),
|
||||
- G723_PERIOD_BYTES, 0, 0);
|
||||
if (err)
|
||||
- return err;
|
||||
-
|
||||
- memcpy(dst, solo_pcm->g723_buf, G723_PERIOD_BYTES);
|
||||
- dst += G723_PERIOD_BYTES;
|
||||
+ return -EFAULT;
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -285,8 +261,7 @@ static const struct snd_pcm_ops snd_solo_pcm_ops = {
|
||||
.prepare = snd_solo_pcm_prepare,
|
||||
.trigger = snd_solo_pcm_trigger,
|
||||
.pointer = snd_solo_pcm_pointer,
|
||||
|
20
backports/v4.3_bt87x_const_fix.patch
Normal file
20
backports/v4.3_bt87x_const_fix.patch
Normal file
@@ -0,0 +1,20 @@
|
||||
diff --git a/sound/pci/bt87x.c b/sound/pci/bt87x.c
|
||||
index d8ade87..eb3d306 100644
|
||||
--- a/sound/pci/bt87x.c
|
||||
+++ b/sound/pci/bt87x.c
|
||||
@@ -401,13 +401,13 @@ static int snd_bt87x_set_digital_hw(struct snd_bt87x *chip, struct snd_pcm_runti
|
||||
|
||||
static int snd_bt87x_set_analog_hw(struct snd_bt87x *chip, struct snd_pcm_runtime *runtime)
|
||||
{
|
||||
- static const struct snd_ratnum analog_clock = {
|
||||
+ static struct snd_ratnum analog_clock = {
|
||||
.num = ANALOG_CLOCK,
|
||||
.den_min = CLOCK_DIV_MIN,
|
||||
.den_max = CLOCK_DIV_MAX,
|
||||
.den_step = 1
|
||||
};
|
||||
- static const struct snd_pcm_hw_constraint_ratnums constraint_rates = {
|
||||
+ static struct snd_pcm_hw_constraint_ratnums constraint_rates = {
|
||||
.nrats = 1,
|
||||
.rats = &analog_clock
|
||||
};
|
13
backports/v4.5_copy_to_user_warning.patch
Normal file
13
backports/v4.5_copy_to_user_warning.patch
Normal file
@@ -0,0 +1,13 @@
|
||||
diff --git a/drivers/media/radio/radio-cadet.c b/drivers/media/radio/radio-cadet.c
|
||||
index 5b82e63..272473c 100644
|
||||
--- a/drivers/media/radio/radio-cadet.c
|
||||
+++ b/drivers/media/radio/radio-cadet.c
|
||||
@@ -344,7 +344,7 @@ static ssize_t cadet_read(struct file *file, char __user *data, size_t count, lo
|
||||
readbuf[i++] = dev->rdsbuf[dev->rdsout++];
|
||||
mutex_unlock(&dev->lock);
|
||||
|
||||
- if (i && copy_to_user(data, readbuf, i))
|
||||
+ if (i > sizeof(readbuf) || (i && copy_to_user(data, readbuf, i)))
|
||||
return -EFAULT;
|
||||
return i;
|
||||
}
|
16
backports/v4.7_copy_to_user_warning.patch
Normal file
16
backports/v4.7_copy_to_user_warning.patch
Normal file
@@ -0,0 +1,16 @@
|
||||
diff --git a/drivers/media/dvb-core/dvb_ca_en50221.c b/drivers/media/dvb-core/dvb_ca_en50221.c
|
||||
index 97365a8..0330226 100644
|
||||
--- a/drivers/media/dvb-core/dvb_ca_en50221.c
|
||||
+++ b/drivers/media/dvb-core/dvb_ca_en50221.c
|
||||
@@ -1494,7 +1494,10 @@ static ssize_t dvb_ca_en50221_io_write(struct file *file,
|
||||
|
||||
fragbuf[0] = connection_id;
|
||||
fragbuf[1] = ((fragpos + fraglen) < count) ? 0x80 : 0x00;
|
||||
- status = copy_from_user(fragbuf + 2, buf + fragpos, fraglen);
|
||||
+ /* to fix a warning for older kernels we need to check fraglen explicitly */
|
||||
+ status = -1;
|
||||
+ if (fraglen <= sizeof(fragbuf) - 2)
|
||||
+ status = copy_from_user(fragbuf + 2, buf + fragpos, fraglen);
|
||||
if (status) {
|
||||
status = -EFAULT;
|
||||
goto exit;
|
13
backports/v4.7_objtool_warning.patch
Normal file
13
backports/v4.7_objtool_warning.patch
Normal file
@@ -0,0 +1,13 @@
|
||||
diff --git a/drivers/media/usb/ttusb-dec/ttusb_dec.c b/drivers/media/usb/ttusb-dec/ttusb_dec.c
|
||||
index 44ca66c..c2c7585 100644
|
||||
--- a/drivers/media/usb/ttusb-dec/ttusb_dec.c
|
||||
+++ b/drivers/media/usb/ttusb-dec/ttusb_dec.c
|
||||
@@ -802,6 +802,8 @@ static void ttusb_dec_process_urb_frame_list(unsigned long data)
|
||||
kfree(frame);
|
||||
}
|
||||
}
|
||||
+/* to fix a warning for Kernel 4.7 */
|
||||
+STACK_FRAME_NON_STANDARD(ttusb_dec_process_urb_frame_list);
|
||||
|
||||
static void ttusb_dec_process_urb(struct urb *urb)
|
||||
{
|
@@ -61,3 +61,50 @@ index 49265f0..e897c15 100644
|
||||
|
||||
return HRTIMER_RESTART;
|
||||
end:
|
||||
|
||||
**** Add this temporarily until it is accepeted in mainline ****
|
||||
From 625ece81ab480c7690a100ae1ad4265bddd5af40 Mon Sep 17 00:00:00 2001
|
||||
From: Jasmin Jessich <jasmin@anw.at>
|
||||
Date: Sat, 24 Mar 2018 20:09:21 +0100
|
||||
Subject: [PATCH] media: cec-pin: Fixed ktime_t to ns conversion
|
||||
|
||||
Older Kernels use a struct for ktime_t, which requires the conversion
|
||||
function ktime_to_ns to be used on some places. With this patch it will
|
||||
compile now also for older Kernel versions.
|
||||
|
||||
Signed-off-by: Jasmin Jessich <jasmin@anw.at>
|
||||
---
|
||||
drivers/media/cec/cec-pin.c | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/drivers/media/cec/cec-pin.c b/drivers/media/cec/cec-pin.c
|
||||
index fafe1eb..2a5df99 100644
|
||||
--- a/drivers/media/cec/cec-pin.c
|
||||
+++ b/drivers/media/cec/cec-pin.c
|
||||
@@ -668,7 +668,7 @@ static void cec_pin_rx_states(struct cec_pin *pin, ktime_t ts)
|
||||
/* Start bit low is too short, go back to idle */
|
||||
if (delta < CEC_TIM_START_BIT_LOW_MIN - CEC_TIM_IDLE_SAMPLE) {
|
||||
if (!pin->rx_start_bit_low_too_short_cnt++) {
|
||||
- pin->rx_start_bit_low_too_short_ts = pin->ts;
|
||||
+ pin->rx_start_bit_low_too_short_ts = ktime_to_ns(pin->ts);
|
||||
pin->rx_start_bit_low_too_short_delta = delta;
|
||||
}
|
||||
cec_pin_to_idle(pin);
|
||||
@@ -700,7 +700,7 @@ static void cec_pin_rx_states(struct cec_pin *pin, ktime_t ts)
|
||||
/* Start bit is too short, go back to idle */
|
||||
if (delta < CEC_TIM_START_BIT_TOTAL_MIN - CEC_TIM_IDLE_SAMPLE) {
|
||||
if (!pin->rx_start_bit_too_short_cnt++) {
|
||||
- pin->rx_start_bit_too_short_ts = pin->ts;
|
||||
+ pin->rx_start_bit_too_short_ts = ktime_to_ns(pin->ts);
|
||||
pin->rx_start_bit_too_short_delta = delta;
|
||||
}
|
||||
cec_pin_to_idle(pin);
|
||||
@@ -770,7 +770,7 @@ static void cec_pin_rx_states(struct cec_pin *pin, ktime_t ts)
|
||||
*/
|
||||
if (delta < CEC_TIM_DATA_BIT_TOTAL_MIN) {
|
||||
if (!pin->rx_data_bit_too_short_cnt++) {
|
||||
- pin->rx_data_bit_too_short_ts = pin->ts;
|
||||
+ pin->rx_data_bit_too_short_ts = ktime_to_ns(pin->ts);
|
||||
pin->rx_data_bit_too_short_delta = delta;
|
||||
}
|
||||
cec_pin_low(pin);
|
||||
|
@@ -143,6 +143,9 @@ EXTRA_CFLAGS += $(if $(wildcard $(srctree)/.mm), -DMM_KERNEL)
|
||||
# Make sure to use the backport header for common stuff
|
||||
EXTRA_CFLAGS += -include $(obj)/compat.h
|
||||
|
||||
# gives too much warnings (false positives) -> disable it
|
||||
EXTRA_CFLAGS += -Wno-format-truncation
|
||||
|
||||
#################################################
|
||||
# Kernel 2.6/3.x specific rules
|
||||
|
||||
|
66
v4l/compat.h
66
v4l/compat.h
@@ -30,6 +30,12 @@
|
||||
#include <linux/idr.h>
|
||||
#include "../linux/kernel_version.h"
|
||||
|
||||
#ifdef RETPOLINE
|
||||
#ifndef __noretpoline
|
||||
#define __noretpoline __attribute__((indirect_branch("keep")))
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#undef __devinitconst
|
||||
#define __devinitconst
|
||||
|
||||
@@ -2348,4 +2354,64 @@ static inline u32 next_pseudo_random32(u32 seed)
|
||||
}
|
||||
#endif
|
||||
|
||||
/* of_property_read_u32_index is available since Kernel 3.10. For older Kernels
|
||||
* this will not compile */
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)
|
||||
#ifdef NEED_I2C_NEW_SECONDARY_DEV
|
||||
#include <linux/i2c.h>
|
||||
static inline struct i2c_client *i2c_new_secondary_device(struct i2c_client *client,
|
||||
const char *name,
|
||||
u16 default_addr)
|
||||
{
|
||||
struct device_node *np = client->dev.of_node;
|
||||
u32 addr = default_addr;
|
||||
int i;
|
||||
|
||||
if (np) {
|
||||
i = of_property_match_string(np, "reg-names", name);
|
||||
if (i >= 0)
|
||||
of_property_read_u32_index(np, "reg", i, &addr);
|
||||
}
|
||||
|
||||
dev_dbg(&client->adapter->dev, "Address for %s : 0x%x\n", name, addr);
|
||||
return i2c_new_dummy(client->adapter, addr);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef NEED_MEMDUP_USER_NUL
|
||||
static inline void *memdup_user_nul(const void __user *src, size_t len)
|
||||
{
|
||||
char *p;
|
||||
|
||||
/*
|
||||
* Always use GFP_KERNEL, since copy_from_user() can sleep and
|
||||
* cause pagefault, which makes it pointless to use GFP_NOFS
|
||||
* or GFP_ATOMIC.
|
||||
*/
|
||||
p = kmalloc_track_caller(len + 1, GFP_KERNEL);
|
||||
if (!p)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
|
||||
if (copy_from_user(p, src, len)) {
|
||||
kfree(p);
|
||||
return ERR_PTR(-EFAULT);
|
||||
}
|
||||
p[len] = '\0';
|
||||
|
||||
return p;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef NEED_KEY_SCREENSAVER
|
||||
#define KEY_SCREENSAVER 0x245 /* AL Screen Saver */
|
||||
#endif
|
||||
|
||||
#ifdef NEED_STACK_FRAME_NON_STANDARD
|
||||
#define STACK_FRAME_NON_STANDARD(func)
|
||||
#else
|
||||
/* be sure STACK_FRAME_NON_STANDARD is defined */
|
||||
#include <linux/frame.h>
|
||||
#endif
|
||||
|
||||
#endif /* _COMPAT_H */
|
||||
|
@@ -718,12 +718,16 @@ sub check_other_dependencies()
|
||||
check_files_for_func("get_user_pages_longterm", "NEED_GET_USER_PAGES_LONGTERM", "include/linux/mm.h");
|
||||
check_files_for_func("__pfn_to_phys", "NEED_PFN_TO_PHYS", "include/asm-generic/memory_model.h");
|
||||
check_files_for_func("next_pseudo_random32", "NEED_NEXT_PSEUDO_RANDOM32", "include/linux/random.h");
|
||||
check_files_for_func("i2c_new_secondary_device", "NEED_I2C_NEW_SECONDARY_DEV", "include/linux/i2c.h");
|
||||
check_files_for_func("memdup_user_nul", "NEED_MEMDUP_USER_NUL", "include/linux/string.h");
|
||||
check_files_for_func("STACK_FRAME_NON_STANDARD", "NEED_STACK_FRAME_NON_STANDARD", "include/linux/frame.h");
|
||||
|
||||
# For tests for uapi-dependent logic
|
||||
check_files_for_func_uapi("usb_endpoint_maxp", "NEED_USB_ENDPOINT_MAXP", "usb/ch9.h");
|
||||
check_files_for_func_uapi("usb_endpoint_maxp_mult", "NEED_USB_ENDPOINT_MAXP_MULT", "usb/ch9.h");
|
||||
check_files_for_func_uapi("PCI_EXP_DEVCTL2_COMP_TIMEOUT", "NEED_PCI_EXP_DEVCTL2_COMP_TIMEOUT", "pci_regs.h");
|
||||
check_files_for_func_uapi("__poll_t", "NEED_POLL_T", "types.h");
|
||||
check_files_for_func_uapi("KEY_SCREENSAVER", "NEED_KEY_SCREENSAVER", "input.h");
|
||||
}
|
||||
|
||||
# Do the basic rules
|
||||
|
@@ -16,6 +16,8 @@ VIDEO_OV5670
|
||||
[4.7.0]
|
||||
# needs i2c_mux_alloc
|
||||
DVB_LGDT3306A
|
||||
# needs struct i2c_mux_core
|
||||
DVB_AF9013
|
||||
|
||||
[4.5.0]
|
||||
# needs pm_runtime_get_if_in_use
|
||||
@@ -76,6 +78,8 @@ IR_GPIO_CIR
|
||||
VIDEO_OV5695
|
||||
VIDEO_OV9650
|
||||
VIDEO_OV2685
|
||||
VIDEO_TW9910
|
||||
SOC_CAMERA_TW9910
|
||||
# needs component_match_add
|
||||
VIDEO_VIMC
|
||||
|
||||
@@ -88,14 +92,12 @@ VIDEO_TDA1997X
|
||||
[3.14.0]
|
||||
# needs pci_enable_msi_range
|
||||
VIDEO_COBALT
|
||||
# needs linux/component.h
|
||||
VIDEO_VIMC
|
||||
# requires m2m_ctx in struct v4l2_fh
|
||||
VIDEO_VIM2M
|
||||
|
||||
[3.13.0]
|
||||
# needs gpio/consumer.h
|
||||
RADIO_SI4713
|
||||
SOC_CAMERA_TW9910
|
||||
VIDEO_TW9910
|
||||
|
||||
[3.12.0]
|
||||
# BIN_ATTR_RW was changed
|
||||
@@ -154,6 +156,7 @@ VIDEO_MT9T001
|
||||
VIDEO_S5K5BAF
|
||||
VIDEO_S5K6A3
|
||||
VIDEO_OV2659
|
||||
VIDEO_OV5647
|
||||
# needs devm_gpio_request_one
|
||||
VIDEO_ADV7183
|
||||
VIDEO_VS6624
|
||||
@@ -162,8 +165,8 @@ VIDEO_NOON010PC30
|
||||
VIDEO_S5K6AA
|
||||
# needs dev_err_ratelimited
|
||||
MEDIA_TUNER_E4000
|
||||
# regmap_init has different arguments
|
||||
DVB_AF9013
|
||||
# needs regmap_init with 4 arguments
|
||||
DVB_USB_AF9015
|
||||
|
||||
[3.4.0]
|
||||
# needs devm_regulator_bulk_get
|
||||
@@ -192,6 +195,8 @@ MEDIA_TUNER_IT913X
|
||||
DVB_AF9033
|
||||
DVB_MN88472
|
||||
DVB_MN88473
|
||||
# does not compile for older kernels
|
||||
CXD2880_SPI_DRV
|
||||
|
||||
[3.3.0]
|
||||
# Needs struct dma_interleaved_template in dmaengine.h
|
||||
@@ -201,10 +206,8 @@ VIDEO_TVP514X
|
||||
VIDEO_TVP7002
|
||||
# requires new interface for alloc_ordered_workqueue
|
||||
VIDEO_VIVID
|
||||
# requires functions from clk.h
|
||||
VIDEO_OV5647
|
||||
# does not compile for older kernels
|
||||
CXD2880_SPI_DRV
|
||||
# needs SPI driver framework
|
||||
VIDEO_GS1662
|
||||
|
||||
[3.2.0]
|
||||
# due to the rename at include/linux from "pm_qos_params.h" to "pm_qos.h"
|
||||
@@ -233,6 +236,8 @@ VIDEO_VIA_CAMERA
|
||||
# needs div64_s64
|
||||
MEDIA_TUNER_QM1D1C0042
|
||||
DVB_TC90522
|
||||
# requires linux/atomic.h
|
||||
DVB_CXD2880
|
||||
|
||||
[2.6.36]
|
||||
|
||||
|
Reference in New Issue
Block a user