bcm27xx: add support for linux v5.15
[openwrt/openwrt.git] / target / linux / bcm27xx / patches-5.15 / 950-0207-driver-char-rpivid-Remove-legacy-name-support.patch
1 From 7f47cc7fd70961891c50ce303147274b6f318464 Mon Sep 17 00:00:00 2001
2 From: Phil Elwell <phil@raspberrypi.com>
3 Date: Mon, 20 Apr 2020 22:18:52 +0100
4 Subject: [PATCH] driver: char: rpivid: Remove legacy name support
5
6 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
7 ---
8 drivers/char/broadcom/rpivid-mem.c | 22 ----------------------
9 1 file changed, 22 deletions(-)
10
11 --- a/drivers/char/broadcom/rpivid-mem.c
12 +++ b/drivers/char/broadcom/rpivid-mem.c
13 @@ -193,32 +193,11 @@ static int rpivid_mem_probe(struct platf
14 goto failed_device_create;
15 }
16
17 - /* Legacy alias */
18 - {
19 - char *oldname = kstrdup(priv->name, GFP_KERNEL);
20 -
21 - oldname[1] = 'a';
22 - oldname[2] = 'r';
23 - oldname[3] = 'g';
24 - oldname[4] = 'o';
25 - oldname[5] = 'n';
26 - dev = device_create(priv->class, NULL, priv->devid + 1, NULL,
27 - oldname + 1);
28 - kfree(oldname);
29 -
30 - if (IS_ERR(dev)) {
31 - err = PTR_ERR(dev);
32 - goto failed_legacy_device_create;
33 - }
34 - }
35 -
36 dev_info(priv->dev, "%s initialised: Registers at 0x%08lx length 0x%08lx",
37 priv->name, priv->regs_phys, priv->mem_window_len);
38
39 return 0;
40
41 -failed_legacy_device_create:
42 - device_destroy(priv->class, priv->devid);
43 failed_device_create:
44 class_destroy(priv->class);
45 failed_class_create:
46 @@ -238,7 +217,6 @@ static int rpivid_mem_remove(struct plat
47 struct device *dev = &pdev->dev;
48 struct rpivid_mem_priv *priv = platform_get_drvdata(pdev);
49
50 - device_destroy(priv->class, priv->devid + 1);
51 device_destroy(priv->class, priv->devid);
52 class_destroy(priv->class);
53 cdev_del(&priv->rpivid_mem_cdev);