bcm27xx-gpu-fw: update to latest version
[openwrt/openwrt.git] / target / linux / bcm27xx / patches-5.4 / 950-0386-driver-char-rpivid-Destroy-the-legacy-device-on-remo.patch
1 From d0be0df98679b7a9a30ba74c065ed30301e2bd22 Mon Sep 17 00:00:00 2001
2 From: Dave Stevenson <dave.stevenson@raspberrypi.com>
3 Date: Wed, 15 Jan 2020 13:59:57 +0000
4 Subject: [PATCH] driver: char: rpivid: Destroy the legacy device on
5 remove
6
7 The legacy name support created a new device that was never destroyed.
8 If the driver was unloaded and reloaded, it failed due to the
9 device already existing.
10
11 Fixes: "75f1d14 driver: char: rpivid - also support legacy name"
12 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
13 ---
14 drivers/char/broadcom/rpivid-mem.c | 1 +
15 1 file changed, 1 insertion(+)
16
17 --- a/drivers/char/broadcom/rpivid-mem.c
18 +++ b/drivers/char/broadcom/rpivid-mem.c
19 @@ -233,6 +233,7 @@ static int rpivid_mem_remove(struct plat
20 struct device *dev = &pdev->dev;
21 struct rpivid_mem_priv *priv = platform_get_drvdata(pdev);
22
23 + device_destroy(priv->class, priv->devid + 1);
24 device_destroy(priv->class, priv->devid);
25 class_destroy(priv->class);
26 cdev_del(&priv->rpivid_mem_cdev);