Remove backport patches for kernels < 4.19

This commit is contained in:
CrazyCat
2025-02-19 18:30:51 +02:00
parent 3e48822225
commit edf21c7cb6
15 changed files with 0 additions and 532 deletions

View File

@@ -146,30 +146,3 @@ add v5.0_gpio.patch
[4.20.1023]
add v4.20_access_ok.patch
[4.18.1023]
add v4.18_fwnode_args_args.patch
add v4.18_ccs_bitops.patch
add v4.18_vb2_map_atomic.patch
add v4.18_ida_simple.patch
[4.17.1023]
add v4.17_i2c_check_num_msgs.patch
[4.16.1023]
add v4.16_poll_requested_events.patch
[4.15.1023]
add v4.15_pmdown_time.patch
add v4.15_async.patch
[4.14.1023]
add v4.14_saa7146_timer_cast.patch
add v4.14_module_param_call.patch
add v4.14_fwnode_handle_get.patch
delete v4.13_fwnode_graph_get_port_parent.patch
[4.13.1023]
add v4.13_remove_nospec_h.patch
add v4.13_drmP.patch
add v4.13_fwnode_graph_get_port_parent.patch

View File

@@ -1,13 +0,0 @@
diff --git a/drivers/media/cec/core/cec-adap.c b/drivers/media/cec/core/cec-adap.c
index 451c61bde4d4..33ba5cdde7e8 100644
--- a/drivers/media/cec/core/cec-adap.c
+++ b/drivers/media/cec/core/cec-adap.c
@@ -17,7 +17,7 @@
#include <linux/types.h>
#include <drm/drm_connector.h>
-#include <drm/drm_device.h>
+#include <drm/drmP.h>
#include <drm/drm_edid.h>
#include <drm/drm_file.h>

View File

