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


C++ driver_register函数代码示例

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


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

示例1: snd_tscm_init

static int __init snd_tscm_init(void)
{
	return driver_register(&tscm_driver.driver);
}
开发者ID:ReneNyffenegger,项目名称:linux,代码行数:4,代码来源:tascam.c

示例2: ide_gd_init

static int __init ide_gd_init(void)
{
	printk(KERN_INFO DRV_NAME " driver " IDE_GD_VERSION "\n");
	return driver_register(&ide_gd_driver.gen_driver);
}
开发者ID:embest-tech,项目名称:rowboat-kernel,代码行数:5,代码来源:ide-gd.c

示例3: s3c24xx_serial_init

int s3c24xx_serial_init(struct device_driver *drv,
			struct s3c24xx_uart_info *info)
{
	dbg("s3c24xx_serial_init(%p,%p)\n", drv, info);
	return driver_register(drv);
}
开发者ID:QiuLihua83,项目名称:linux-2.6.10,代码行数:6,代码来源:s3c2410.c

示例4: register_rpmsg_driver

/**
 * register_rpmsg_driver() - register an rpmsg driver with the rpmsg bus
 * @rpdrv: pointer to a struct rpmsg_driver
 *
 * Returns 0 on success, and an appropriate error value on failure.
 */
int register_rpmsg_driver(struct rpmsg_driver *rpdrv)
{
	rpdrv->drv.bus = &rpmsg_bus;
	return driver_register(&rpdrv->drv);
}
开发者ID:SovanKundu,项目名称:linux-xlnx,代码行数:11,代码来源:virtio_rpmsg_bus.c

示例5: fsl_i2c_init

static int __init fsl_i2c_init(void)
{
	return driver_register(&fsl_i2c_driver);
}
开发者ID:Dronevery,项目名称:JetsonTK1-kernel,代码行数:4,代码来源:i2c-mpc.c

示例6: sunxi_rsb_driver_register

/**
 * sunxi_rsb_driver_register() - Register device driver with RSB core
 * @rdrv:	device driver to be associated with slave-device.
 *
 * This API will register the client driver with the RSB framework.
 * It is typically called from the driver's module-init function.
 */
int sunxi_rsb_driver_register(struct sunxi_rsb_driver *rdrv)
{
	rdrv->driver.bus = &sunxi_rsb_bus;
	return driver_register(&rdrv->driver);
}
开发者ID:0-T-0,项目名称:ps4-linux,代码行数:12,代码来源:sunxi-rsb.c

示例7: pxa2xx_ac97_init

static int __init pxa2xx_ac97_init(void)
{
	return driver_register(&pxa2xx_ac97_driver);
}
开发者ID:GodFox,项目名称:magx_kernel_xpixl,代码行数:4,代码来源:pxa2xx-ac97.c

示例8: mcp_driver_register

int mcp_driver_register(struct mcp_driver *mcpdrv)
{
	mcpdrv->drv.bus = &mcp_bus_type;
	return driver_register(&mcpdrv->drv);
}
开发者ID:romanbb,项目名称:android_kernel_lge_d851,代码行数:5,代码来源:mcp-core.c

示例9: nvec_register_driver

int nvec_register_driver(struct nvec_driver *drv)
{
	drv->driver.name = drv->name;
	drv->driver.bus = &nvec_bus_type;
	return driver_register(&drv->driver);
}
开发者ID:0x0f,项目名称:adam-kernel,代码行数:6,代码来源:nvec_user.c

示例10: htif_register_driver

int htif_register_driver(struct htif_driver *drv)
{
	drv->driver.bus = &htif_bus_type;
	return driver_register(&drv->driver);
}
开发者ID:arunthomas,项目名称:riscv-linux,代码行数:5,代码来源:htif-drv.c

示例11: init_tcic

