diff options
author | Álvaro Fernández Rojas <noltari@gmail.com> | 2019-12-23 13:42:55 +0100 |
---|---|---|
committer | Álvaro Fernández Rojas <noltari@gmail.com> | 2019-12-24 18:49:44 +0100 |
commit | 67dcc43f3a22dc3a7ac07a7065971b426feeb043 (patch) | |
tree | 0b647356dce45d2c79fd46cf201daa5089cc0934 /target/linux/brcm2708/patches-4.19/950-0237-staging-bcm2835-Don-t-probe-if-no-camera-is-detected.patch | |
parent | 47a93a810f78adce5a130d287f82b28e9b54313c (diff) | |
download | upstream-67dcc43f3a22dc3a7ac07a7065971b426feeb043.tar.gz upstream-67dcc43f3a22dc3a7ac07a7065971b426feeb043.tar.bz2 upstream-67dcc43f3a22dc3a7ac07a7065971b426feeb043.zip |
brcm2708: organize kernel patches
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Diffstat (limited to 'target/linux/brcm2708/patches-4.19/950-0237-staging-bcm2835-Don-t-probe-if-no-camera-is-detected.patch')
-rw-r--r-- | target/linux/brcm2708/patches-4.19/950-0237-staging-bcm2835-Don-t-probe-if-no-camera-is-detected.patch | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/target/linux/brcm2708/patches-4.19/950-0237-staging-bcm2835-Don-t-probe-if-no-camera-is-detected.patch b/target/linux/brcm2708/patches-4.19/950-0237-staging-bcm2835-Don-t-probe-if-no-camera-is-detected.patch deleted file mode 100644 index bd313cc9ff..0000000000 --- a/target/linux/brcm2708/patches-4.19/950-0237-staging-bcm2835-Don-t-probe-if-no-camera-is-detected.patch +++ /dev/null @@ -1,41 +0,0 @@ -From b0ebcf556b543b0b509ad071584ca6b41076a2da Mon Sep 17 00:00:00 2001 -From: Stefan Wahren <stefan.wahren@i2se.com> -Date: Mon, 22 Oct 2018 11:09:18 +0200 -Subject: [PATCH 237/806] staging: bcm2835: Don't probe if no camera is - detected - -It is a waste of resources to load the camera driver in case there isn't -a camera actually connected to the Raspberry Pi. This solution also -avoids a NULL ptr dereference of mmal instance on driver unload. - -Fixes: 7b3ad5abf027 ("staging: Import the BCM2835 MMAL-based V4L2 camera driver.") -Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> ---- - .../vc04_services/bcm2835-camera/bcm2835-camera.c | 9 +++++++++ - 1 file changed, 9 insertions(+) - ---- a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c -+++ b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c -@@ -1860,6 +1860,12 @@ static int bcm2835_mmal_probe(struct pla - num_cameras = get_num_cameras(instance, - resolutions, - MAX_BCM2835_CAMERAS); -+ -+ if (num_cameras < 1) { -+ ret = -ENODEV; -+ goto cleanup_mmal; -+ } -+ - if (num_cameras > MAX_BCM2835_CAMERAS) - num_cameras = MAX_BCM2835_CAMERAS; - -@@ -1968,6 +1974,9 @@ cleanup_gdev: - gdev[i] = NULL; - } - -+cleanup_mmal: -+ vchiq_mmal_finalise(instance); -+ - return ret; - } - |