当前位置: 首页>>代码示例>>C++>>正文


C++ pcmcia_disable_device函数代码示例

本文整理汇总了C++中pcmcia_disable_device函数的典型用法代码示例。如果您正苦于以下问题:C++ pcmcia_disable_device函数的具体用法?C++ pcmcia_disable_device怎么用?C++ pcmcia_disable_device使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了pcmcia_disable_device函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: avma1cs_config

static int __devinit avma1cs_config(struct pcmcia_device *link)
{
	int i = -1;
	char devname[128];
	IsdnCard_t	icard;
	int busy = 0;

	dev_dbg(&link->dev, "avma1cs_config(0x%p)\n", link);

	devname[0] = 0;
	if (link->prod_id[1])
		strlcpy(devname, link->prod_id[1], sizeof(devname));

	if (pcmcia_loop_config(link, avma1cs_configcheck, NULL))
		return -ENODEV;

	do {
		/*
		 * allocate an interrupt line
		 */
		if (!link->irq) {
			/* undo */
			pcmcia_disable_device(link);
			break;
		}

		/*
		 * configure the PCMCIA socket
		 */
		i = pcmcia_enable_device(link);
		if (i != 0) {
			pcmcia_disable_device(link);
			break;
		}

	} while (0);

	/* If any step failed, release any partially configured state */
	if (i != 0) {
		avma1cs_release(link);
		return -ENODEV;
	}

	icard.para[0] = link->irq;
	icard.para[1] = link->resource[0]->start;
	icard.protocol = isdnprot;
	icard.typ = ISDN_CTYPE_A1_PCMCIA;

	i = hisax_init_pcmcia(link, &busy, &icard);
	if (i < 0) {
		printk(KERN_ERR "avma1_cs: failed to initialize AVM A1 "
		       "PCMCIA %d at i/o %#x\n", i,
		       (unsigned int) link->resource[0]->start);
		avma1cs_release(link);
		return -ENODEV;
	}
	link->priv = (void *) (unsigned long) i;

	return 0;
} /* avma1cs_config */
开发者ID:0xroot,项目名称:Blackphone-BP1-Kernel,代码行数:60,代码来源:avma1_cs.c

示例2: ft1000_config

static int ft1000_config(struct pcmcia_device *link)
{
    int ret;

    dev_dbg(&link->dev, "ft1000_cs: ft1000_config(0x%p)\n", link);

    /* setup IO window */
    ret = pcmcia_loop_config(link, ft1000_confcheck, NULL);
    if (ret) {
        printk(KERN_INFO "ft1000: Could not configure pcmcia\n");
        return -ENODEV;
    }

    /* configure device */
    ret = pcmcia_enable_device(link);
    if (ret) {
        printk(KERN_INFO "ft1000: could not enable pcmcia\n");
        goto failed;
    }

    link->priv = init_ft1000_card(link, &ft1000_reset);
    if (!link->priv) {
        printk(KERN_INFO "ft1000: Could not register as network device\n");
        goto failed;
    }

    /* Finally, report what we've done */

    return 0;
failed:
    pcmcia_disable_device(link);
    return -ENODEV;
}
开发者ID:Red680812,项目名称:DNA_kitkat,代码行数:33,代码来源:ft1000_cs.c

示例3: ixj_cs_release

static void ixj_cs_release(struct pcmcia_device *link)
{
	ixj_info_t *info = link->priv;
	dev_dbg(&link->dev, "ixj_cs_release\n");
	info->ndev = 0;
	pcmcia_disable_device(link);
}
开发者ID:nos1609,项目名称:Chrono_Kernel-1,代码行数:7,代码来源:ixj_pcmcia.c

示例4: pdacf_config

static int pdacf_config(struct pcmcia_device *link)
{
	struct snd_pdacf *pdacf = link->priv;
	int ret;

	snd_printdd(KERN_DEBUG "pdacf_config called\n");
	link->conf.ConfigIndex = 0x5;

	ret = pcmcia_request_io(link);
	if (ret)
		goto failed;

	ret = pcmcia_request_exclusive_irq(link, pdacf_interrupt);
	if (ret)
		goto failed;

	ret = pcmcia_request_configuration(link, &link->conf);
	if (ret)
		goto failed;

	if (snd_pdacf_assign_resources(pdacf, link->resource[0]->start,
					link->irq) < 0)
		goto failed;

	return 0;

failed:
	pcmcia_disable_device(link);
	return -ENODEV;
}
开发者ID:3sOx,项目名称:asuswrt-merlin,代码行数:30,代码来源:pdaudiocf.c

示例5: sl811_cs_release

static void sl811_cs_release(struct pcmcia_device * link)
{
	dev_dbg(&link->dev, "sl811_cs_release\n");

	pcmcia_disable_device(link);
	platform_device_unregister(&platform_dev);
}
开发者ID:CSCLOG,项目名称:beaglebone,代码行数:7,代码来源:sl811_cs.c

