本文整理汇总了C++中pcmcia_register_driver函数的典型用法代码示例。如果您正苦于以下问题:C++ pcmcia_register_driver函数的具体用法?C++ pcmcia_register_driver怎么用?C++ pcmcia_register_driver使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了pcmcia_register_driver函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: init_cif60_cs
static int __init init_cif60_cs(void)
{
int ret;
ret = pcmcia_register_driver(&cif60_cs_driver);
DEBUG(0, "cif_cs:init ret=%d\n", ret);
return ret;
}
示例2: init_spectrum_cs
static int __init
init_spectrum_cs(void)
{
printk(KERN_DEBUG "%s\n", version);
return pcmcia_register_driver(&orinoco_driver);
}
示例3: prism2cs_init
static int __init prism2cs_init(void)
{
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,68))
servinfo_t serv;
#endif
DBFENTER;
WLAN_LOG_NOTICE("%s Loaded\n", version);
WLAN_LOG_NOTICE("dev_info is: %s\n", dev_info);
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,68))
pcmcia_get_card_services_info(&serv);
if ( serv.Revision != CS_RELEASE_CODE )
{
printk(KERN_NOTICE"%s: CardServices release does not match!\n", dev_info);
return -1;
}
/* This call will result in a call to prism2sta_attach */
/* and eventually prism2sta_detach */
register_pccard_driver( &dev_info, &prism2sta_attach, &prism2sta_detach);
#else
pcmcia_register_driver(&prism2_cs_driver);
#endif
DBFEXIT;
return 0;
}
示例4: init_ipwireless
/*
* Module insertion : initialisation of the module.
* Register the card with cardmgr...
*/
static int __init init_ipwireless(void)
{
int ret;
ret = ipwireless_tty_init();
if (ret != 0)
return ret;
ret = pcmcia_register_driver(&me);
if (ret != 0)
ipwireless_tty_release();
return ret;
}
示例5: wl_adapter_init_module
/*******************************************************************************
* wl_adapter_init_module()
*******************************************************************************
*
* DESCRIPTION:
*
* Called by init_module() to perform PCMCIA driver initialization.
*
* PARAMETERS:
*
* N/A
*
* RETURNS:
*
* 0 on success
* -1 on error
*
******************************************************************************/
int wl_adapter_init_module(void)
{
int ret;
/*--------------------------------------------------------------------*/
DBG_FUNC("wl_adapter_init_module");
DBG_ENTER(DbgInfo);
DBG_TRACE(DbgInfo, "wl_adapter_init_module() -- PCMCIA\n");
ret = pcmcia_register_driver(&wlags49_driver);
DBG_LEAVE(DbgInfo);
return ret;
} /* wl_adapter_init_module */
示例6: init_ipwireless
/*
* Module insertion : initialisation of the module.
* Register the card with cardmgr...
*/
static int __init init_ipwireless(void)
{
int ret;
printk(KERN_INFO IPWIRELESS_PCCARD_NAME " "
IPWIRELESS_PCMCIA_VERSION " by " IPWIRELESS_PCMCIA_AUTHOR "\n");
ret = ipwireless_tty_init();
if (ret != 0)
return ret;
ret = pcmcia_register_driver(&me);
if (ret != 0)
ipwireless_tty_release();
return ret;
}
示例7: comedi_pcmcia_driver_register
/**
* comedi_pcmcia_driver_register() - Register a comedi PCMCIA driver.
* @comedi_driver: comedi_driver struct
* @pcmcia_driver: pcmcia_driver struct
*
* This function is used for the module_init() of comedi USB drivers.
* Do not call it directly, use the module_comedi_pcmcia_driver() helper
* macro instead.
*/
int comedi_pcmcia_driver_register(struct comedi_driver *comedi_driver,
struct pcmcia_driver *pcmcia_driver)
{
int ret;
ret = comedi_driver_register(comedi_driver);
if (ret < 0)
return ret;
ret = pcmcia_register_driver(pcmcia_driver);
if (ret < 0) {
comedi_driver_unregister(comedi_driver);
return ret;
}
return 0;
}
示例8: pccard_init
//****************************************************************************
// fill struct pcmcia_driver and register it
static int pccard_init(void)
{
DPRINTK(KERN_DEBUG "%s: pccard_init()\n", DEVICE_NAME);
#ifdef LINUX_24
register_pccard_driver(&pccard_info, &pccard_attach, &pccard_detach);
return 0;
#else
memset (&pcan_drv.pccarddrv, 0, sizeof(pcan_drv.pccarddrv));
pcan_drv.pccarddrv.owner = THIS_MODULE;
pcan_drv.pccarddrv.drv.name = DEVICE_NAME;
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13)
pcan_drv.pccarddrv.attach = pccard_attach;
pcan_drv.pccarddrv.detach = pccard_detach;
#endif
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,13) && LINUX_VERSION_CODE < KERNEL_VERSION(2,6,16)
pcan_drv.pccarddrv.id_table = pccard_id_table;
pcan_drv.pccarddrv.event = pccard_event;
pcan_drv.pccarddrv.attach = pccard_attach;
pcan_drv.pccarddrv.detach = pccard_detach;
#endif
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
pcan_drv.pccarddrv.id_table = pccard_id_table;
pcan_drv.pccarddrv.probe = pccard_probe;
pcan_drv.pccarddrv.remove = pccard_detach;
pcan_drv.pccarddrv.suspend = pccard_suspend;
pcan_drv.pccarddrv.resume = pccard_resume;
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)
/* this version sets pccarddrv->drv.name with pccarddrv.name => */
/* it must be a valid pointer too */
pcan_drv.pccarddrv.name = DEVICE_NAME;
#endif
#endif
return pcmcia_register_driver(&pcan_drv.pccarddrv);
#endif
}
示例9: init_fdomain_cs
static int __init init_fdomain_cs(void)
{
return pcmcia_register_driver(&fdomain_cs_driver);
}
示例10: init_orinoco_cs
static int __init
init_orinoco_cs(void)
{
return pcmcia_register_driver(&orinoco_driver);
}
示例11: init_btuart_cs
static int __init init_btuart_cs(void)
{
return pcmcia_register_driver(&btuart_driver);
}
示例12: btuart_config
static int btuart_config(struct pcmcia_device *link)
{
btuart_info_t *info = link->priv;
int i;
int try;
/* First pass: look for a config entry that looks normal.
Two tries: without IO aliases, then with aliases */
for (try = 0; try < 2; try++)
if (!pcmcia_loop_config(link, btuart_check_config, &try))
goto found_port;
/* Second pass: try to find an entry that isn't picky about
its base address, then try to grab any standard serial port
address, and finally try to get any free port. */
if (!pcmcia_loop_config(link, btuart_check_config_notpicky, NULL))
goto found_port;
BT_ERR("No usable port range found");
goto failed;
found_port:
i = pcmcia_request_irq(link, btuart_interrupt);
if (i != 0)
goto failed;
i = pcmcia_enable_device(link);
if (i != 0)
goto failed;
if (btuart_open(info) != 0)
goto failed;
return 0;
failed:
btuart_release(link);
return -ENODEV;
}
static void btuart_release(struct pcmcia_device *link)
{
btuart_info_t *info = link->priv;
btuart_close(info);
pcmcia_disable_device(link);
}
static const struct pcmcia_device_id btuart_ids[] = {
/* don't use this driver. Use serial_cs + hci_uart instead */
PCMCIA_DEVICE_NULL
};
MODULE_DEVICE_TABLE(pcmcia, btuart_ids);
static struct pcmcia_driver btuart_driver = {
.owner = THIS_MODULE,
.name = "btuart_cs",
.probe = btuart_probe,
.remove = btuart_detach,
.id_table = btuart_ids,
};
static int __init init_btuart_cs(void)
{
return pcmcia_register_driver(&btuart_driver);
}
static void __exit exit_btuart_cs(void)
{
pcmcia_unregister_driver(&btuart_driver);
}
module_init(init_btuart_cs);
module_exit(exit_btuart_cs);
示例13: init_ide_cs
static int __init init_ide_cs(void)
{
return pcmcia_register_driver(&ide_cs_driver);
}
示例14: avmcs_init
static int __init avmcs_init(void)
{
return pcmcia_register_driver(&avmcs_driver);
}
示例15: init_bluecard_cs
static int __init init_bluecard_cs(void)
{
return pcmcia_register_driver(&bluecard_driver);
}