Commit e5717c48 authored by Geert Uytterhoeven's avatar Geert Uytterhoeven Committed by Linus Torvalds

[PATCH] tty_register_driver: Remove incorrect and superfluous cast

tty_register_driver: Remove incorrect and superfluous cast (expected and passed
types are both const char *)
Signed-off-by: default avatarGeert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Acked-by: default avatarAlan Cox <alan@redhat.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 1ca94929
......@@ -3713,15 +3713,14 @@ int tty_register_driver(struct tty_driver *driver)
if (!driver->major) {
error = alloc_chrdev_region(&dev, driver->minor_start, driver->num,
(char*)driver->name);
driver->name);
if (!error) {
driver->major = MAJOR(dev);
driver->minor_start = MINOR(dev);
}
} else {
dev = MKDEV(driver->major, driver->minor_start);
error = register_chrdev_region(dev, driver->num,
(char*)driver->name);
error = register_chrdev_region(dev, driver->num, driver->name);
}
if (error < 0) {
kfree(p);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment