diff options
| author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-06-24 08:41:41 -0400 |
|---|---|---|
| committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-06-24 13:07:53 -0400 |
| commit | 816724e65c72a90a44fbad0ef0b59b186c85fa90 (patch) | |
| tree | 421fa29aedff988e392f92780637553e275d37a0 /drivers/char/tty_io.c | |
| parent | 70ac4385a13f78bc478f26d317511893741b05bd (diff) | |
| parent | d384ea691fe4ea8c2dd5b9b8d9042eb181776f18 (diff) | |
Merge branch 'master' of /home/trondmy/kernel/linux-2.6/
Conflicts:
fs/nfs/inode.c
fs/super.c
Fix conflicts between patch 'NFS: Split fs/nfs/inode.c' and patch
'VFS: Permit filesystem to override root dentry on mount'
Diffstat (limited to 'drivers/char/tty_io.c')
| -rw-r--r-- | drivers/char/tty_io.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c index a88b94a82b14..8b2a59969868 100644 --- a/drivers/char/tty_io.c +++ b/drivers/char/tty_io.c | |||
| @@ -2961,12 +2961,14 @@ static struct class *tty_class; | |||
| 2961 | * This field is optional, if there is no known struct device for this | 2961 | * This field is optional, if there is no known struct device for this |
| 2962 | * tty device it can be set to NULL safely. | 2962 | * tty device it can be set to NULL safely. |
| 2963 | * | 2963 | * |
| 2964 | * Returns a pointer to the class device (or ERR_PTR(-EFOO) on error). | ||
| 2965 | * | ||
| 2964 | * This call is required to be made to register an individual tty device if | 2966 | * This call is required to be made to register an individual tty device if |
| 2965 | * the tty driver's flags have the TTY_DRIVER_NO_DEVFS bit set. If that | 2967 | * the tty driver's flags have the TTY_DRIVER_NO_DEVFS bit set. If that |
| 2966 | * bit is not set, this function should not be called. | 2968 | * bit is not set, this function should not be called. |
| 2967 | */ | 2969 | */ |
| 2968 | void tty_register_device(struct tty_driver *driver, unsigned index, | 2970 | struct class_device *tty_register_device(struct tty_driver *driver, |
| 2969 | struct device *device) | 2971 | unsigned index, struct device *device) |
| 2970 | { | 2972 | { |
| 2971 | char name[64]; | 2973 | char name[64]; |
| 2972 | dev_t dev = MKDEV(driver->major, driver->minor_start) + index; | 2974 | dev_t dev = MKDEV(driver->major, driver->minor_start) + index; |
| @@ -2974,7 +2976,7 @@ void tty_register_device(struct tty_driver *driver, unsigned index, | |||
| 2974 | if (index >= driver->num) { | 2976 | if (index >= driver->num) { |
| 2975 | printk(KERN_ERR "Attempt to register invalid tty line number " | 2977 | printk(KERN_ERR "Attempt to register invalid tty line number " |
| 2976 | " (%d).\n", index); | 2978 | " (%d).\n", index); |
| 2977 | return; | 2979 | return ERR_PTR(-EINVAL); |
| 2978 | } | 2980 | } |
| 2979 | 2981 | ||
| 2980 | devfs_mk_cdev(dev, S_IFCHR | S_IRUSR | S_IWUSR, | 2982 | devfs_mk_cdev(dev, S_IFCHR | S_IRUSR | S_IWUSR, |
| @@ -2984,7 +2986,8 @@ void tty_register_device(struct tty_driver *driver, unsigned index, | |||
| 2984 | pty_line_name(driver, index, name); | 2986 | pty_line_name(driver, index, name); |
| 2985 | else | 2987 | else |
| 2986 | tty_line_name(driver, index, name); | 2988 | tty_line_name(driver, index, name); |
| 2987 | class_device_create(tty_class, NULL, dev, device, "%s", name); | 2989 | |
| 2990 | return class_device_create(tty_class, NULL, dev, device, "%s", name); | ||
| 2988 | } | 2991 | } |
| 2989 | 2992 | ||
| 2990 | /** | 2993 | /** |