@@ -1,13 +0,0 @@
diff --git a/drivers/media/v4l2-core/v4l2-subdev.c b/drivers/media/v4l2-core/v4l2-subdev.c
index 6b989fe5a0a9..1c1c122a8089 100644
--- a/drivers/media/v4l2-core/v4l2-subdev.c
+++ b/drivers/media/v4l2-core/v4l2-subdev.c
@@ -761,7 +761,7 @@ int v4l2_subdev_get_fwnode_pad_1_to_1(struct media_entity *entity,
sd = media_entity_to_v4l2_subdev(entity);
- fwnode = fwnode_graph_get_port_parent(endpoint->local_fwnode);
+ fwnode = fwnode_graph_get_port_parent((struct fwnode_handle *)endpoint->local_fwnode);
fwnode_handle_put(fwnode);
if (dev_fwnode(sd->dev) == fwnode)

View File

@@ -1,48 +0,0 @@
diff --git a/drivers/media/dvb-core/dvb_ca_en50221.c b/drivers/media/dvb-core/dvb_ca_en50221.c
index 15a08d8c69ef..b5fc088868c8 100644
--- a/drivers/media/dvb-core/dvb_ca_en50221.c
+++ b/drivers/media/dvb-core/dvb_ca_en50221.c
@@ -20,7 +20,6 @@
#include <linux/slab.h>
#include <linux/list.h>
#include <linux/module.h>
-#include <linux/nospec.h>
#include <linux/vmalloc.h>
#include <linux/delay.h>
#include <linux/spinlock.h>
diff --git a/drivers/media/dvb-core/dvb_frontend.c b/drivers/media/dvb-core/dvb_frontend.c
index 48e735cdbe6b..347d00ef357d 100644
--- a/drivers/media/dvb-core/dvb_frontend.c
+++ b/drivers/media/dvb-core/dvb_frontend.c
@@ -23,7 +23,6 @@
#include <linux/poll.h>
#include <linux/semaphore.h>
#include <linux/module.h>
-#include <linux/nospec.h>
#include <linux/list.h>
#include <linux/freezer.h>
#include <linux/jiffies.h>
diff --git a/drivers/media/dvb-core/dvb_net.c b/drivers/media/dvb-core/dvb_net.c
index 8a2febf33ce2..09393b8ed3b1 100644
--- a/drivers/media/dvb-core/dvb_net.c
+++ b/drivers/media/dvb-core/dvb_net.c
@@ -45,7 +45,6 @@
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/netdevice.h>
-#include <linux/nospec.h>
#include <linux/etherdevice.h>
#include <linux/dvb/net.h>
#include <linux/uio.h>
diff --git a/drivers/media/radio/wl128x/fmdrv_common.c b/drivers/media/radio/wl128x/fmdrv_common.c
index 8a316de70e6c..b3aa653d6899 100644
--- a/drivers/media/radio/wl128x/fmdrv_common.c
+++ b/drivers/media/radio/wl128x/fmdrv_common.c
@@ -22,7 +22,6 @@
#include <linux/delay.h>
#include <linux/firmware.h>
#include <linux/module.h>
-#include <linux/nospec.h>
#include <linux/jiffies.h>
#include "fmdrv.h"

View File

@@ -1,14 +0,0 @@
diff --git a/drivers/media/v4l2-core/v4l2-async.c b/drivers/media/v4l2-core/v4l2-async.c
index 8bde33c21ce4..aca8b5b239d0 100644
--- a/drivers/media/v4l2-core/v4l2-async.c
+++ b/drivers/media/v4l2-core/v4l2-async.c
@@ -593,7 +593,8 @@ v4l2_async_notifier_add_fwnode_subdev(struct v4l2_async_notifier *notifier,
return ERR_PTR(-ENOMEM);
asd->match_type = V4L2_ASYNC_MATCH_FWNODE;
- asd->match.fwnode = fwnode_handle_get(fwnode);
+ fwnode_handle_get(fwnode);
+ asd->match.fwnode = fwnode;
ret = v4l2_async_notifier_add_subdev(notifier, asd);
if (ret) {

View File

@@ -1,41 +0,0 @@
diff --git a/drivers/media/pci/tw686x/tw686x-core.c b/drivers/media/pci/tw686x/tw686x-core.c
index 7fb3f07bf022..c74c23cf8ced 100644
--- a/drivers/media/pci/tw686x/tw686x-core.c
+++ b/drivers/media/pci/tw686x/tw686x-core.c
@@ -72,12 +72,12 @@ static const char *dma_mode_name(unsigned int mode)
}
}
-static int tw686x_dma_mode_get(char *buffer, const struct kernel_param *kp)
+static int tw686x_dma_mode_get(char *buffer, struct kernel_param *kp)
{
return sprintf(buffer, "%s", dma_mode_name(dma_mode));
}
-static int tw686x_dma_mode_set(const char *val, const struct kernel_param *kp)
+static int tw686x_dma_mode_set(const char *val, struct kernel_param *kp)
{
if (!strcasecmp(val, dma_mode_name(TW686X_DMA_MODE_MEMCPY)))
dma_mode = TW686X_DMA_MODE_MEMCPY;
diff --git a/drivers/media/usb/uvc/uvc_driver.c b/drivers/media/usb/uvc/uvc_driver.c
index 07e427d36516..113130b6b2d6 100644
--- a/drivers/media/usb/uvc/uvc_driver.c
+++ b/drivers/media/usb/uvc/uvc_driver.c
@@ -2235,7 +2235,7 @@ static int uvc_reset_resume(struct usb_interface *intf)
* Module parameters
*/
-static int uvc_clock_param_get(char *buffer, const struct kernel_param *kp)
+static int uvc_clock_param_get(char *buffer, struct kernel_param *kp)
{
if (uvc_clock_param == CLOCK_MONOTONIC)
return sprintf(buffer, "CLOCK_MONOTONIC");
@@ -2243,7 +2243,7 @@ static int uvc_clock_param_get(char *buffer, const struct kernel_param *kp)
return sprintf(buffer, "CLOCK_REALTIME");
}
-static int uvc_clock_param_set(const char *val, const struct kernel_param *kp)
+static int uvc_clock_param_set(const char *val, struct kernel_param *kp)
{
if (strncasecmp(val, "clock_", strlen("clock_")) == 0)
val += strlen("clock_");

View File

@@ -1,13 +0,0 @@
diff --git a/drivers/media/common/saa7146/saa7146_vbi.c b/drivers/media/common/saa7146/saa7146_vbi.c
index bb7d81f7eba6..cccfa210443d 100644
--- a/drivers/media/common/saa7146/saa7146_vbi.c
+++ b/drivers/media/common/saa7146/saa7146_vbi.c
@@ -358,7 +358,7 @@ static int vbi_begin(struct saa7146_dev *dev)
saa7146_write(dev, PCI_BT_V1, arbtr_ctrl);
saa7146_write(dev, MC2, (MASK_04|MASK_20));
- vv->vbi_read_timeout.function = vbi_read_timeout;
+ vv->vbi_read_timeout.function = (TIMER_FUNC_TYPE)vbi_read_timeout;
/* initialize the brs */
if ( 0 != (SAA7146_USE_PORT_B_FOR_VBI & dev->ext_vv_data->flags)) {

View File

@@ -1,38 +0,0 @@
diff --git a/drivers/media/v4l2-core/v4l2-async.c b/drivers/media/v4l2-core/v4l2-async.c
index cd9e78c63791..0b1b001eec31 100644
--- a/drivers/media/v4l2-core/v4l2-async.c
+++ b/drivers/media/v4l2-core/v4l2-async.c
@@ -799,6 +799,7 @@ void v4l2_async_unregister_subdev(struct v4l2_subdev *sd)
}
EXPORT_SYMBOL(v4l2_async_unregister_subdev);
+#if 0
static void print_waiting_subdev(struct seq_file *s,
struct v4l2_async_subdev *asd)
{
@@ -855,20 +856,25 @@ static int pending_subdevs_show(struct seq_file *s, void *data)
DEFINE_SHOW_ATTRIBUTE(pending_subdevs);
static struct dentry *v4l2_async_debugfs_dir;
+#endif
static int __init v4l2_async_init(void)
{
+#if 0
v4l2_async_debugfs_dir = debugfs_create_dir("v4l2-async", NULL);
debugfs_create_file("pending_async_subdevices", 0444,
v4l2_async_debugfs_dir, NULL,
&pending_subdevs_fops);
+#endif
return 0;
}
static void __exit v4l2_async_exit(void)
{
+#if 0
debugfs_remove_recursive(v4l2_async_debugfs_dir);
+#endif
}
subsys_initcall(v4l2_async_init);

View File

@@ -1,13 +0,0 @@
diff --git a/drivers/media/i2c/tda1997x.c b/drivers/media/i2c/tda1997x.c
index 039a92c..f244647 100644
--- a/drivers/media/i2c/tda1997x.c
+++ b/drivers/media/i2c/tda1997x.c
@@ -2492,7 +2492,7 @@ static struct snd_soc_component_driver tda1997x_codec_driver = {
.probe = tda1997x_codec_probe,
.remove = tda1997x_codec_remove,
.idle_bias_on = 1,
- .use_pmdown_time = 1,
+ .pmdown_time = 1,
.endianness = 1,
.non_legacy_dai_naming = 1,
};

View File

@@ -1,13 +0,0 @@
diff --git a/drivers/media/v4l2-core/v4l2-dev.c b/drivers/media/v4l2-core/v4l2-dev.c
index 7d0edf3530be..fa846dd0434c 100644
--- a/drivers/media/v4l2-core/v4l2-dev.c
+++ b/drivers/media/v4l2-core/v4l2-dev.c
@@ -352,7 +352,7 @@ static __poll_t v4l2_poll(struct file *filp, struct poll_table_struct *poll)
if (vdev->dev_debug & V4L2_DEV_DEBUG_POLL)
dprintk("%s: poll: %08x %08x\n",
video_device_node_name(vdev), res,
- poll_requested_events(poll));
+ (u32)poll_requested_events(poll));
return res;
}

View File

@@ -1,86 +0,0 @@
diff --git b/drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c a/drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c
index 5f1613aec93c..b13e319d24b7 100644
--- b/drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c
+++ a/drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c
@@ -214,6 +214,11 @@ static int netup_i2c_xfer(struct i2c_adapter *adap,
struct netup_i2c *i2c = i2c_get_adapdata(adap);
u16 reg;
+ if (num <= 0) {
+ dev_dbg(i2c->adap.dev.parent,
+ "%s(): num == %d\n", __func__, num);
+ return -EINVAL;
+ }
spin_lock_irqsave(&i2c->lock, flags);
if (i2c->state != STATE_DONE) {
dev_dbg(i2c->adap.dev.parent,
diff --git b/drivers/media/radio/si4713/radio-usb-si4713.c a/drivers/media/radio/si4713/radio-usb-si4713.c
index 1ebbf0217142..05c66701a899 100644
--- b/drivers/media/radio/si4713/radio-usb-si4713.c
+++ a/drivers/media/radio/si4713/radio-usb-si4713.c
@@ -370,6 +370,9 @@ static int si4713_transfer(struct i2c_adapter *i2c_adapter,
int retval = -EINVAL;
int i;
+ if (num <= 0)
+ return 0;
+
for (i = 0; i < num; i++) {
if (msgs[i].flags & I2C_M_RD)
retval = si4713_i2c_read(radio, msgs[i].buf, msgs[i].len);
diff --git b/drivers/media/usb/cx231xx/cx231xx-i2c.c a/drivers/media/usb/cx231xx/cx231xx-i2c.c
index 15a91169e749..6e1bef2a45bb 100644
--- b/drivers/media/usb/cx231xx/cx231xx-i2c.c
+++ a/drivers/media/usb/cx231xx/cx231xx-i2c.c
@@ -376,6 +376,8 @@ static int cx231xx_i2c_xfer(struct i2c_adapter *i2c_adap,
struct cx231xx *dev = bus->dev;
int addr, rc, i, byte;
+ if (num <= 0)
+ return 0;
mutex_lock(&dev->i2c_lock);
for (i = 0; i < num; i++) {
diff --git b/drivers/media/usb/dvb-usb/m920x.c a/drivers/media/usb/dvb-usb/m920x.c
index 22554d9abd43..51b026fa6bfb 100644
--- b/drivers/media/usb/dvb-usb/m920x.c
+++ a/drivers/media/usb/dvb-usb/m920x.c
@@ -255,6 +255,9 @@ static int m920x_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msg[], int nu
int i, j;
int ret = 0;
+ if (!num)
+ return -EINVAL;
+
if (mutex_lock_interruptible(&d->i2c_mutex) < 0)
return -EAGAIN;
diff --git b/drivers/media/usb/em28xx/em28xx-i2c.c a/drivers/media/usb/em28xx/em28xx-i2c.c
index e19d6342e0d0..6458682bc6e2 100644
--- b/drivers/media/usb/em28xx/em28xx-i2c.c
+++ a/drivers/media/usb/em28xx/em28xx-i2c.c
@@ -559,6 +559,10 @@ static int em28xx_i2c_xfer(struct i2c_adapter *i2c_adap,
dev->cur_i2c_bus = bus;
}
+ if (num <= 0) {
+ rt_mutex_unlock(&dev->i2c_bus_lock);
+ return 0;
+ }
for (i = 0; i < num; i++) {
addr = msgs[i].addr << 1;
if (!msgs[i].len) {
diff --git b/drivers/media/usb/hdpvr/hdpvr-i2c.c a/drivers/media/usb/hdpvr/hdpvr-i2c.c
index 5a3cb614a211..c71ddefd2e58 100644
--- b/drivers/media/usb/hdpvr/hdpvr-i2c.c
+++ a/drivers/media/usb/hdpvr/hdpvr-i2c.c
@@ -117,6 +117,9 @@ static int hdpvr_transfer(struct i2c_adapter *i2c_adapter, struct i2c_msg *msgs,
struct hdpvr_device *dev = i2c_get_adapdata(i2c_adapter);
int retval = 0, addr;
+ if (num <= 0)
+ return 0;
+
mutex_lock(&dev->i2c_mutex);
addr = msgs[0].addr << 1;

View File

@@ -1,78 +0,0 @@
diff --git a/drivers/media/i2c/ccs-pll.h b/drivers/media/i2c/ccs-pll.h
index b97d7ff50ea5..1aa03c99ca6c 100644
--- a/drivers/media/i2c/ccs-pll.h
+++ b/drivers/media/i2c/ccs-pll.h
@@ -12,8 +12,6 @@
#ifndef CCS_PLL_H
#define CCS_PLL_H
-#include <linux/bits.h>
-
/* CSI-2 or CCP-2 */
#define CCS_PLL_BUS_TYPE_CSI2_DPHY 0x00
#define CCS_PLL_BUS_TYPE_CSI2_CPHY 0x01
diff --git a/drivers/media/i2c/ccs/ccs-limits.h b/drivers/media/i2c/ccs/ccs-limits.h
index 1efa43c23a2e..46c1464e9bf1 100644
--- a/drivers/media/i2c/ccs/ccs-limits.h
+++ b/drivers/media/i2c/ccs/ccs-limits.h
@@ -4,7 +4,7 @@
#ifndef __CCS_LIMITS_H__
#define __CCS_LIMITS_H__
-#include <linux/bits.h>
+#include <linux/bitops.h>
#include <linux/types.h>
struct ccs_limit {
diff --git a/drivers/media/i2c/ccs/ccs-regs.h b/drivers/media/i2c/ccs/ccs-regs.h
index 4b3e5df2121f..4323c23f16fe 100644
--- a/drivers/media/i2c/ccs/ccs-regs.h
+++ b/drivers/media/i2c/ccs/ccs-regs.h
@@ -4,7 +4,7 @@
#ifndef __CCS_REGS_H__
#define __CCS_REGS_H__
-#include <linux/bits.h>
+#include <linux/bitops.h>
#define CCS_FL_BASE 16
#define CCS_FL_16BIT BIT(CCS_FL_BASE)
diff --git a/drivers/media/dvb-frontends/cxd2880/cxd2880_common.h b/drivers/media/dvb-frontends/cxd2880/cxd2880_common.h
index 9dc15a5a9683..b2b6ff5d5e88 100644
--- a/drivers/media/dvb-frontends/cxd2880/cxd2880_common.h
+++ b/drivers/media/dvb-frontends/cxd2880/cxd2880_common.h
@@ -12,7 +12,7 @@
#include <linux/types.h>
#include <linux/errno.h>
#include <linux/delay.h>
-#include <linux/bits.h>
+#include <linux/bitops.h>
#include <linux/string.h>
int cxd2880_convert2s_complement(u32 value, u32 bitlen);
diff --git a/drivers/media/usb/uvc/uvc_driver.c b/drivers/media/usb/uvc/uvc_driver.c
index 11f3d71..1409af2 100644
--- a/drivers/media/usb/uvc/uvc_driver.c
+++ b/drivers/media/usb/uvc/uvc_driver.c
@@ -7,7 +7,7 @@
*/
#include <linux/atomic.h>
-#include <linux/bits.h>
+#include <linux/bitops.h>
#include <linux/gpio/consumer.h>
#include <linux/kernel.h>
#include <linux/list.h>
diff --git a/drivers/media/usb/uvc/uvc_v4l2.c b/drivers/media/usb/uvc/uvc_v4l2.c
index 35453f8..d6eefb1 100644
--- a/drivers/media/usb/uvc/uvc_v4l2.c
+++ b/drivers/media/usb/uvc/uvc_v4l2.c
@@ -6,7 +6,7 @@
* Laurent Pinchart (laurent.pinchart@ideasonboard.com)
*/
-#include <linux/bits.h>
+#include <linux/bitops.h>
#include <linux/compat.h>
#include <linux/kernel.h>
#include <linux/list.h>

View File

@@ -1,13 +0,0 @@
diff --git a/drivers/media/v4l2-core/v4l2-fwnode.c b/drivers/media/v4l2-core/v4l2-fwnode.c
index 169bdbb..6105191 100644
--- a/drivers/media/v4l2-core/v4l2-fwnode.c
+++ b/drivers/media/v4l2-core/v4l2-fwnode.c
@@ -743,7 +743,7 @@ static struct fwnode_handle *v4l2_fwnode_reference_get_int_prop(
const char * const *props, unsigned int nprops)
{
struct fwnode_reference_args fwnode_args;
- u64 *args = fwnode_args.args;
+ unsigned int *args = fwnode_args.args;
struct fwnode_handle *child;
int ret;

View File

@@ -1,62 +0,0 @@
diff --git a/drivers/media/rc/lirc_dev.c b/drivers/media/rc/lirc_dev.c
index 25ab61d..765375b 100644
--- a/drivers/media/rc/lirc_dev.c
+++ b/drivers/media/rc/lirc_dev.c
@@ -715,7 +715,7 @@ int lirc_register(struct rc_dev *dev)
const char *rx_type, *tx_type;
int err, minor;
- minor = ida_alloc_max(&lirc_ida, RC_DEV_MAX - 1, GFP_KERNEL);
+ minor = ida_simple_get(&lirc_ida, 0, RC_DEV_MAX, GFP_KERNEL);
if (minor < 0)
return minor;
@@ -760,7 +760,7 @@ int lirc_register(struct rc_dev *dev)
return 0;
out_ida:
- ida_free(&lirc_ida, minor);
+ ida_simple_remove(&lirc_ida, minor);
return err;
}
@@ -778,7 +778,7 @@ void lirc_unregister(struct rc_dev *dev)
spin_unlock_irqrestore(&dev->lirc_fh_lock, flags);
cdev_device_del(&dev->lirc_cdev, &dev->lirc_dev);
- ida_free(&lirc_ida, MINOR(dev->lirc_dev.devt));
+ ida_simple_remove(&lirc_ida, MINOR(dev->lirc_dev.devt));
}
int __init lirc_dev_init(void)
diff --git a/drivers/media/rc/rc-main.c b/drivers/media/rc/rc-main.c
index 527d932..c4d36b0 100644
--- a/drivers/media/rc/rc-main.c
+++ b/drivers/media/rc/rc-main.c
@@ -1898,7 +1898,7 @@ int rc_register_device(struct rc_dev *dev)
if (!dev)
return -EINVAL;
- minor = ida_alloc_max(&rc_ida, RC_DEV_MAX - 1, GFP_KERNEL);
+ minor = ida_simple_get(&rc_ida, 0, RC_DEV_MAX, GFP_KERNEL);
if (minor < 0)
return minor;
@@ -1981,7 +1981,7 @@ int rc_register_device(struct rc_dev *dev)
out_raw:
ir_raw_event_free(dev);
out_minor:
- ida_free(&rc_ida, minor);
+ ida_simple_remove(&rc_ida, minor);
return rc;
}
EXPORT_SYMBOL_GPL(rc_register_device);
@@ -2041,7 +2041,7 @@ void rc_unregister_device(struct rc_dev *dev)
device_del(&dev->dev);
- ida_free(&rc_ida, dev->minor);
+ ida_simple_remove(&rc_ida, dev->minor);
if (!dev->managed_alloc)
rc_free_device(dev);

View File

@@ -1,60 +0,0 @@
diff -u linux-4.19.149/drivers/media/common/videobuf2/videobuf2-dma-contig.c linux-4.18.20/drivers/media/common/videobuf2/videobuf2-dma-contig.c
--- linux-4.19.149/drivers/media/common/videobuf2/videobuf2-dma-contig.c 2020-10-01 13:14:54.000000000 +0200
+++ linux-4.18.20/drivers/media/common/videobuf2/videobuf2-dma-contig.c 2018-11-21 09:22:14.000000000 +0100
@@ -222,7 +222,7 @@
enum dma_data_direction dma_dir;
};
-static int vb2_dc_dmabuf_ops_attach(struct dma_buf *dbuf,
+static int vb2_dc_dmabuf_ops_attach(struct dma_buf *dbuf, struct device *dev,
struct dma_buf_attachment *dbuf_attach)
{
struct vb2_dc_attachment *attach;
@@ -358,6 +358,7 @@
.map_dma_buf = vb2_dc_dmabuf_ops_map,
.unmap_dma_buf = vb2_dc_dmabuf_ops_unmap,
.map = vb2_dc_dmabuf_ops_kmap,
+ .map_atomic = vb2_dc_dmabuf_ops_kmap,
.vmap = vb2_dc_dmabuf_ops_vmap,
.mmap = vb2_dc_dmabuf_ops_mmap,
.release = vb2_dc_dmabuf_ops_release,
diff -u linux-4.19.149/drivers/media/common/videobuf2/videobuf2-dma-sg.c linux-4.18.20/drivers/media/common/videobuf2/videobuf2-dma-sg.c
--- linux-4.19.149/drivers/media/common/videobuf2/videobuf2-dma-sg.c 2020-10-01 13:14:54.000000000 +0200
+++ linux-4.18.20/drivers/media/common/videobuf2/videobuf2-dma-sg.c 2018-11-21 09:22:14.000000000 +0100
@@ -371,7 +371,7 @@
enum dma_data_direction dma_dir;
};
-static int vb2_dma_sg_dmabuf_ops_attach(struct dma_buf *dbuf,
+static int vb2_dma_sg_dmabuf_ops_attach(struct dma_buf *dbuf, struct device *dev,
struct dma_buf_attachment *dbuf_attach)
{
struct vb2_dma_sg_attachment *attach;
@@ -507,6 +507,7 @@
.map_dma_buf = vb2_dma_sg_dmabuf_ops_map,
.unmap_dma_buf = vb2_dma_sg_dmabuf_ops_unmap,
.map = vb2_dma_sg_dmabuf_ops_kmap,
+ .map_atomic = vb2_dma_sg_dmabuf_ops_kmap,
.vmap = vb2_dma_sg_dmabuf_ops_vmap,
.mmap = vb2_dma_sg_dmabuf_ops_mmap,
.release = vb2_dma_sg_dmabuf_ops_release,
diff -u linux-4.19.149/drivers/media/common/videobuf2/videobuf2-vmalloc.c linux-4.18.20/drivers/media/common/videobuf2/videobuf2-vmalloc.c
--- linux-4.19.149/drivers/media/common/videobuf2/videobuf2-vmalloc.c 2020-10-01 13:14:54.000000000 +0200
+++ linux-4.18.20/drivers/media/common/videobuf2/videobuf2-vmalloc.c 2018-11-21 09:22:14.000000000 +0100
@@ -209,7 +209,7 @@
enum dma_data_direction dma_dir;
};
-static int vb2_vmalloc_dmabuf_ops_attach(struct dma_buf *dbuf,
+static int vb2_vmalloc_dmabuf_ops_attach(struct dma_buf *dbuf, struct device *dev,
struct dma_buf_attachment *dbuf_attach)
{
struct vb2_vmalloc_attachment *attach;
@@ -346,6 +346,7 @@
.map_dma_buf = vb2_vmalloc_dmabuf_ops_map,
.unmap_dma_buf = vb2_vmalloc_dmabuf_ops_unmap,
.map = vb2_vmalloc_dmabuf_ops_kmap,
+ .map_atomic = vb2_vmalloc_dmabuf_ops_kmap,
.vmap = vb2_vmalloc_dmabuf_ops_vmap,
.mmap = vb2_vmalloc_dmabuf_ops_mmap,
.release = vb2_vmalloc_dmabuf_ops_release,