示例6: sl811_cs_release

static void sl811_cs_release(struct pcmcia_device * link)
{
	DBG(0, "sl811_cs_release(0x%p)\n", link);

	pcmcia_disable_device(link);
	platform_device_unregister(&platform_dev);
}
开发者ID:BackupTheBerlios,项目名称:arp2-svn,代码行数:7,代码来源:sl811_cs.c

示例7: dtl1_detach

static void dtl1_detach(struct pcmcia_device *link)
{
	dtl1_info_t *info = link->priv;

	dtl1_close(info);
	pcmcia_disable_device(link);
}
开发者ID:24hours,项目名称:linux,代码行数:7,代码来源:dtl1_cs.c

示例8: ixj_cs_release

static void ixj_cs_release(struct pcmcia_device *link)
{
	ixj_info_t *info = link->priv;
	DEBUG(0, "ixj_cs_release(0x%p)\n", link);
	info->ndev = 0;
	pcmcia_disable_device(link);
}
开发者ID:3sOx,项目名称:asuswrt-merlin,代码行数:7,代码来源:ixj_pcmcia.c

示例9: aha152x_release_cs

static void aha152x_release_cs(struct pcmcia_device *link)
{
	scsi_info_t *info = link->priv;

	aha152x_release(info->host);
	pcmcia_disable_device(link);
}
开发者ID:Medvedroid,项目名称:OT_903D-kernel-2.6.35.7,代码行数:7,代码来源:aha152x_stub.c

示例10: comedi_pcmcia_disable

/**
 * comedi_pcmcia_disable() - Disable the PCMCIA device and release the regions.
 * @dev: comedi_device struct
 */
void comedi_pcmcia_disable(struct comedi_device *dev)
{
	struct pcmcia_device *link = comedi_to_pcmcia_dev(dev);

	if (link)
		pcmcia_disable_device(link);
}
开发者ID:AD5GB,项目名称:kernel_n5_3.10-experimental,代码行数:11,代码来源:comedi_pcmcia.c

示例11: pdacf_config

static int pdacf_config(struct pcmcia_device *link)
{
	struct snd_pdacf *pdacf = link->priv;
	int ret;

	snd_printdd(KERN_DEBUG "pdacf_config called\n");
	link->config_index = 0x5;
	link->config_flags |= CONF_ENABLE_IRQ | CONF_ENABLE_PULSE_IRQ;

	ret = pcmcia_request_io(link);
	if (ret)
		goto failed;

	ret = pcmcia_request_irq(link, pdacf_interrupt);
	if (ret)
		goto failed;

	ret = pcmcia_enable_device(link);
	if (ret)
		goto failed;

	if (snd_pdacf_assign_resources(pdacf, link->resource[0]->start,
					link->irq) < 0)
		goto failed;

	return 0;

failed:
	pcmcia_disable_device(link);
	return -ENODEV;
}
开发者ID:ARMWorks,项目名称:FA_2451_Linux_Kernel,代码行数:31,代码来源:pdaudiocf.c

示例12: btuart_release

static void btuart_release(struct pcmcia_device *link)
{
	btuart_info_t *info = link->priv;

	btuart_close(info);

	pcmcia_disable_device(link);
}
开发者ID:3sOx,项目名称:asuswrt-merlin,代码行数:8,代码来源:btuart_cs.c

示例13: ines_gpib_release

static void ines_gpib_release( struct pcmcia_device *link )
{
	DEBUG(0, "ines_gpib_release(0x%p)\n", link);
	/* Don't bother checking to see if these succeed or not */
	pcmcia_release_window(link->win);

	pcmcia_disable_device (link);
} /* gpib_release */
开发者ID:9072997,项目名称:wikireader,代码行数:8,代码来源:ines_cs.c

示例14: b43_pcmcia_remove

static void __devexit b43_pcmcia_remove(struct pcmcia_device *dev)
{
    struct ssb_bus *ssb = dev->priv;

    ssb_bus_unregister(ssb);
    pcmcia_disable_device(dev);
    kfree(ssb);
    dev->priv = NULL;
}
开发者ID:acassis,项目名称:emlinux-ssd1935,代码行数:9,代码来源:pcmcia.c

示例15: softingcs_remove

static __devexit void softingcs_remove(struct pcmcia_device *pcmcia)
{
	struct platform_device *pdev = pcmcia->priv;

	/* free bits */
	platform_device_unregister(pdev);
	/* release pcmcia stuff */
	pcmcia_disable_device(pcmcia);
}
开发者ID:0xroot,项目名称:Blackphone-BP1-Kernel,代码行数:9,代码来源:softing_cs.c


注:本文中的pcmcia_disable_device函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。