Skip to content

Commit fe2bb00

Browse files
pelwellpopcornmix
authored andcommitted
driver: char: rpivid: Remove legacy name support
Signed-off-by: Phil Elwell <phil@raspberrypi.com>
1 parent 9111311 commit fe2bb00

1 file changed

Lines changed: 0 additions & 22 deletions

File tree

‎drivers/char/broadcom/rpivid-mem.c‎

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -193,32 +193,11 @@ static int rpivid_mem_probe(struct platform_device *pdev)
193193
goto failed_device_create;
194194
}
195195

196-
/* Legacy alias */
197-
{
198-
char *oldname = kstrdup(priv->name, GFP_KERNEL);
199-
200-
oldname[1] = 'a';
201-
oldname[2] = 'r';
202-
oldname[3] = 'g';
203-
oldname[4] = 'o';
204-
oldname[5] = 'n';
205-
dev = device_create(priv->class, NULL, priv->devid + 1, NULL,
206-
oldname + 1);
207-
kfree(oldname);
208-
209-
if (IS_ERR(dev)) {
210-
err = PTR_ERR(dev);
211-
goto failed_legacy_device_create;
212-
}
213-
}
214-
215196
dev_info(priv->dev, "%s initialised: Registers at 0x%08lx length 0x%08lx",
216197
priv->name, priv->regs_phys, priv->mem_window_len);
217198

218199
return 0;
219200

220-
failed_legacy_device_create:
221-
device_destroy(priv->class, priv->devid);
222201
failed_device_create:
223202
class_destroy(priv->class);
224203
failed_class_create:
@@ -238,7 +217,6 @@ static int rpivid_mem_remove(struct platform_device *pdev)
238217
struct device *dev = &pdev->dev;
239218
struct rpivid_mem_priv *priv = platform_get_drvdata(pdev);
240219

241-
device_destroy(priv->class, priv->devid + 1);
242220
device_destroy(priv->class, priv->devid);
243221
class_destroy(priv->class);
244222
cdev_del(&priv->rpivid_mem_cdev);

0 commit comments

Comments
 (0)