예제 #1
0
static int __init
hysdn_init(void)
{
	int rc;

;

	rc = pci_register_driver(&hysdn_pci_driver);
	if (rc)
		return rc;

;

	if (!hysdn_procconf_init())
		hysdn_have_procfs = 1;

#ifdef CONFIG_HYSDN_CAPI
	if(cardmax > 0) {
		if(hycapi_init()) {
;

			if (hysdn_have_procfs)
				hysdn_procconf_release();

			pci_unregister_driver(&hysdn_pci_driver);
			return -ESPIPE;
		}
	}
#endif /* CONFIG_HYSDN_CAPI */

	return 0;		/* no error */
}				/* init_module */
예제 #2
0
static void __exit
hysdn_exit(void)
{
	if (hysdn_have_procfs)
		hysdn_procconf_release();

	pci_unregister_driver(&hysdn_pci_driver);

#ifdef CONFIG_HYSDN_CAPI
	hycapi_cleanup();
#endif /* CONFIG_HYSDN_CAPI */

;
}				/* cleanup_module */
예제 #3
0
static void __exit
hysdn_exit(void)
{
	if (hysdn_have_procfs)
		hysdn_procconf_release();

	pci_unregister_driver(&hysdn_pci_driver);

#ifdef CONFIG_HYSDN_CAPI
	hycapi_cleanup();
#endif /* CONFIG_HYSDN_CAPI */

	printk(KERN_NOTICE "HYSDN: module unloaded\n");
}				/* cleanup_module */
예제 #4
0
파일: hysdn_init.c 프로젝트: maliyu/SOM2416
static void __exit
hysdn_exit(void)
{
#ifdef CONFIG_HYSDN_CAPI
	hysdn_card *card;
#endif /* CONFIG_HYSDN_CAPI */
	stop_cards();
#ifdef CONFIG_HYSDN_CAPI
	card = card_root;	/* first in chain */
	while (card) {
		hycapi_capi_release(card);
		card = card->next;	/* remove card from chain */
	}			/* while card */
	hycapi_cleanup();
#endif /* CONFIG_HYSDN_CAPI */
	hysdn_procconf_release();
	free_resources();
	printk(KERN_NOTICE "HYSDN: module unloaded\n");
}				/* cleanup_module */
예제 #5
0
static int __init
hysdn_init(void)
{
	char tmp[50];
	int rc;

	strcpy(tmp, hysdn_init_revision);
	printk(KERN_NOTICE "HYSDN: module Rev: %s loaded\n", hysdn_getrev(tmp));
	strcpy(tmp, hysdn_net_revision);
	printk(KERN_NOTICE "HYSDN: network interface Rev: %s \n", hysdn_getrev(tmp));

	rc = pci_register_driver(&hysdn_pci_driver);
	if (rc)
		return rc;

	printk(KERN_INFO "HYSDN: %d card(s) found.\n", cardmax);

	if (!hysdn_procconf_init())
		hysdn_have_procfs = 1;

#ifdef CONFIG_HYSDN_CAPI
	if(cardmax > 0) {
		if(hycapi_init()) {
			printk(KERN_ERR "HYCAPI: init failed\n");

			if (hysdn_have_procfs)
				hysdn_procconf_release();

			pci_unregister_driver(&hysdn_pci_driver);
			return -ESPIPE;
		}
	}
#endif /* CONFIG_HYSDN_CAPI */

	return 0;		/* no error */
}				/* init_module */