static int __init init_tcic(void)
{
    int i, sock, ret = 0;
    u_int mask, scan;

    if (driver_register(&tcic_driver))
	return -1;
    
    printk(KERN_INFO "Databook TCIC-2 PCMCIA probe: ");
    sock = 0;

    if (!request_region(tcic_base, 16, "tcic-2")) {
	printk("could not allocate ports,\n ");
	driver_unregister(&tcic_driver);
	return -ENODEV;
    }
    else {
	tcic_setw(TCIC_ADDR, 0);
	if (tcic_getw(TCIC_ADDR) == 0) {
	    tcic_setw(TCIC_ADDR, 0xc3a5);
	    if (tcic_getw(TCIC_ADDR) == 0xc3a5) sock = 2;
	}
	if (sock == 0) {
	    /* See if resetting the controller does any good */
	    tcic_setb(TCIC_SCTRL, TCIC_SCTRL_RESET);
	    tcic_setb(TCIC_SCTRL, 0);
	    tcic_setw(TCIC_ADDR, 0);
	    if (tcic_getw(TCIC_ADDR) == 0) {
		tcic_setw(TCIC_ADDR, 0xc3a5);
		if (tcic_getw(TCIC_ADDR) == 0xc3a5) sock = 2;
	    }
	}
    }
    if (sock == 0) {
	printk("not found.\n");
	release_region(tcic_base, 16);
	driver_unregister(&tcic_driver);
	return -ENODEV;
    }

    sockets = 0;
    for (i = 0; i < sock; i++) {
	if ((i == ignore) || is_active(i)) continue;
	socket_table[sockets].psock = i;
	socket_table[sockets].id = get_tcic_id();

	socket_table[sockets].socket.owner = THIS_MODULE;
	/* only 16-bit cards, memory windows must be size-aligned */
	/* No PCI or CardBus support */
	socket_table[sockets].socket.features = SS_CAP_PCCARD | SS_CAP_MEM_ALIGN;
	/* irq 14, 11, 10, 7, 6, 5, 4, 3 */
	socket_table[sockets].socket.irq_mask = 0x4cf8;
	/* 4K minimum window size */
	socket_table[sockets].socket.map_size = 0x1000;		
	sockets++;
    }

    switch (socket_table[0].id) {
    case TCIC_ID_DB86082:
	printk("DB86082"); break;
    case TCIC_ID_DB86082A:
	printk("DB86082A"); break;
    case TCIC_ID_DB86084:
	printk("DB86084"); break;
    case TCIC_ID_DB86084A:
	printk("DB86084A"); break;
    case TCIC_ID_DB86072:
	printk("DB86072"); break;
    case TCIC_ID_DB86184:
	printk("DB86184"); break;
    case TCIC_ID_DB86082B:
	printk("DB86082B"); break;
    default:
	printk("Unknown ID 0x%02x", socket_table[0].id);
    }
    
    /* Set up polling */
    poll_timer.function = &tcic_timer;
    poll_timer.data = 0;
    init_timer(&poll_timer);

    /* Build interrupt mask */
    printk(", %d sockets\n" KERN_INFO "  irq list (", sockets);
    if (irq_list_count == 0)
	mask = irq_mask;
    else
	for (i = mask = 0; i < irq_list_count; i++)
	    mask |= (1<<irq_list[i]);

    /* irq 14, 11, 10, 7, 6, 5, 4, 3 */
    mask &= 0x4cf8;
    /* Scan interrupts */
    mask = irq_scan(mask);
    for (i=0;i<sockets;i++)
	    socket_table[i].socket.irq_mask = mask;
    
    /* Check for only two interrupts available */
    scan = (mask & (mask-1));
    if (((scan & (scan-1)) == 0) && (poll_interval == 0))
	poll_interval = HZ;
//.........这里部分代码省略.........
开发者ID:BackupTheBerlios,项目名称:tew632-brp-svn,代码行数:101,代码来源:tcic.c

示例12: snd_oxfw_init

static int __init snd_oxfw_init(void)
{
	return driver_register(&oxfw_driver.driver);
}
开发者ID:383530895,项目名称:linux,代码行数:4,代码来源:oxfw.c

示例13: h5400_ohci_init

static int __init
h5400_ohci_init (void)
{
	return driver_register (&h5400_usb_device_driver);
}
开发者ID:ManiacTwister,项目名称:linux-hnd,代码行数:5,代码来源:h5400_wifi.c

示例14: ucb1400_ts_init

static int __init ucb1400_ts_init(void)
{
	return driver_register(&ucb1400_ts_driver);
}
开发者ID:LouZiffer,项目名称:m900_kernel_cupcake-SDX,代码行数:4,代码来源:ucb1400_ts.c

示例15: lm_driver_register

int lm_driver_register(struct lm_driver *drv)
{
	drv->drv.bus = &lm_bustype;
	return driver_register(&drv->drv);
}
开发者ID:laitianli,项目名称:loongson-linux-2.6.36-3_mips,代码行数:5,代码来源:lm.c


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