diff options
author | Andrew Morton <akpm@osdl.org> | 2006-03-24 21:29:13 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-04-07 09:44:26 -0700 |
commit | 8c1e395226ec061b99cadddb5f0a7c5cc0dc1512 (patch) | |
tree | 197e4c1b2767947a231e25a1380919cffcee14fb /drivers | |
parent | 1ffe5e06461f72b9b6a2569c441483ddb361cf4a (diff) |
[PATCH] tlclk: fix handling of device major
tlclk calls register_chrdev() and permits register_chrdev() to allocate the
major, but it promptly forgets what that major was. So if there's no hardware
present you still get "telco_clock" appearing in /proc/devices and, I assume,
an oops reading /proc/devices if tlclk was a module.
Fix.
Mark, I'd suggest that that we not call register_chrdev() until _after_ we've
established that the hardware is present.
Cc: Mark Gross <mgross@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/char/tlclk.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/char/tlclk.c b/drivers/char/tlclk.c index 4c272189cd4..2546637a55c 100644 --- a/drivers/char/tlclk.c +++ b/drivers/char/tlclk.c @@ -767,6 +767,7 @@ static int __init tlclk_init(void) printk(KERN_ERR "tlclk: can't get major %d.\n", tlclk_major); return ret; } + tlclk_major = ret; alarm_events = kzalloc( sizeof(struct tlclk_alarms), GFP_KERNEL); if (!alarm_events) goto out1; |