aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/tty_io.c
diff options
context:
space:
mode:
authorTomas Hlavacek <tmshlvck@gmail.com>2012-09-06 17:17:47 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-09-06 17:40:18 -0400
commitb1b799164afb22711e6bee718f2a5ee669bb9517 (patch)
tree2bb7e2c7513b879531a8f0b898bc5557f4a784ed /drivers/tty/tty_io.c
parent6915c0e487c822e2436683e14302c0b8a6155cc7 (diff)
tty_register_device_attr updated for tty-next
Added tty_device_create_release() and bound to dev->release in tty_register_device_attr(). Added tty_port_register_device_attr() and used in uart_add_one_port() instead of tty_register_device_attr(). Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/tty_io.c')
-rw-r--r--drivers/tty/tty_io.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c
index dcb30d55d39c..8a5a8b064616 100644
--- a/drivers/tty/tty_io.c
+++ b/drivers/tty/tty_io.c
@@ -3045,6 +3045,12 @@ struct device *tty_register_device(struct tty_driver *driver, unsigned index,
3045} 3045}
3046EXPORT_SYMBOL(tty_register_device); 3046EXPORT_SYMBOL(tty_register_device);
3047 3047
3048static void tty_device_create_release(struct device *dev)
3049{
3050 pr_debug("device: '%s': %s\n", dev_name(dev), __func__);
3051 kfree(dev);
3052}
3053
3048/** 3054/**
3049 * tty_register_device_attr - register a tty device 3055 * tty_register_device_attr - register a tty device
3050 * @driver: the tty driver that describes the tty device 3056 * @driver: the tty driver that describes the tty device
@@ -3103,6 +3109,7 @@ struct device *tty_register_device_attr(struct tty_driver *driver,
3103 dev->devt = devt; 3109 dev->devt = devt;
3104 dev->class = tty_class; 3110 dev->class = tty_class;
3105 dev->parent = device; 3111 dev->parent = device;
3112 dev->release = tty_device_create_release;
3106 dev_set_name(dev, "%s", name); 3113 dev_set_name(dev, "%s", name);
3107 dev->groups = attr_grp; 3114 dev->groups = attr_grp;
3108 dev_set_drvdata(dev, drvdata); 3115 dev_set_drvdata(dev, drvdata);