Mercurial > mplayer.hg
changeset 5764:1e07af707b15
devfs fix?
author | arpi |
---|---|
date | Sun, 21 Apr 2002 15:07:44 +0000 |
parents | e9fb293c53d2 |
children | 913cd7f4b8c5 |
files | drivers/mga_vid.c |
diffstat | 1 files changed, 9 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/drivers/mga_vid.c Sun Apr 21 14:36:36 2002 +0000 +++ b/drivers/mga_vid.c Sun Apr 21 15:07:44 2002 +0000 @@ -102,7 +102,9 @@ static uint32_t mga_param_buff_size=0; static uint32_t mga_param_buff_len=0; +#ifndef min #define min(x,y) (((x)<(y))?(x):(y)) +#endif #if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0) #include <linux/ctype.h> @@ -1577,9 +1579,12 @@ MGA_VID_MAJOR, 0, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IFCHR, &mga_vid_fops, NULL)) == NULL) -#else + { + printk(KERN_ERR "mga_vid: unable to get major: %d (devfs)\n", MGA_VID_MAJOR); + return -EIO; + } +#endif if(register_chrdev(MGA_VID_MAJOR, "mga_vid", &mga_vid_fops)) -#endif { printk(KERN_ERR "mga_vid: unable to get major: %d\n", MGA_VID_MAJOR); return -EIO; @@ -1590,9 +1595,8 @@ printk(KERN_ERR "mga_vid: no supported devices found\n"); #ifdef CONFIG_DEVFS_FS devfs_unregister(dev_handle); -#else +#endif unregister_chrdev(MGA_VID_MAJOR, "mga_vid"); -#endif return -EINVAL; } mga_param_buff = kmalloc(PARAM_BUFF_SIZE,GFP_KERNEL); @@ -1623,8 +1627,7 @@ printk(KERN_INFO "mga_vid: Cleaning up module\n"); #ifdef CONFIG_DEVFS_FS devfs_unregister(dev_handle); -#else +#endif unregister_chrdev(MGA_VID_MAJOR, "mga_vid"); -#endif }