示例#1
0
static int das08_pcmcia_attach(struct pcmcia_device *link)
{
	struct local_info_t *local;

	DEBUG(0, "das08_pcmcia_attach()\n");

	/* Allocate space for private device-specific data */
	local = kzalloc(sizeof(struct local_info_t), GFP_KERNEL);
	if (!local)
		return -ENOMEM;
	local->link = link;
	link->priv = local;

	/* Interrupt setup */
	link->irq.Attributes = IRQ_TYPE_EXCLUSIVE;
	link->irq.IRQInfo1 = IRQ_LEVEL_ID;
	link->irq.Handler = NULL;

	/*
	   General socket configuration defaults can go here.  In this
	   client, we assume very little, and rely on the CIS for almost
	   everything.  In most clients, many details (i.e., number, sizes,
	   and attributes of IO windows) are fixed by the nature of the
	   device, and can be hard-wired here.
	 */
	link->conf.Attributes = 0;
	link->conf.IntType = INT_MEMORY_AND_IO;

	cur_dev = link;

	das08_pcmcia_config(link);

	return 0;
}				/* das08_pcmcia_attach */
示例#2
0
static int das08_pcmcia_attach(struct pcmcia_device *link)
{
    struct local_info_t *local;

    DEBUG(0, "das08_pcmcia_attach()\n");


    local = kzalloc(sizeof(struct local_info_t), GFP_KERNEL);
    if (!local)
        return -ENOMEM;
    local->link = link;
    link->priv = local;


    link->irq.Attributes = IRQ_TYPE_EXCLUSIVE;
    link->irq.IRQInfo1 = IRQ_LEVEL_ID;
    link->irq.Handler = NULL;


    link->conf.Attributes = 0;
    link->conf.IntType = INT_MEMORY_AND_IO;

    cur_dev = link;

    das08_pcmcia_config(link);

    return 0;
}