View | Details | Raw Unified
Collapse All | Expand All

(-) file_not_specified_in_diff (-6 / +14 lines)
Line     Link Here 
by localhost (sa3 [127.0.0.1]) (amavisd-new, port 10024) with ESMTP
by localhost (sa3 [127.0.0.1]) (amavisd-new, port 10024) with ESMTP
id 12461-04; Sun,  9 Jan 2005 02:13:54 +0200 (IST)
id 12461-04; Sun,  9 Jan 2005 02:13:54 +0200 (IST)
 Lines 58-63    Link Here 
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
#define OLD_KERNEL 1
#define OLD_KERNEL 1
#endif
#endif
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10)
#define pci_register_driver(drv) ( pci_register_driver(drv) ? 0 : -ENODEV )
#endif
#ifdef OLD_KERNEL
#ifdef OLD_KERNEL
#define iminor(i) MINOR((i)->i_rdev)
#define iminor(i) MINOR((i)->i_rdev)
 Lines 350-356    Link Here 
	if (count > sizeof(amrmo->ibuf))
	if (count > sizeof(amrmo->ibuf))
		count = sizeof(amrmo->ibuf);
		count = sizeof(amrmo->ibuf);
	ret = amrmo_card_read(amrmo->card,amrmo->ibuf,count);
	ret = amrmo_card_read(amrmo->card,amrmo->ibuf,count);
	copy_to_user(buffer,amrmo->ibuf,ret);
	if(copy_to_user(buffer,amrmo->ibuf,ret))
		return -EFAULT;
	return ret;
	return ret;
}
}
 Lines 363-369    Link Here 
		return -EFAULT;
		return -EFAULT;
	if (count > sizeof(amrmo->obuf))
	if (count > sizeof(amrmo->obuf))
		count = sizeof(amrmo->obuf);
		count = sizeof(amrmo->obuf);
	copy_from_user(amrmo->obuf,buffer,count);
	if(copy_from_user(amrmo->obuf,buffer,count))
		return -EFAULT;
	ret = amrmo_card_write(amrmo->card,amrmo->obuf,count);
	ret = amrmo_card_write(amrmo->card,amrmo->obuf,count);
	return ret;
	return ret;
}
}
 Lines 692-697    Link Here 
static int __init amrmo_init(void)
static int __init amrmo_init(void)
{
{
	struct pci_dev *dev = NULL;
	struct pci_dev *dev = NULL;
	int err;
#ifdef OLD_KERNEL
#ifdef OLD_KERNEL
	if (!pci_present())
	if (!pci_present())
		return -ENODEV;
		return -ENODEV;
 Lines 717-723    Link Here 
			if (dev->driver && dev->driver->remove)
			if (dev->driver && dev->driver->remove)
				dev->driver->remove(dev);
				dev->driver->remove(dev);
			dev->driver = NULL;
			dev->driver = NULL;
#else
#elif LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10)
			struct device *reldev = get_device(&dev->dev);
			struct device *reldev = get_device(&dev->dev);
			AMRMO_DBG("device %04x:%04x is grabbed by driver %s: try to release\n",
			AMRMO_DBG("device %04x:%04x is grabbed by driver %s: try to release\n",
				  dev->vendor,dev->device,
				  dev->vendor,dev->device,
 Lines 727-732    Link Here 
				device_release_driver(reldev);
				device_release_driver(reldev);
				put_device(reldev);
				put_device(reldev);
			}
			}
#else
			AMRMO_DBG("device %04x:%04x is grabbed by another driver\n",
				  dev->vendor,dev->device);
#endif
#endif
		}
		}
	}
	}
 Lines 739-751    Link Here 
		return err;
		return err;
	}
	}
#endif
#endif
	if ((err = pci_register_driver(&amrmo_pci_driver)) < 0) {
	if (!pci_register_driver(&amrmo_pci_driver)) {
		pci_unregister_driver(&amrmo_pci_driver);
		pci_unregister_driver(&amrmo_pci_driver);
#ifndef OLD_KERNEL
#ifndef OLD_KERNEL
		class_simple_destroy(amrmo_class);
		class_simple_destroy(amrmo_class);
#endif
#endif
                return -ENODEV;
                return err;
	}
	}
	if(register_chrdev(AMRMO_MAJOR, "slamr", &amrmo_fops) < 0) {
	if(register_chrdev(AMRMO_MAJOR, "slamr", &amrmo_fops) < 0) {