本文整理汇总了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);
}
示例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);
}
示例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);
}
示例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);
}
示例5: fsl_i2c_init
static int __init fsl_i2c_init(void)
{
return driver_register(&fsl_i2c_driver);
}
示例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);
}
示例7: pxa2xx_ac97_init
static int __init pxa2xx_ac97_init(void)
{
return driver_register(&pxa2xx_ac97_driver);
}
示例8: mcp_driver_register
int mcp_driver_register(struct mcp_driver *mcpdrv)
{
mcpdrv->drv.bus = &mcp_bus_type;
return driver_register(&mcpdrv->drv);
}
示例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);
}
示例10: htif_register_driver
int htif_register_driver(struct htif_driver *drv)
{
drv->driver.bus = &htif_bus_type;
return driver_register(&drv->driver);
}
示例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;
//.........这里部分代码省略.........
示例12: snd_oxfw_init
static int __init snd_oxfw_init(void)
{
return driver_register(&oxfw_driver.driver);
}
示例13: h5400_ohci_init
static int __init
h5400_ohci_init (void)
{
return driver_register (&h5400_usb_device_driver);
}
示例14: ucb1400_ts_init
static int __init ucb1400_ts_init(void)
{
return driver_register(&ucb1400_ts_driver);
}
示例15: lm_driver_register
int lm_driver_register(struct lm_driver *drv)
{
drv->drv.bus = &lm_bustype;
return driver_register(&drv->drv);
}