lkml.org 
[lkml]   [2001]   [Aug]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Added devfs support for i386 msr/cpuid driver
> 
> int __init msr_init(void)
> {
> +#ifdef CONFIG_DEVFS_FS
> + devfs_handle = devfs_register(NULL, "cpu/msr", DEVFS_FL_DEFAULT, 0, 0,
> + S_IFREG | S_IRUGO | S_IWUSR,
> + &msr_fops, NULL);
> +#else
> if (register_chrdev(MSR_MAJOR, "cpu/msr", &msr_fops)) {
> printk(KERN_ERR "msr: unable to get major %d for msr\n",
> MSR_MAJOR);
> return -EBUSY;
> }
> +#endif

this must be wrong as you don't check for devfs_register failures...



Also why devfs can't just use register_chrdev and not touch ALL drivers
is beyond me, but it has been like that for a while now...
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:17    [W:0.529 / U:0.720 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site