本文整理汇总了C++中pcmcia_release_configuration函数的典型用法代码示例。如果您正苦于以下问题:C++ pcmcia_release_configuration函数的具体用法?C++ pcmcia_release_configuration怎么用?C++ pcmcia_release_configuration使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了pcmcia_release_configuration函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: prism2_cs_suspend
static int prism2_cs_suspend(struct pcmcia_device *pdev)
{
struct wlandevice *wlandev;
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,17)
dev_link_t *link = dev_to_instance(pdev);
#endif
DBFENTER;
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,16)
wlandev = pdev->priv;
prism2sta_ifstate(wlandev, P80211ENUM_ifstate_disable);
#else
wlandev = link->priv;
link->state |= DEV_SUSPEND;
if (link->state & DEV_CONFIG) {
prism2sta_ifstate(wlandev, P80211ENUM_ifstate_disable);
pcmcia_release_configuration(link->handle);
}
#endif
DBFEXIT;
return 0;
}
开发者ID:kizukukoto,项目名称:WDN900_GPL,代码行数:27,代码来源:prism2_cs.c
示例2: avmcs_event
static int avmcs_event(event_t event, int priority,
event_callback_args_t *args)
{
dev_link_t *link = args->client_data;
switch (event) {
case CS_EVENT_CARD_REMOVAL:
link->state &= ~DEV_PRESENT;
if (link->state & DEV_CONFIG)
avmcs_release(link);
break;
case CS_EVENT_CARD_INSERTION:
link->state |= DEV_PRESENT | DEV_CONFIG_PENDING;
avmcs_config(link);
break;
case CS_EVENT_PM_SUSPEND:
link->state |= DEV_SUSPEND;
/* Fall through... */
case CS_EVENT_RESET_PHYSICAL:
if (link->state & DEV_CONFIG)
pcmcia_release_configuration(link->handle);
break;
case CS_EVENT_PM_RESUME:
link->state &= ~DEV_SUSPEND;
/* Fall through... */
case CS_EVENT_CARD_RESET:
if (link->state & DEV_CONFIG)
pcmcia_request_configuration(link->handle, &link->conf);
break;
}
return 0;
} /* avmcs_event */
开发者ID:Antonio-Zhou,项目名称:Linux-2.6.11,代码行数:32,代码来源:avm_cs.c
示例3: prism2sta_release
/*----------------------------------------------------------------
* prism2sta_release
*
* Half of the config/release pair. Usually called in response to
* a card ejection event. Checks to make sure no higher layers
* are still (or think they are) using the card via the link->open
* field.
*
* NOTE: Don't forget to increment the link->open variable in the
* device_open method, and decrement it in the device_close
* method.
*
* Arguments:
* arg a generic 32 bit variable. It's the value that
* we assigned to link->release.data in sta_attach().
*
* Returns:
* nothing
*
* Side effects:
* All resources should be released after this function
* executes and finds the device !open.
*
* Call context:
* Possibly in a timer context. Don't do anything that'll
* block.
----------------------------------------------------------------*/
void prism2sta_release(u_long arg)
{
dev_link_t *link = (dev_link_t *)arg;
DBFENTER;
/* First thing we should do is get the MSD back to the
* HWPRESENT state. I.e. everything quiescent.
*/
prism2sta_ifstate(link->priv, P80211ENUM_ifstate_disable);
if (link->open) {
/* TODO: I don't think we're even using this bit of code
* and I don't think it's hurting us at the moment.
*/
WLAN_LOG_DEBUG(1,
"prism2sta_cs: release postponed, '%s' still open\n",
link->dev->dev_name);
link->state |= DEV_STALE_CONFIG;
return;
}
pcmcia_release_configuration(link->handle);
pcmcia_release_io(link->handle, &link->io);
pcmcia_release_irq(link->handle, &link->irq);
link->state &= ~(DEV_CONFIG | DEV_RELEASE_PENDING);
DBFEXIT;
}
开发者ID:kizukukoto,项目名称:WDN900_GPL,代码行数:57,代码来源:prism2_cs.c
示例4: ide_release
void ide_release(dev_link_t *link)
{
ide_info_t *info = link->priv;
DEBUG(0, "ide_release(0x%p)\n", link);
if (info->ndev) {
/* FIXME: if this fails we need to queue the cleanup somehow
-- need to investigate the required PCMCIA magic */
ide_unregister(info->hd);
/* deal with brain dead IDE resource management */
request_region(link->io.BasePort1, link->io.NumPorts1,
info->node.dev_name);
if (link->io.NumPorts2)
request_region(link->io.BasePort2, link->io.NumPorts2,
info->node.dev_name);
}
info->ndev = 0;
link->dev = NULL;
pcmcia_release_configuration(link->handle);
pcmcia_release_io(link->handle, &link->io);
pcmcia_release_irq(link->handle, &link->irq);
link->state &= ~DEV_CONFIG;
} /* ide_release */
开发者ID:FelipeFernandes1988,项目名称:Alice-1121-Modem,代码行数:27,代码来源:ide-cs.c
示例5: serial_remove
static void serial_remove(dev_link_t *link)
{
struct serial_info *info = link->priv;
int i;
link->state &= ~DEV_PRESENT;
DEBUG(0, "serial_release(0x%p)\n", link);
/*
* Recheck to see if the device is still configured.
*/
if (info->link.state & DEV_CONFIG) {
for (i = 0; i < info->ndev; i++)
serial8250_unregister_port(info->line[i]);
info->link.dev = NULL;
if (!info->slave) {
pcmcia_release_configuration(info->link.handle);
pcmcia_release_io(info->link.handle, &info->link.io);
pcmcia_release_irq(info->link.handle, &info->link.irq);
}
info->link.state &= ~DEV_CONFIG;
}
}
开发者ID:kzlin129,项目名称:tt-gpl,代码行数:27,代码来源:serial_cs.c
示例6: sl811_cs_release
static void sl811_cs_release(dev_link_t * link)
{
DBG(0, "sl811_cs_release(0x%p)\n", link);
if (link->open) {
DBG(1, "sl811_cs: release postponed, '%s' still open\n",
link->dev->dev_name);
link->state |= DEV_STALE_CONFIG;
return;
}
/* Unlink the device chain */
link->dev = NULL;
platform_device_unregister(&platform_dev);
pcmcia_release_configuration(link->handle);
if (link->io.NumPorts1)
pcmcia_release_io(link->handle, &link->io);
if (link->irq.AssignedIRQ)
pcmcia_release_irq(link->handle, &link->irq);
link->state &= ~DEV_CONFIG;
if (link->state & DEV_STALE_LINK)
sl811_cs_detach(link);
}
开发者ID:kzlin129,项目名称:tt-gpl,代码行数:26,代码来源:sl811_cs.c
示例7: ixj_suspend
static int ixj_suspend(struct pcmcia_device *dev)
{
dev_link_t *link = dev_to_instance(dev);
link->state |= DEV_SUSPEND;
if (link->state & DEV_CONFIG)
pcmcia_release_configuration(link->handle);
return 0;
}
开发者ID:ena30,项目名称:snake-os,代码行数:10,代码来源:ixj_pcmcia.c
示例8: ixj_cs_release
static void ixj_cs_release(dev_link_t *link)
{
ixj_info_t *info = link->priv;
DEBUG(0, "ixj_cs_release(0x%p)\n", link);
info->ndev = 0;
link->dev = NULL;
pcmcia_release_configuration(link->handle);
pcmcia_release_io(link->handle, &link->io);
link->state &= ~DEV_CONFIG;
}
开发者ID:ena30,项目名称:snake-os,代码行数:10,代码来源:ixj_pcmcia.c
示例9: vxpocket_release
static void vxpocket_release(dev_link_t *link)
{
if (link->state & DEV_CONFIG) {
/* release cs resources */
pcmcia_release_configuration(link->handle);
pcmcia_release_io(link->handle, &link->io);
pcmcia_release_irq(link->handle, &link->irq);
link->state &= ~DEV_CONFIG;
}
}
开发者ID:plbossart,项目名称:alsa-driver-build,代码行数:10,代码来源:vxpocket-2.6.16.c
示例10: nmclan_release
/* ----------------------------------------------------------------------------
nmclan_release
After a card is removed, nmclan_release() will unregister the
net device, and release the PCMCIA configuration. If the device
is still open, this will be postponed until it is closed.
---------------------------------------------------------------------------- */
static void nmclan_release(dev_link_t *link)
{
DEBUG(0, "nmclan_release(0x%p)\n", link);
pcmcia_release_configuration(link->handle);
pcmcia_release_io(link->handle, &link->io);
pcmcia_release_irq(link->handle, &link->irq);
link->state &= ~DEV_CONFIG;
}
开发者ID:ena30,项目名称:snake-os,代码行数:17,代码来源:nmclan_cs.c
示例11: prism2_cs_remove
static void prism2_cs_remove(struct pcmcia_device *pdev)
{
struct wlandevice *wlandev;
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,17)
dev_link_t *link = dev_to_instance(pdev);
#endif
DBFENTER;
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,16)
wlandev = pdev->priv;
#else
wlandev = link->priv;
#endif
if (wlandev) {
p80211netdev_hwremoved(wlandev);
unregister_wlandev(wlandev);
wlan_unsetup(wlandev);
if (wlandev->priv) {
hfa384x_t *hw = wlandev->priv;
wlandev->priv = NULL;
if (hw) {
hfa384x_destroy(hw);
kfree(hw);
}
}
kfree(wlandev);
}
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,16)
pdev->priv = NULL;
pcmcia_disable_device(pdev);
#else
if (link->state & DEV_CONFIG) {
if (link->win)
pcmcia_release_window(link->win);
pcmcia_release_configuration(link->handle);
if (link->io.NumPorts1)
pcmcia_release_io(link->handle, &link->io);
if (link->irq.AssignedIRQ)
pcmcia_release_irq(link->handle, &link->irq);
link->state &= ~DEV_CONFIG;
}
link->priv = NULL;
kfree(link);
#endif
DBFEXIT;
return;
}
开发者ID:kizukukoto,项目名称:WDN900_GPL,代码行数:54,代码来源:prism2_cs.c
示例12: pdacf_config
static void pdacf_config(dev_link_t *link)
{
client_handle_t handle = link->handle;
struct snd_pdacf *pdacf = link->priv;
tuple_t tuple;
cisparse_t *parse = NULL;
config_info_t conf;
u_short buf[32];
int last_fn, last_ret;
snd_printdd(KERN_DEBUG "pdacf_config called\n");
parse = kmalloc(sizeof(*parse), GFP_KERNEL);
if (! parse) {
snd_printk(KERN_ERR "pdacf_config: cannot allocate\n");
return;
}
tuple.DesiredTuple = CISTPL_CFTABLE_ENTRY;
tuple.Attributes = 0;
tuple.TupleData = (cisdata_t *)buf;
tuple.TupleDataMax = sizeof(buf);
tuple.TupleOffset = 0;
tuple.DesiredTuple = CISTPL_CONFIG;
CS_CHECK(GetFirstTuple, pcmcia_get_first_tuple(handle, &tuple));
CS_CHECK(GetTupleData, pcmcia_get_tuple_data(handle, &tuple));
CS_CHECK(ParseTuple, pcmcia_parse_tuple(handle, &tuple, parse));
link->conf.ConfigBase = parse->config.base;
link->conf.ConfigIndex = 0x5;
kfree(parse);
CS_CHECK(GetConfigurationInfo, pcmcia_get_configuration_info(handle, &conf));
link->conf.Vcc = conf.Vcc;
/* Configure card */
link->state |= DEV_CONFIG;
CS_CHECK(RequestIO, pcmcia_request_io(handle, &link->io));
CS_CHECK(RequestIRQ, pcmcia_request_irq(link->handle, &link->irq));
CS_CHECK(RequestConfiguration, pcmcia_request_configuration(link->handle, &link->conf));
if (snd_pdacf_assign_resources(pdacf, link->io.BasePort1, link->irq.AssignedIRQ) < 0)
goto failed;
link->dev = &pdacf->node;
link->state &= ~DEV_CONFIG_PENDING;
return;
cs_failed:
cs_error(link->handle, last_fn, last_ret);
failed:
pcmcia_release_configuration(link->handle);
pcmcia_release_io(link->handle, &link->io);
pcmcia_release_irq(link->handle, &link->irq);
}
开发者ID:canalplus,项目名称:r7oss,代码行数:53,代码来源:pdaudiocf-2.6.16.c
示例13: elsa_suspend
static int elsa_suspend(struct pcmcia_device *p_dev)
{
dev_link_t *link = dev_to_instance(p_dev);
local_info_t *dev = link->priv;
link->state |= DEV_SUSPEND;
dev->busy = 1;
if (link->state & DEV_CONFIG)
pcmcia_release_configuration(link->handle);
return 0;
}
开发者ID:jameshilliard,项目名称:actiontec_opensrc_mi424wr-rev-ef_fw-20-19-8,代码行数:12,代码来源:elsa_cs.c
示例14: vxpocket_event
/*
* event callback
*/
static int vxpocket_event(event_t event, int priority, event_callback_args_t *args)
{
dev_link_t *link = args->client_data;
vx_core_t *chip = link->priv;
switch (event) {
case CS_EVENT_CARD_REMOVAL:
snd_printdd(KERN_DEBUG "CARD_REMOVAL..\n");
link->state &= ~DEV_PRESENT;
if (link->state & DEV_CONFIG)
chip->chip_status |= VX_STAT_IS_STALE;
break;
case CS_EVENT_CARD_INSERTION:
snd_printdd(KERN_DEBUG "CARD_INSERTION..\n");
link->state |= DEV_PRESENT | DEV_CONFIG_PENDING;
vxpocket_config(link);
break;
#ifdef CONFIG_PM
case CS_EVENT_PM_SUSPEND:
snd_printdd(KERN_DEBUG "SUSPEND\n");
link->state |= DEV_SUSPEND;
if (chip && chip->card->pm_suspend) {
snd_printdd(KERN_DEBUG "snd_vx_suspend calling\n");
chip->card->pm_suspend(chip->card, PMSG_SUSPEND);
}
/* Fall through... */
case CS_EVENT_RESET_PHYSICAL:
snd_printdd(KERN_DEBUG "RESET_PHYSICAL\n");
if (link->state & DEV_CONFIG)
pcmcia_release_configuration(link->handle);
break;
case CS_EVENT_PM_RESUME:
snd_printdd(KERN_DEBUG "RESUME\n");
link->state &= ~DEV_SUSPEND;
/* Fall through... */
case CS_EVENT_CARD_RESET:
snd_printdd(KERN_DEBUG "CARD_RESET\n");
if (DEV_OK(link)) {
//struct snd_vxpocket *vxp = (struct snd_vxpocket *)chip;
snd_printdd(KERN_DEBUG "requestconfig...\n");
pcmcia_request_configuration(link->handle, &link->conf);
if (chip && chip->card->pm_resume) {
snd_printdd(KERN_DEBUG "calling snd_vx_resume\n");
chip->card->pm_resume(chip->card);
}
}
snd_printdd(KERN_DEBUG "resume done!\n");
break;
#endif
}
return 0;
}
开发者ID:BackupTheBerlios,项目名称:tew632-brp-svn,代码行数:55,代码来源:vxpocket.c
示例15: aha152x_release_cs
static void aha152x_release_cs(dev_link_t *link)
{
scsi_info_t *info = link->priv;
aha152x_release(info->host);
link->dev = NULL;
pcmcia_release_configuration(link->handle);
pcmcia_release_io(link->handle, &link->io);
pcmcia_release_irq(link->handle, &link->irq);
link->state &= ~DEV_CONFIG;
}
开发者ID:Antonio-Zhou,项目名称:Linux-2.6.11,代码行数:13,代码来源:aha152x_stub.c
示例16: serial_suspend
static void serial_suspend(dev_link_t *link)
{
link->state |= DEV_SUSPEND;
if (link->state & DEV_CONFIG) {
struct serial_info *info = link->priv;
int i;
for (i = 0; i < info->ndev; i++)
serial8250_suspend_port(info->line[i]);
if (!info->slave)
pcmcia_release_configuration(link->handle);
}
}
开发者ID:kzlin129,项目名称:tt-gpl,代码行数:15,代码来源:serial_cs.c
示例17: nmclan_suspend
static int nmclan_suspend(struct pcmcia_device *p_dev)
{
dev_link_t *link = dev_to_instance(p_dev);
struct net_device *dev = link->priv;
link->state |= DEV_SUSPEND;
if (link->state & DEV_CONFIG) {
if (link->open)
netif_device_detach(dev);
pcmcia_release_configuration(link->handle);
}
return 0;
}
开发者ID:ena30,项目名称:snake-os,代码行数:15,代码来源:nmclan_cs.c
示例18: vxpocket_release
static void vxpocket_release(dev_link_t *link)
{
if (link->state & DEV_CONFIG) {
/* release cs resources */
pcmcia_release_configuration(link->handle);
pcmcia_release_io(link->handle, &link->io);
pcmcia_release_irq(link->handle, &link->irq);
link->state &= ~DEV_CONFIG;
}
if (link->handle) {
/* Break the link with Card Services */
pcmcia_deregister_client(link->handle);
link->handle = NULL;
}
}
开发者ID:BackupTheBerlios,项目名称:tew632-brp-svn,代码行数:15,代码来源:vxpocket.c
示例19: btuart_release
static void btuart_release(dev_link_t *link)
{
btuart_info_t *info = link->priv;
if (link->state & DEV_PRESENT)
btuart_close(info);
link->dev = NULL;
pcmcia_release_configuration(link->handle);
pcmcia_release_io(link->handle, &link->io);
pcmcia_release_irq(link->handle, &link->irq);
link->state &= ~DEV_CONFIG;
}
开发者ID:GodFox,项目名称:magx_kernel_xpixl,代码行数:15,代码来源:btuart_cs.c
示例20: pcmciamtd_release
static void pcmciamtd_release(dev_link_t *link)
{
struct pcmciamtd_dev *dev = link->priv;
DEBUG(3, "link = 0x%p", link);
if (link->win) {
if(dev->win_base) {
iounmap(dev->win_base);
dev->win_base = NULL;
}
pcmcia_release_window(link->win);
}
pcmcia_release_configuration(link->handle);
link->state &= ~DEV_CONFIG;
}
开发者ID:nighthawk149,项目名称:fvs318g-cfw,代码行数:16,代码来源:pcmciamtd.c
注:本文中的pcmcia_release_configuration函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论