mirror of
https://github.com/tbsdtv/media_build.git
synced 2025-07-23 04:13:02 +02:00
Update backport patches for 6.2
This commit is contained in:
@@ -28,6 +28,11 @@ add drx39xxj.patch
|
||||
add ccs.patch
|
||||
add rc-cec.patch
|
||||
|
||||
[6.2.1023]
|
||||
add v6.2_class.patch
|
||||
add v6.2_remove.patch
|
||||
add v6.2_v4l2-core.patch
|
||||
|
||||
[6.1.1023]
|
||||
add v6.1_class.patch
|
||||
add v6.1_i2c_probe.patch
|
||||
|
13
backports/v6.2_class.patch
Normal file
13
backports/v6.2_class.patch
Normal file
@@ -0,0 +1,13 @@
|
||||
diff --git a/drivers/media/rc/rc-main.c b/drivers/media/rc/rc-main.c
|
||||
index 6bdad6341844..527d9324742b 100644
|
||||
--- a/drivers/media/rc/rc-main.c
|
||||
+++ b/drivers/media/rc/rc-main.c
|
||||
@@ -1614,7 +1614,7 @@ static void rc_dev_release(struct device *device)
|
||||
kfree(dev);
|
||||
}
|
||||
|
||||
-static int rc_dev_uevent(const struct device *device, struct kobj_uevent_env *env)
|
||||
+static int rc_dev_uevent(struct device *device, struct kobj_uevent_env *env)
|
||||
{
|
||||
struct rc_dev *dev = to_rc_dev(device);
|
||||
int ret = 0;
|
546
backports/v6.2_remove.patch
Normal file
546
backports/v6.2_remove.patch
Normal file
@@ -0,0 +1,546 @@
|
||||
diff --git a/drivers/media/dvb-frontends/rtl2832_sdr.c b/drivers/media/dvb-frontends/rtl2832_sdr.c
|
||||
index 02c619e51641..8a1d06a2d19a 100644
|
||||
--- a/drivers/media/dvb-frontends/rtl2832_sdr.c
|
||||
+++ b/drivers/media/dvb-frontends/rtl2832_sdr.c
|
||||
@@ -1463,7 +1463,7 @@ static int rtl2832_sdr_probe(struct platform_device *pdev)
|
||||
return ret;
|
||||
}
|
||||
|
||||
-static void rtl2832_sdr_remove(struct platform_device *pdev)
|
||||
+static int rtl2832_sdr_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct rtl2832_sdr_dev *dev = platform_get_drvdata(pdev);
|
||||
|
||||
@@ -1479,6 +1479,7 @@ static void rtl2832_sdr_remove(struct platform_device *pdev)
|
||||
mutex_unlock(&dev->vb_queue_lock);
|
||||
v4l2_device_put(&dev->v4l2_dev);
|
||||
module_put(pdev->dev.parent->driver->owner);
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
static struct platform_driver rtl2832_sdr_driver = {
|
||||
@@ -1486,7 +1487,7 @@ static struct platform_driver rtl2832_sdr_driver = {
|
||||
.name = "rtl2832_sdr",
|
||||
},
|
||||
.probe = rtl2832_sdr_probe,
|
||||
- .remove_new = rtl2832_sdr_remove,
|
||||
+ .remove = rtl2832_sdr_remove,
|
||||
};
|
||||
module_platform_driver(rtl2832_sdr_driver);
|
||||
|
||||
diff --git a/drivers/media/dvb-frontends/zd1301_demod.c b/drivers/media/dvb-frontends/zd1301_demod.c
|
||||
index 17f6e373c13d..a61778873eb0 100644
|
||||
--- a/drivers/media/dvb-frontends/zd1301_demod.c
|
||||
+++ b/drivers/media/dvb-frontends/zd1301_demod.c
|
||||
@@ -515,7 +515,7 @@ static int zd1301_demod_probe(struct platform_device *pdev)
|
||||
return ret;
|
||||
}
|
||||
|
||||
-static void zd1301_demod_remove(struct platform_device *pdev)
|
||||
+static int zd1301_demod_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct zd1301_demod_dev *dev = platform_get_drvdata(pdev);
|
||||
|
||||
@@ -523,6 +523,7 @@ static void zd1301_demod_remove(struct platform_device *pdev)
|
||||
|
||||
i2c_del_adapter(&dev->adapter);
|
||||
kfree(dev);
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
static struct platform_driver zd1301_demod_driver = {
|
||||
@@ -531,7 +532,7 @@ static struct platform_driver zd1301_demod_driver = {
|
||||
.suppress_bind_attrs = true,
|
||||
},
|
||||
.probe = zd1301_demod_probe,
|
||||
- .remove_new = zd1301_demod_remove,
|
||||
+ .remove = zd1301_demod_remove,
|
||||
};
|
||||
module_platform_driver(zd1301_demod_driver);
|
||||
|
||||
diff --git a/drivers/media/tuners/it913x.c b/drivers/media/tuners/it913x.c
|
||||
index 4d5b1c878028..079bf12dfd16 100644
|
||||
--- a/drivers/media/tuners/it913x.c
|
||||
+++ b/drivers/media/tuners/it913x.c
|
||||
@@ -419,7 +419,7 @@ static int it913x_probe(struct platform_device *pdev)
|
||||
return ret;
|
||||
}
|
||||
|
||||
-static void it913x_remove(struct platform_device *pdev)
|
||||
+static int it913x_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct it913x_dev *dev = platform_get_drvdata(pdev);
|
||||
struct dvb_frontend *fe = dev->fe;
|
||||
@@ -429,6 +429,7 @@ static void it913x_remove(struct platform_device *pdev)
|
||||
memset(&fe->ops.tuner_ops, 0, sizeof(struct dvb_tuner_ops));
|
||||
fe->tuner_priv = NULL;
|
||||
kfree(dev);
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
static const struct platform_device_id it913x_id_table[] = {
|
||||
@@ -444,7 +445,7 @@ static struct platform_driver it913x_driver = {
|
||||
.suppress_bind_attrs = true,
|
||||
},
|
||||
.probe = it913x_probe,
|
||||
- .remove_new = it913x_remove,
|
||||
+ .remove = it913x_remove,
|
||||
.id_table = it913x_id_table,
|
||||
};
|
||||
|
||||
diff --git a/drivers/media/cec/platform/cec-gpio/cec-gpio.c b/drivers/media/cec/platform/cec-gpio/cec-gpio.c
|
||||
index ff34490fd869..9eccd5eeffef 100644
|
||||
--- a/drivers/media/cec/platform/cec-gpio/cec-gpio.c
|
||||
+++ b/drivers/media/cec/platform/cec-gpio/cec-gpio.c
|
||||
@@ -269,12 +269,13 @@ static int cec_gpio_probe(struct platform_device *pdev)
|
||||
return ret;
|
||||
}
|
||||
|
||||
-static void cec_gpio_remove(struct platform_device *pdev)
|
||||
+static int cec_gpio_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct cec_gpio *cec = platform_get_drvdata(pdev);
|
||||
|
||||
cec_notifier_cec_adap_unregister(cec->notifier, cec->adap);
|
||||
cec_unregister_adapter(cec->adap);
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
static const struct of_device_id cec_gpio_match[] = {
|
||||
@@ -287,7 +288,7 @@ MODULE_DEVICE_TABLE(of, cec_gpio_match);
|
||||
|
||||
static struct platform_driver cec_gpio_pdrv = {
|
||||
.probe = cec_gpio_probe,
|
||||
- .remove_new = cec_gpio_remove,
|
||||
+ .remove = cec_gpio_remove,
|
||||
.driver = {
|
||||
.name = "cec-gpio",
|
||||
.of_match_table = cec_gpio_match,
|
||||
diff --git a/drivers/media/cec/platform/cros-ec/cros-ec-cec.c b/drivers/media/cec/platform/cros-ec/cros-ec-cec.c
|
||||
index c17faf002877..556a66b58bd2 100644
|
||||
--- a/drivers/media/cec/platform/cros-ec/cros-ec-cec.c
|
||||
+++ b/drivers/media/cec/platform/cros-ec/cros-ec-cec.c
|
||||
@@ -332,7 +332,7 @@ static int cros_ec_cec_probe(struct platform_device *pdev)
|
||||
return ret;
|
||||
}
|
||||
|
||||
-static void cros_ec_cec_remove(struct platform_device *pdev)
|
||||
+static int cros_ec_cec_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct cros_ec_cec *cros_ec_cec = platform_get_drvdata(pdev);
|
||||
struct device *dev = &pdev->dev;
|
||||
@@ -352,11 +352,12 @@ static void cros_ec_cec_remove(struct platform_device *pdev)
|
||||
cec_notifier_cec_adap_unregister(cros_ec_cec->notify,
|
||||
cros_ec_cec->adap);
|
||||
cec_unregister_adapter(cros_ec_cec->adap);
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
static struct platform_driver cros_ec_cec_driver = {
|
||||
.probe = cros_ec_cec_probe,
|
||||
- .remove_new = cros_ec_cec_remove,
|
||||
+ .remove = cros_ec_cec_remove,
|
||||
.driver = {
|
||||
.name = DRV_NAME,
|
||||
.pm = &cros_ec_cec_pm_ops,
|
||||
diff --git a/drivers/media/cec/platform/seco/seco-cec.c b/drivers/media/cec/platform/seco/seco-cec.c
|
||||
index 5d4c5a2cae09..0586e59ba90f 100644
|
||||
--- a/drivers/media/cec/platform/seco/seco-cec.c
|
||||
+++ b/drivers/media/cec/platform/seco/seco-cec.c
|
||||
@@ -668,7 +668,7 @@ static int secocec_probe(struct platform_device *pdev)
|
||||
return ret;
|
||||
}
|
||||
|
||||
-static void secocec_remove(struct platform_device *pdev)
|
||||
+static int secocec_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct secocec_data *secocec = platform_get_drvdata(pdev);
|
||||
u16 val;
|
||||
@@ -686,6 +686,7 @@ static void secocec_remove(struct platform_device *pdev)
|
||||
release_region(BRA_SMB_BASE_ADDR, 7);
|
||||
|
||||
dev_dbg(&pdev->dev, "CEC device removed\n");
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
@@ -778,7 +779,7 @@ static struct platform_driver secocec_driver = {
|
||||
.pm = SECOCEC_PM_OPS,
|
||||
},
|
||||
.probe = secocec_probe,
|
||||
- .remove_new = secocec_remove,
|
||||
+ .remove = secocec_remove,
|
||||
};
|
||||
|
||||
module_platform_driver(secocec_driver);
|
||||
diff --git a/drivers/media/platform/cadence/cdns-csi2rx.c b/drivers/media/platform/cadence/cdns-csi2rx.c
|
||||
index 9755d1c8ceb9..69cbcf64eb56 100644
|
||||
--- a/drivers/media/platform/cadence/cdns-csi2rx.c
|
||||
+++ b/drivers/media/platform/cadence/cdns-csi2rx.c
|
||||
@@ -473,12 +473,13 @@ static int csi2rx_probe(struct platform_device *pdev)
|
||||
return ret;
|
||||
}
|
||||
|
||||
-static void csi2rx_remove(struct platform_device *pdev)
|
||||
+static int csi2rx_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct csi2rx_priv *csi2rx = platform_get_drvdata(pdev);
|
||||
|
||||
v4l2_async_unregister_subdev(&csi2rx->subdev);
|
||||
kfree(csi2rx);
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
static const struct of_device_id csi2rx_of_table[] = {
|
||||
@@ -489,7 +490,7 @@ MODULE_DEVICE_TABLE(of, csi2rx_of_table);
|
||||
|
||||
static struct platform_driver csi2rx_driver = {
|
||||
.probe = csi2rx_probe,
|
||||
- .remove_new = csi2rx_remove,
|
||||
+ .remove = csi2rx_remove,
|
||||
|
||||
.driver = {
|
||||
.name = "cdns-csi2rx",
|
||||
diff --git a/drivers/media/platform/cadence/cdns-csi2tx.c b/drivers/media/platform/cadence/cdns-csi2tx.c
|
||||
index 1e0400b7803e..459f4ac9423b 100644
|
||||
--- a/drivers/media/platform/cadence/cdns-csi2tx.c
|
||||
+++ b/drivers/media/platform/cadence/cdns-csi2tx.c
|
||||
@@ -635,17 +635,18 @@ static int csi2tx_probe(struct platform_device *pdev)
|
||||
return ret;
|
||||
}
|
||||
|
||||
-static void csi2tx_remove(struct platform_device *pdev)
|
||||
+static int csi2tx_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct csi2tx_priv *csi2tx = platform_get_drvdata(pdev);
|
||||
|
||||
v4l2_async_unregister_subdev(&csi2tx->subdev);
|
||||
kfree(csi2tx);
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
static struct platform_driver csi2tx_driver = {
|
||||
.probe = csi2tx_probe,
|
||||
- .remove_new = csi2tx_remove,
|
||||
+ .remove = csi2tx_remove,
|
||||
|
||||
.driver = {
|
||||
.name = "cdns-csi2tx",
|
||||
diff --git a/drivers/media/platform/m2m-deinterlace.c b/drivers/media/platform/m2m-deinterlace.c
|
||||
index 96b35a5d6174..c865f678e90f 100644
|
||||
--- a/drivers/media/platform/m2m-deinterlace.c
|
||||
+++ b/drivers/media/platform/m2m-deinterlace.c
|
||||
@@ -984,7 +984,7 @@ static int deinterlace_probe(struct platform_device *pdev)
|
||||
return ret;
|
||||
}
|
||||
|
||||
-static void deinterlace_remove(struct platform_device *pdev)
|
||||
+static int deinterlace_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct deinterlace_dev *pcdev = platform_get_drvdata(pdev);
|
||||
|
||||
@@ -993,11 +993,12 @@ static void deinterlace_remove(struct platform_device *pdev)
|
||||
video_unregister_device(&pcdev->vfd);
|
||||
v4l2_device_unregister(&pcdev->v4l2_dev);
|
||||
dma_release_channel(pcdev->dma_chan);
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
static struct platform_driver deinterlace_pdrv = {
|
||||
.probe = deinterlace_probe,
|
||||
- .remove_new = deinterlace_remove,
|
||||
+ .remove = deinterlace_remove,
|
||||
.driver = {
|
||||
.name = MEM2MEM_NAME,
|
||||
},
|
||||
diff --git a/drivers/media/platform/via/via-camera.c b/drivers/media/platform/via/via-camera.c
|
||||
index 450254403fa8..06ac4410f4b0 100644
|
||||
--- a/drivers/media/platform/via/via-camera.c
|
||||
+++ b/drivers/media/platform/via/via-camera.c
|
||||
@@ -1296,7 +1296,7 @@ static int viacam_probe(struct platform_device *pdev)
|
||||
return ret;
|
||||
}
|
||||
|
||||
-static void viacam_remove(struct platform_device *pdev)
|
||||
+static int viacam_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct via_camera *cam = via_cam_info;
|
||||
struct viafb_dev *viadev = pdev->dev.platform_data;
|
||||
@@ -1311,6 +1311,7 @@ static void viacam_remove(struct platform_device *pdev)
|
||||
v4l2_ctrl_handler_free(&cam->ctrl_handler);
|
||||
kfree(cam);
|
||||
via_cam_info = NULL;
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
static struct platform_driver viacam_driver = {
|
||||
@@ -1318,7 +1319,7 @@ static struct platform_driver viacam_driver = {
|
||||
.name = "viafb-camera",
|
||||
},
|
||||
.probe = viacam_probe,
|
||||
- .remove_new = viacam_remove,
|
||||
+ .remove = viacam_remove,
|
||||
};
|
||||
|
||||
module_platform_driver(viacam_driver);
|
||||
diff --git a/drivers/media/radio/radio-si476x.c b/drivers/media/radio/radio-si476x.c
|
||||
index 6061506159f1..1d51c2e8cb45 100644
|
||||
--- a/drivers/media/radio/radio-si476x.c
|
||||
+++ b/drivers/media/radio/radio-si476x.c
|
||||
@@ -1498,7 +1498,7 @@ static int si476x_radio_probe(struct platform_device *pdev)
|
||||
return rval;
|
||||
}
|
||||
|
||||
-static void si476x_radio_remove(struct platform_device *pdev)
|
||||
+static int si476x_radio_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct si476x_radio *radio = platform_get_drvdata(pdev);
|
||||
|
||||
@@ -1506,6 +1506,7 @@ static void si476x_radio_remove(struct platform_device *pdev)
|
||||
video_unregister_device(&radio->videodev);
|
||||
v4l2_device_unregister(&radio->v4l2dev);
|
||||
debugfs_remove_recursive(radio->debugfs);
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
MODULE_ALIAS("platform:si476x-radio");
|
||||
@@ -1515,7 +1516,7 @@ static struct platform_driver si476x_radio_driver = {
|
||||
.name = DRIVER_NAME,
|
||||
},
|
||||
.probe = si476x_radio_probe,
|
||||
- .remove_new = si476x_radio_remove,
|
||||
+ .remove = si476x_radio_remove,
|
||||
};
|
||||
module_platform_driver(si476x_radio_driver);
|
||||
|
||||
diff --git a/drivers/media/radio/radio-wl1273.c b/drivers/media/radio/radio-wl1273.c
|
||||
index e8166eac9efe..7cfd38800d3c 100644
|
||||
--- a/drivers/media/radio/radio-wl1273.c
|
||||
+++ b/drivers/media/radio/radio-wl1273.c
|
||||
@@ -1977,7 +1977,7 @@ static const struct video_device wl1273_viddev_template = {
|
||||
V4L2_CAP_RDS_OUTPUT,
|
||||
};
|
||||
|
||||
-static void wl1273_fm_radio_remove(struct platform_device *pdev)
|
||||
+static int wl1273_fm_radio_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct wl1273_device *radio = platform_get_drvdata(pdev);
|
||||
struct wl1273_core *core = radio->core;
|
||||
@@ -1990,6 +1990,7 @@ static void wl1273_fm_radio_remove(struct platform_device *pdev)
|
||||
v4l2_ctrl_handler_free(&radio->ctrl_handler);
|
||||
video_unregister_device(&radio->videodev);
|
||||
v4l2_device_unregister(&radio->v4l2dev);
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
static int wl1273_fm_radio_probe(struct platform_device *pdev)
|
||||
@@ -2145,7 +2146,7 @@ static int wl1273_fm_radio_probe(struct platform_device *pdev)
|
||||
|
||||
static struct platform_driver wl1273_fm_radio_driver = {
|
||||
.probe = wl1273_fm_radio_probe,
|
||||
- .remove_new = wl1273_fm_radio_remove,
|
||||
+ .remove = wl1273_fm_radio_remove,
|
||||
.driver = {
|
||||
.name = "wl1273_fm_radio",
|
||||
},
|
||||
diff --git a/drivers/media/radio/si4713/radio-platform-si4713.c b/drivers/media/radio/si4713/radio-platform-si4713.c
|
||||
index 9fdaed68a962..ea03b7f235cf 100644
|
||||
--- a/drivers/media/radio/si4713/radio-platform-si4713.c
|
||||
+++ b/drivers/media/radio/si4713/radio-platform-si4713.c
|
||||
@@ -190,7 +190,7 @@ static int radio_si4713_pdriver_probe(struct platform_device *pdev)
|
||||
}
|
||||
|
||||
/* radio_si4713_pdriver_remove - remove the device */
|
||||
-static void radio_si4713_pdriver_remove(struct platform_device *pdev)
|
||||
+static int radio_si4713_pdriver_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct v4l2_device *v4l2_dev = platform_get_drvdata(pdev);
|
||||
struct radio_si4713_device *rsdev;
|
||||
@@ -198,6 +198,7 @@ static void radio_si4713_pdriver_remove(struct platform_device *pdev)
|
||||
rsdev = container_of(v4l2_dev, struct radio_si4713_device, v4l2_dev);
|
||||
video_unregister_device(&rsdev->radio_dev);
|
||||
v4l2_device_unregister(&rsdev->v4l2_dev);
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
static struct platform_driver radio_si4713_pdriver = {
|
||||
@@ -205,7 +206,7 @@ static struct platform_driver radio_si4713_pdriver = {
|
||||
.name = "radio-si4713",
|
||||
},
|
||||
.probe = radio_si4713_pdriver_probe,
|
||||
- .remove_new = radio_si4713_pdriver_remove,
|
||||
+ .remove = radio_si4713_pdriver_remove,
|
||||
};
|
||||
|
||||
module_platform_driver(radio_si4713_pdriver);
|
||||
diff --git a/drivers/media/test-drivers/vicodec/vicodec-core.c b/drivers/media/test-drivers/vicodec/vicodec-core.c
|
||||
index 6f0e20df74e9..518386c79d6c 100644
|
||||
--- a/drivers/media/test-drivers/vicodec/vicodec-core.c
|
||||
+++ b/drivers/media/test-drivers/vicodec/vicodec-core.c
|
||||
@@ -2179,7 +2179,7 @@ static int vicodec_probe(struct platform_device *pdev)
|
||||
return ret;
|
||||
}
|
||||
|
||||
-static void vicodec_remove(struct platform_device *pdev)
|
||||
+static int vicodec_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct vicodec_dev *dev = platform_get_drvdata(pdev);
|
||||
|
||||
@@ -2196,11 +2196,12 @@ static void vicodec_remove(struct platform_device *pdev)
|
||||
video_unregister_device(&dev->stateful_dec.vfd);
|
||||
video_unregister_device(&dev->stateless_dec.vfd);
|
||||
v4l2_device_put(&dev->v4l2_dev);
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
static struct platform_driver vicodec_pdrv = {
|
||||
.probe = vicodec_probe,
|
||||
- .remove_new = vicodec_remove,
|
||||
+ .remove = vicodec_remove,
|
||||
.driver = {
|
||||
.name = VICODEC_NAME,
|
||||
},
|
||||
diff --git a/drivers/media/test-drivers/vidtv/vidtv_bridge.c b/drivers/media/test-drivers/vidtv/vidtv_bridge.c
|
||||
index 8b04e12af286..efa95c9d5d94 100644
|
||||
--- a/drivers/media/test-drivers/vidtv/vidtv_bridge.c
|
||||
+++ b/drivers/media/test-drivers/vidtv/vidtv_bridge.c
|
||||
@@ -528,7 +528,7 @@ static int vidtv_bridge_probe(struct platform_device *pdev)
|
||||
return ret;
|
||||
}
|
||||
|
||||
-static void vidtv_bridge_remove(struct platform_device *pdev)
|
||||
+static int vidtv_bridge_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct vidtv_dvb *dvb;
|
||||
u32 i;
|
||||
@@ -552,6 +552,7 @@ static void vidtv_bridge_remove(struct platform_device *pdev)
|
||||
dvb_dmx_release(&dvb->demux);
|
||||
dvb_unregister_adapter(&dvb->adapter);
|
||||
dev_info(&pdev->dev, "Successfully removed vidtv\n");
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
static void vidtv_bridge_dev_release(struct device *dev)
|
||||
@@ -572,7 +573,7 @@ static struct platform_driver vidtv_bridge_driver = {
|
||||
.name = VIDTV_PDEV_NAME,
|
||||
},
|
||||
.probe = vidtv_bridge_probe,
|
||||
- .remove_new = vidtv_bridge_remove,
|
||||
+ .remove = vidtv_bridge_remove,
|
||||
};
|
||||
|
||||
static void __exit vidtv_bridge_exit(void)
|
||||
diff --git a/drivers/media/test-drivers/vim2m.c b/drivers/media/test-drivers/vim2m.c
|
||||
index 3e3b424b4860..12f5e609bd57 100644
|
||||
--- a/drivers/media/test-drivers/vim2m.c
|
||||
+++ b/drivers/media/test-drivers/vim2m.c
|
||||
@@ -1379,7 +1379,7 @@ static int vim2m_probe(struct platform_device *pdev)
|
||||
return ret;
|
||||
}
|
||||
|
||||
-static void vim2m_remove(struct platform_device *pdev)
|
||||
+static int vim2m_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct vim2m_dev *dev = platform_get_drvdata(pdev);
|
||||
|
||||
@@ -1390,11 +1390,12 @@ static void vim2m_remove(struct platform_device *pdev)
|
||||
v4l2_m2m_unregister_media_controller(dev->m2m_dev);
|
||||
#endif
|
||||
video_unregister_device(&dev->vfd);
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
static struct platform_driver vim2m_pdrv = {
|
||||
.probe = vim2m_probe,
|
||||
- .remove_new = vim2m_remove,
|
||||
+ .remove = vim2m_remove,
|
||||
.driver = {
|
||||
.name = MEM2MEM_NAME,
|
||||
},
|
||||
diff --git a/drivers/media/test-drivers/vimc/vimc-core.c b/drivers/media/test-drivers/vimc/vimc-core.c
|
||||
index af127476e920..c6f07329d091 100644
|
||||
--- a/drivers/media/test-drivers/vimc/vimc-core.c
|
||||
+++ b/drivers/media/test-drivers/vimc/vimc-core.c
|
||||
@@ -387,7 +387,7 @@ static int vimc_probe(struct platform_device *pdev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
-static void vimc_remove(struct platform_device *pdev)
|
||||
+static int vimc_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct vimc_device *vimc = platform_get_drvdata(pdev);
|
||||
|
||||
@@ -397,6 +397,7 @@ static void vimc_remove(struct platform_device *pdev)
|
||||
media_device_unregister(&vimc->mdev);
|
||||
v4l2_device_unregister(&vimc->v4l2_dev);
|
||||
v4l2_device_put(&vimc->v4l2_dev);
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
static void vimc_dev_release(struct device *dev)
|
||||
@@ -410,7 +411,7 @@ static struct platform_device vimc_pdev = {
|
||||
|
||||
static struct platform_driver vimc_pdrv = {
|
||||
.probe = vimc_probe,
|
||||
- .remove_new = vimc_remove,
|
||||
+ .remove = vimc_remove,
|
||||
.driver = {
|
||||
.name = VIMC_PDEV_NAME,
|
||||
},
|
||||
diff --git a/drivers/media/test-drivers/visl/visl-core.c b/drivers/media/test-drivers/visl/visl-core.c
|
||||
index 9970dc739ca5..a450114f52f9 100644
|
||||
--- a/drivers/media/test-drivers/visl/visl-core.c
|
||||
+++ b/drivers/media/test-drivers/visl/visl-core.c
|
||||
@@ -480,7 +480,7 @@ static int visl_probe(struct platform_device *pdev)
|
||||
return ret;
|
||||
}
|
||||
|
||||
-static void visl_remove(struct platform_device *pdev)
|
||||
+static int visl_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct visl_dev *dev = platform_get_drvdata(pdev);
|
||||
|
||||
@@ -493,11 +493,12 @@ static void visl_remove(struct platform_device *pdev)
|
||||
}
|
||||
#endif
|
||||
video_unregister_device(&dev->vfd);
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
static struct platform_driver visl_pdrv = {
|
||||
.probe = visl_probe,
|
||||
- .remove_new = visl_remove,
|
||||
+ .remove = visl_remove,
|
||||
.driver = {
|
||||
.name = VISL_NAME,
|
||||
},
|
||||
diff --git a/drivers/media/test-drivers/vivid/vivid-core.c b/drivers/media/test-drivers/vivid/vivid-core.c
|
||||
index c2167ccfd222..bdabf7671011 100644
|
||||
--- a/drivers/media/test-drivers/vivid/vivid-core.c
|
||||
+++ b/drivers/media/test-drivers/vivid/vivid-core.c
|
||||
@@ -2021,7 +2021,7 @@ static int vivid_probe(struct platform_device *pdev)
|
||||
return ret;
|
||||
}
|
||||
|
||||
-static void vivid_remove(struct platform_device *pdev)
|
||||
+static int vivid_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct vivid_dev *dev;
|
||||
unsigned int i, j;
|
||||
@@ -2101,6 +2101,7 @@ static void vivid_remove(struct platform_device *pdev)
|
||||
v4l2_device_put(&dev->v4l2_dev);
|
||||
vivid_devs[i] = NULL;
|
||||
}
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
static void vivid_pdev_release(struct device *dev)
|
||||
@@ -2114,7 +2115,7 @@ static struct platform_device vivid_pdev = {
|
||||
|
||||
static struct platform_driver vivid_pdrv = {
|
||||
.probe = vivid_probe,
|
||||
- .remove_new = vivid_remove,
|
||||
+ .remove = vivid_remove,
|
||||
.driver = {
|
||||
.name = "vivid",
|
||||
},
|
203
backports/v6.2_v4l2-core.patch
Normal file
203
backports/v6.2_v4l2-core.patch
Normal file
@@ -0,0 +1,203 @@
|
||||
diff --git a/drivers/media/v4l2-core/v4l2-subdev.c b/drivers/media/v4l2-core/v4l2-subdev.c
|
||||
index 2ec179cd1264..fd90861b47c9 100644
|
||||
--- a/drivers/media/v4l2-core/v4l2-subdev.c
|
||||
+++ b/drivers/media/v4l2-core/v4l2-subdev.c
|
||||
@@ -10,7 +10,6 @@
|
||||
|
||||
#include <linux/export.h>
|
||||
#include <linux/ioctl.h>
|
||||
-#include <linux/leds.h>
|
||||
#include <linux/mm.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/overflow.h>
|
||||
@@ -44,8 +43,6 @@ static bool v4l2_subdev_enable_streams_api;
|
||||
*/
|
||||
#define V4L2_SUBDEV_MAX_STREAM_ID 63
|
||||
|
||||
-#include "v4l2-subdev-priv.h"
|
||||
-
|
||||
#if defined(CONFIG_VIDEO_V4L2_SUBDEV_API)
|
||||
static int subdev_fh_init(struct v4l2_subdev_fh *fh, struct v4l2_subdev *sd)
|
||||
{
|
||||
@@ -374,15 +371,6 @@ static int call_s_stream(struct v4l2_subdev *sd, int enable)
|
||||
{
|
||||
int ret;
|
||||
|
||||
-#if IS_REACHABLE(CONFIG_LEDS_CLASS)
|
||||
- if (!IS_ERR_OR_NULL(sd->privacy_led)) {
|
||||
- if (enable)
|
||||
- led_set_brightness(sd->privacy_led,
|
||||
- sd->privacy_led->max_brightness);
|
||||
- else
|
||||
- led_set_brightness(sd->privacy_led, 0);
|
||||
- }
|
||||
-#endif
|
||||
ret = sd->ops->video->s_stream(sd, enable);
|
||||
|
||||
if (!enable && ret < 0) {
|
||||
@@ -2181,7 +2169,6 @@ void v4l2_subdev_init(struct v4l2_subdev *sd, const struct v4l2_subdev_ops *ops)
|
||||
sd->grp_id = 0;
|
||||
sd->dev_priv = NULL;
|
||||
sd->host_priv = NULL;
|
||||
- sd->privacy_led = NULL;
|
||||
#if defined(CONFIG_MEDIA_CONTROLLER)
|
||||
sd->entity.name = sd->name;
|
||||
sd->entity.obj_type = MEDIA_ENTITY_TYPE_V4L2_SUBDEV;
|
||||
@@ -2197,36 +2184,3 @@ void v4l2_subdev_notify_event(struct v4l2_subdev *sd,
|
||||
v4l2_subdev_notify(sd, V4L2_DEVICE_NOTIFY_EVENT, (void *)ev);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(v4l2_subdev_notify_event);
|
||||
-
|
||||
-int v4l2_subdev_get_privacy_led(struct v4l2_subdev *sd)
|
||||
-{
|
||||
-#if IS_REACHABLE(CONFIG_LEDS_CLASS)
|
||||
- sd->privacy_led = led_get(sd->dev, "privacy-led");
|
||||
- if (IS_ERR(sd->privacy_led) && PTR_ERR(sd->privacy_led) != -ENOENT)
|
||||
- return dev_err_probe(sd->dev, PTR_ERR(sd->privacy_led),
|
||||
- "getting privacy LED\n");
|
||||
-
|
||||
- if (!IS_ERR_OR_NULL(sd->privacy_led)) {
|
||||
- mutex_lock(&sd->privacy_led->led_access);
|
||||
- led_sysfs_disable(sd->privacy_led);
|
||||
- led_trigger_remove(sd->privacy_led);
|
||||
- led_set_brightness(sd->privacy_led, 0);
|
||||
- mutex_unlock(&sd->privacy_led->led_access);
|
||||
- }
|
||||
-#endif
|
||||
- return 0;
|
||||
-}
|
||||
-EXPORT_SYMBOL_GPL(v4l2_subdev_get_privacy_led);
|
||||
-
|
||||
-void v4l2_subdev_put_privacy_led(struct v4l2_subdev *sd)
|
||||
-{
|
||||
-#if IS_REACHABLE(CONFIG_LEDS_CLASS)
|
||||
- if (!IS_ERR_OR_NULL(sd->privacy_led)) {
|
||||
- mutex_lock(&sd->privacy_led->led_access);
|
||||
- led_sysfs_enable(sd->privacy_led);
|
||||
- mutex_unlock(&sd->privacy_led->led_access);
|
||||
- led_put(sd->privacy_led);
|
||||
- }
|
||||
-#endif
|
||||
-}
|
||||
-EXPORT_SYMBOL_GPL(v4l2_subdev_put_privacy_led);
|
||||
diff --git a/drivers/media/v4l2-core/v4l2-async.c b/drivers/media/v4l2-core/v4l2-async.c
|
||||
index b16b5f4cb91e..008a2a3e312e 100644
|
||||
--- a/drivers/media/v4l2-core/v4l2-async.c
|
||||
+++ b/drivers/media/v4l2-core/v4l2-async.c
|
||||
@@ -24,8 +24,6 @@
|
||||
#include <media/v4l2-fwnode.h>
|
||||
#include <media/v4l2-subdev.h>
|
||||
|
||||
-#include "v4l2-subdev-priv.h"
|
||||
-
|
||||
static int v4l2_async_nf_call_bound(struct v4l2_async_notifier *n,
|
||||
struct v4l2_subdev *subdev,
|
||||
struct v4l2_async_subdev *asd)
|
||||
@@ -827,8 +825,6 @@ void v4l2_async_unregister_subdev(struct v4l2_subdev *sd)
|
||||
if (!sd->async_list.next)
|
||||
return;
|
||||
|
||||
- v4l2_subdev_put_privacy_led(sd);
|
||||
-
|
||||
mutex_lock(&list_lock);
|
||||
|
||||
__v4l2_async_nf_unregister(sd->subdev_notifier);
|
||||
diff --git a/drivers/media/v4l2-core/v4l2-fwnode.c b/drivers/media/v4l2-core/v4l2-fwnode.c
|
||||
index 049c2f2001ea..3d9533c1b202 100644
|
||||
--- a/drivers/media/v4l2-core/v4l2-fwnode.c
|
||||
+++ b/drivers/media/v4l2-core/v4l2-fwnode.c
|
||||
@@ -28,8 +28,6 @@
|
||||
#include <media/v4l2-fwnode.h>
|
||||
#include <media/v4l2-subdev.h>
|
||||
|
||||
-#include "v4l2-subdev-priv.h"
|
||||
-
|
||||
static const struct v4l2_fwnode_bus_conv {
|
||||
enum v4l2_fwnode_bus_type fwnode_bus_type;
|
||||
enum v4l2_mbus_type mbus_type;
|
||||
@@ -1304,10 +1302,6 @@ int v4l2_async_register_subdev_sensor(struct v4l2_subdev *sd)
|
||||
|
||||
v4l2_async_nf_init(notifier);
|
||||
|
||||
- ret = v4l2_subdev_get_privacy_led(sd);
|
||||
- if (ret < 0)
|
||||
- goto out_cleanup;
|
||||
-
|
||||
ret = v4l2_async_nf_parse_fwnode_sensor(sd->dev, notifier);
|
||||
if (ret < 0)
|
||||
goto out_cleanup;
|
||||
@@ -1328,7 +1322,6 @@ int v4l2_async_register_subdev_sensor(struct v4l2_subdev *sd)
|
||||
v4l2_async_nf_unregister(notifier);
|
||||
|
||||
out_cleanup:
|
||||
- v4l2_subdev_put_privacy_led(sd);
|
||||
v4l2_async_nf_cleanup(notifier);
|
||||
kfree(notifier);
|
||||
|
||||
diff --git a/drivers/media/v4l2-core/videobuf-dma-contig.c b/drivers/media/v4l2-core/videobuf-dma-contig.c
|
||||
index 4c2ec7a0d804..f2c439359557 100644
|
||||
--- a/drivers/media/v4l2-core/videobuf-dma-contig.c
|
||||
+++ b/drivers/media/v4l2-core/videobuf-dma-contig.c
|
||||
@@ -314,7 +314,7 @@ static int __videobuf_mmap_mapper(struct videobuf_queue *q,
|
||||
}
|
||||
|
||||
vma->vm_ops = &videobuf_vm_ops;
|
||||
- vm_flags_set(vma, VM_DONTEXPAND);
|
||||
+ vma->vm_flags |= VM_DONTEXPAND;
|
||||
vma->vm_private_data = map;
|
||||
|
||||
dev_dbg(q->dev, "mmap %p: q=%p %08lx-%08lx (%lx) pgoff %08lx buf %d\n",
|
||||
diff --git a/drivers/media/v4l2-core/videobuf-dma-sg.c b/drivers/media/v4l2-core/videobuf-dma-sg.c
|
||||
index 53001532e8e3..234e9f647c96 100644
|
||||
--- a/drivers/media/v4l2-core/videobuf-dma-sg.c
|
||||
+++ b/drivers/media/v4l2-core/videobuf-dma-sg.c
|
||||
@@ -630,8 +630,8 @@ static int __videobuf_mmap_mapper(struct videobuf_queue *q,
|
||||
map->count = 1;
|
||||
map->q = q;
|
||||
vma->vm_ops = &videobuf_vm_ops;
|
||||
- /* using shared anonymous pages */
|
||||
- vm_flags_mod(vma, VM_DONTEXPAND | VM_DONTDUMP, VM_IO);
|
||||
+ vma->vm_flags |= VM_DONTEXPAND | VM_DONTDUMP;
|
||||
+ vma->vm_flags &= ~VM_IO; /* using shared anonymous pages */
|
||||
vma->vm_private_data = map;
|
||||
dprintk(1, "mmap %p: q=%p %08lx-%08lx pgoff %08lx bufs %d-%d\n",
|
||||
map, q, vma->vm_start, vma->vm_end, vma->vm_pgoff, first, last);
|
||||
diff --git a/drivers/media/v4l2-core/videobuf-vmalloc.c b/drivers/media/v4l2-core/videobuf-vmalloc.c
|
||||
index 85c7090606d6..9b2443720ab0 100644
|
||||
--- a/drivers/media/v4l2-core/videobuf-vmalloc.c
|
||||
+++ b/drivers/media/v4l2-core/videobuf-vmalloc.c
|
||||
@@ -247,7 +247,7 @@ static int __videobuf_mmap_mapper(struct videobuf_queue *q,
|
||||
}
|
||||
|
||||
vma->vm_ops = &videobuf_vm_ops;
|
||||
- vm_flags_set(vma, VM_DONTEXPAND | VM_DONTDUMP);
|
||||
+ vma->vm_flags |= VM_DONTEXPAND | VM_DONTDUMP;
|
||||
vma->vm_private_data = map;
|
||||
|
||||
dprintk(1, "mmap %p: q=%p %08lx-%08lx (%lx) pgoff %08lx buf %d\n",
|
||||
diff --git a/drivers/media/common/videobuf2/videobuf2-dma-contig.c b/drivers/media/common/videobuf2/videobuf2-dma-contig.c
|
||||
index 205d3cac425c..d14e13385385 100644
|
||||
--- a/drivers/media/common/videobuf2/videobuf2-dma-contig.c
|
||||
+++ b/drivers/media/common/videobuf2/videobuf2-dma-contig.c
|
||||
@@ -293,7 +293,7 @@ static int vb2_dc_mmap(void *buf_priv, struct vm_area_struct *vma)
|
||||
return ret;
|
||||
}
|
||||
|
||||
- vm_flags_set(vma, VM_DONTEXPAND | VM_DONTDUMP);
|
||||
+ vma->vm_flags |= VM_DONTEXPAND | VM_DONTDUMP;
|
||||
vma->vm_private_data = &buf->handler;
|
||||
vma->vm_ops = &vb2_common_vm_ops;
|
||||
|
||||
diff --git a/drivers/media/common/videobuf2/videobuf2-vmalloc.c b/drivers/media/common/videobuf2/videobuf2-vmalloc.c
|
||||
index a6c6d2fcaaa4..ff9496582900 100644
|
||||
--- a/drivers/media/common/videobuf2/videobuf2-vmalloc.c
|
||||
+++ b/drivers/media/common/videobuf2/videobuf2-vmalloc.c
|
||||
@@ -185,7 +185,7 @@ static int vb2_vmalloc_mmap(void *buf_priv, struct vm_area_struct *vma)
|
||||
/*
|
||||
* Make sure that vm_areas for 2 buffers won't be merged together
|
||||
*/
|
||||
- vm_flags_set(vma, VM_DONTEXPAND);
|
||||
+ vma->vm_flags |= VM_DONTEXPAND;
|
||||
|
||||
/*
|
||||
* Use common vm_area operations to track buffer refcount.
|
@@ -20,7 +20,10 @@ TARDIR += include/dt-bindings/media/
|
||||
TARDIR += include/linux/platform_data/media/
|
||||
TARFILES += include/linux/mmc/sdio_ids.h
|
||||
TARFILES += include/sound/aci.h
|
||||
TARFILES += include/linux/usb/uvc.h
|
||||
TARFILES += include/uapi/linux/usb/video.h
|
||||
|
||||
|
||||
TARFILES += include/linux/via-core.h
|
||||
TARFILES += include/linux/ti_wilink_st.h
|
||||
TARFILES += include/linux/of_graph.h
|
||||
|
Reference in New Issue
Block a user