• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ driver_remove_file函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: bus_remove_driver

void bus_remove_driver(struct device_driver * drv)
{
	if (drv->bus) {
		driver_remove_file(drv, &driver_attr_bind);
		driver_remove_file(drv, &driver_attr_unbind);
		driver_remove_attrs(drv->bus, drv);
		klist_remove(&drv->knode_bus);
		pr_debug("bus %s: remove driver %s\n", drv->bus->name, drv->name);
		driver_detach(drv);
		module_remove_driver(drv);
		kobject_unregister(&drv->kobj);
		put_bus(drv->bus);
	}
}
开发者ID:BackupTheBerlios,项目名称:tew632-brp-svn,代码行数:14,代码来源:bus.c


示例2: imx_3stack_ak4647_remove

static int __devexit imx_3stack_ak4647_remove(struct platform_device *pdev)
{
	struct mxc_audio_platform_data *dev_data = pdev->dev.platform_data;
	free_irq(dev_data->intr_id_hp, NULL);
	driver_remove_file(pdev->dev.driver, &driver_attr_headphone);
	return 0;
}
开发者ID:YCsuperlife,项目名称:imx53_kernel,代码行数:7,代码来源:imx-3stack-ak4647.c


示例3: dma_memcpy_remove

static int  dma_memcpy_remove(struct platform_device *pdev)
{
    int ret;
    driver_remove_file(&pdev->dev, &driver_attr_dmamemcpy);
  
    return 0;
}
开发者ID:smartassfox,项目名称:kernel-2.6.32.27-M722HC,代码行数:7,代码来源:memcpy_dma.c


示例4: rk28_ts_ak4183_exit

static void __exit rk28_ts_ak4183_exit(void)
{
	D("enter!\n");

    driver_remove_file(&ak4183_i2c_driver.driver, &driver_attr_touchcheck);
    driver_remove_file(&ak4183_i2c_driver.driver, &driver_attr_touchadc);
    driver_remove_file(&ak4183_i2c_driver.driver, &driver_attr_calistatus);
	driver_remove_file(&ak4183_i2c_driver.driver, &driver_attr_debug_ak4183);

	i2c_del_driver(&ak4183_i2c_driver);
	free_irq(7, NULL);
	input_unregister_device(g_ts_dev->input);
	input_free_device(g_ts_dev->input);
	kfree(g_ts_dev);
	g_ts_dev = NULL;
开发者ID:Tigrouzen,项目名称:k1099,代码行数:15,代码来源:rk28_i2c_ak4183_back.c


示例5: fpga_uinput_exit

static void __exit fpga_uinput_exit(void)
{
	free_irq(UINPUT_INT_NUM, NULL);
	iounmap(fpga_uinput_mem);
	release_mem_region(UINPUT_BASE, UINPUT_SIZE);
	driver_remove_file(&fpga_uinput_driver, &driver_attr_fpga_uinput);
	driver_unregister(&fpga_uinput_driver);
}
开发者ID:zhemao,项目名称:interrupt_example,代码行数:8,代码来源:fpga_uinput.c


示例6: unregister_cu3088_discipline

void
unregister_cu3088_discipline(struct ccwgroup_driver *dcp)
{
	if (!dcp)
		return;

	driver_remove_file(&dcp->driver, &driver_attr_group);
	ccwgroup_driver_unregister(dcp);
}
开发者ID:xricson,项目名称:knoppix,代码行数:9,代码来源:cu3088.c


示例7: driver_remove_attrs

static void driver_remove_attrs(struct bus_type * bus, struct device_driver * drv)
{
	int i;

	if (bus->drv_attrs) {
		for (i = 0; attr_name(bus->drv_attrs[i]); i++)
			driver_remove_file(drv, &bus->drv_attrs[i]);
	}
}
开发者ID:xf739645524,项目名称:kernel-rhel5,代码行数:9,代码来源:bus.c


示例8: hfc_init_module

static int __init hfc_init_module(void)
{
	int err;

	hfc_msg(KERN_INFO, hfc_DRIVER_DESCR " loading\n");

	atomic_set(&module_refcnt, 0);

	hfc_hdlc_framer_class = ks_feature_register("hdlc_framer");
	if (!hfc_hdlc_framer_class) {
		err = -ENOMEM;
		goto err_register_hdlc_framer;
	}

	hfc_hdlc_deframer_class = ks_feature_register("hdlc_deframer");
	if (!hfc_hdlc_deframer_class) {
		err = -ENOMEM;
		goto err_register_hdlc_deframer;
	}

	hfc_octet_reverser_class = ks_feature_register("octet_reverser");
	if (!hfc_octet_reverser_class) {
		err = -ENOMEM;
		goto err_register_octet_reverser;
	}

	err = pci_register_driver(&hfc_driver);
	if (err < 0)
		goto err_pci_register_driver;

#ifdef DEBUG_CODE
	err = driver_create_file(
		&hfc_driver.driver,
		&driver_attr_debug_level);
	if (err < 0)
		goto err_create_file_debug_level;
#endif

	return 0;

#ifdef DEBUG_CODE
	driver_remove_file(
		&hfc_driver.driver,
		&driver_attr_debug_level);
err_create_file_debug_level:
#endif
err_pci_register_driver:
	ks_feature_unregister(hfc_octet_reverser_class);
err_register_octet_reverser:
	ks_feature_unregister(hfc_hdlc_deframer_class);
err_register_hdlc_deframer:
	ks_feature_unregister(hfc_hdlc_framer_class);
err_register_hdlc_framer:

	return err;
}
开发者ID:GunioRobot,项目名称:vstuff,代码行数:56,代码来源:hfc-4s_main.c


示例9: dgnc_remove_driver_sysfiles

void dgnc_remove_driver_sysfiles(struct pci_driver *dgnc_driver)
{
	struct device_driver *driverfs = &dgnc_driver->driver;
	driver_remove_file(driverfs, &driver_attr_version);
	driver_remove_file(driverfs, &driver_attr_boards);
	driver_remove_file(driverfs, &driver_attr_maxboards);
	driver_remove_file(driverfs, &driver_attr_debug);
	driver_remove_file(driverfs, &driver_attr_rawreadok);
	driver_remove_file(driverfs, &driver_attr_pollrate);
	driver_remove_file(driverfs, &driver_attr_pollcounter);
	driver_remove_file(driverfs, &driver_attr_state);
}
开发者ID:AeroGirl,项目名称:VAR-SOM-AM33-SDK7-Kernel,代码行数:12,代码来源:dgnc_sysfs.c


示例10: _PutPower

gceSTATUS
_PutPower(
    IN gckPLATFORM Platform
    )
{
    struct imx_priv *priv = Platform->priv;

    /*Disable clock*/
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)
    if (priv->clk_3d_axi) {
       clk_put(priv->clk_3d_axi);
       priv->clk_3d_axi = NULL;
    }
#endif
    if (priv->clk_3d_core) {
       clk_put(priv->clk_3d_core);
       priv->clk_3d_core = NULL;
    }
    if (priv->clk_3d_shader) {
       clk_put(priv->clk_3d_shader);
       priv->clk_3d_shader = NULL;
    }
    if (priv->clk_2d_core) {
       clk_put(priv->clk_2d_core);
       priv->clk_2d_core = NULL;
    }
    if (priv->clk_2d_axi) {
       clk_put(priv->clk_2d_axi);
       priv->clk_2d_axi = NULL;
    }
    if (priv->clk_vg_axi) {
       clk_put(priv->clk_vg_axi);
       priv->clk_vg_axi = NULL;
    }

#ifdef CONFIG_PM
    if(priv->pmdev)
        pm_runtime_disable(priv->pmdev);
#endif

#if LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0)
    if (priv->gpu_regulator) {
       regulator_put(priv->gpu_regulator);
       priv->gpu_regulator = NULL;
    }
#endif

#if gcdENABLE_FSCALE_VAL_ADJUST
    UNREG_THERMAL_NOTIFIER(&thermal_hot_pm_notifier);

    driver_remove_file(pdevice->dev.driver, &driver_attr_gpu3DMinClock);
#endif

    return gcvSTATUS_OK;
}
开发者ID:Trimblejena,项目名称:HurricaneBSP-linux-fslc-imx-3.14-1.1.x,代码行数:55,代码来源:gc_hal_kernel_platform_imx6q14.c


示例11: imx_3stack_alc5623_remove

static int imx_3stack_alc5623_remove(struct platform_device *pdev)
{
	struct mxc_audio_platform_data *plat = pdev->dev.platform_data;
	struct imx_3stack_priv *priv = &card_priv;

	if (plat->finit)
		plat->finit();

	driver_remove_file(pdev->dev.driver, &driver_attr_headphone);

	return 0;
}
开发者ID:brunotl,项目名称:kernel-kobo-mx50-ntx,代码行数:12,代码来源:imx-3stack-alc5623.c


示例12: kpd_delete_attr

/*----------------------------------------------------------------------------*/
static int kpd_delete_attr(struct device_driver *driver)
{
	int idx, err = 0;
	int num = (int)(sizeof(kpd_attr_list) / sizeof(kpd_attr_list[0]));

	if (!driver)
		return -EINVAL;

	for (idx = 0; idx < num; idx++)
		driver_remove_file(driver, kpd_attr_list[idx]);

	return err;
}
开发者ID:mohancm100,项目名称:android_kernel_lenovo_A7010a48,代码行数:14,代码来源:kpd.c


示例13: test_create_file

/*
 * test_create_file
 *	make test call to create sysfs file for the
 *	driver and if that call is successful then
 *	make a call to remove the file
 */
static int test_create_file() {
	struct device_driver *drv = &test_driver;

	if (driver_create_file(drv, &driver_attr_new_id)) {
		printk("tbase: failed create sysfs file\n");
		return 1;
	}
	else {
		printk("tbase: created sysfs file\n");
		driver_remove_file(drv, &driver_attr_new_id);
		return 0;
	}

}
开发者ID:joyforu,项目名称:android-ltp-ndk,代码行数:20,代码来源:tbase.c


示例14: altera_cvp_remove

static void altera_cvp_remove(struct pci_dev *pdev)
{
	struct fpga_manager *mgr = pci_get_drvdata(pdev);
	struct altera_cvp_conf *conf = mgr->priv;
	u16 cmd;

	driver_remove_file(&altera_cvp_driver.driver, &driver_attr_chkcfg);
	fpga_mgr_unregister(&pdev->dev);
	pci_iounmap(pdev, conf->map);
	pci_release_region(pdev, CVP_BAR);
	pci_read_config_word(pdev, PCI_COMMAND, &cmd);
	cmd &= ~PCI_COMMAND_MEMORY;
	pci_write_config_word(pdev, PCI_COMMAND, cmd);
}
开发者ID:Gentoo-zh,项目名称:linux-cjktty,代码行数:14,代码来源:altera-cvp.c


示例15: shf_delete_attr

/*----------------------------------------------------------------------------*/
static int shf_delete_attr(struct device_driver *driver)
{
    int idx ,err = 0;
    int num = (int)(sizeof(shf_attr_list)/sizeof(shf_attr_list[0]));

    if(driver == NULL) {
        return -EINVAL;
    }

    for(idx = 0; idx < num; idx++) {
        driver_remove_file(driver, shf_attr_list[idx]);
    }
    
    return err;
}
开发者ID:Elnter,项目名称:j608_kernel,代码行数:16,代码来源:shf_kernel.c


示例16: bus_remove_driver

/**
 * bus_remove_driver - delete driver from bus's knowledge.
 * @drv: driver.
 *
 * Detach the driver from the devices it controls, and remove
 * it from its bus's list of drivers. Finally, we drop the reference
 * to the bus we took in bus_add_driver().
 */
void bus_remove_driver(struct device_driver *drv)
{
	if (!drv->bus)
		return;

	remove_bind_files(drv);
	driver_remove_attrs(drv->bus, drv);
	driver_remove_file(drv, &driver_attr_uevent);
	klist_remove(&drv->p->knode_bus);
	pr_debug("bus: '%s': remove driver %s\n", drv->bus->name, drv->name);
	driver_detach(drv);
	module_remove_driver(drv);
	kobject_put(&drv->p->kobj);
	bus_put(drv->bus);
}
开发者ID:johnny,项目名称:CobraDroidBeta,代码行数:23,代码来源:bus.c


示例17: hfc_module_exit

static void __exit hfc_module_exit(void)
{
printk(KERN_DEBUG "module_exit()\n");

#ifdef DEBUG_CODE
	driver_remove_file(
		&hfc_driver.driver,
		&driver_attr_debug_level);
#endif

	pci_unregister_driver(&hfc_driver);

	ks_feature_unregister(hfc_octet_reverser_class);
	ks_feature_unregister(hfc_hdlc_deframer_class);
	ks_feature_unregister(hfc_hdlc_framer_class);

	hfc_msg(KERN_INFO, hfc_DRIVER_DESCR " unloaded\n");
}
开发者ID:GunioRobot,项目名称:vstuff,代码行数:18,代码来源:hfc-4s_main.c


示例18: yas537_delete_attr

static int yas537_delete_attr(struct device_driver *driver)
{
	int ret = 0;
	int i = 0;
	int num = sizeof(yas537_attr_list)/sizeof(yas537_attr_list[0]);

	if(NULL == driver)
	{
		return -EINVAL;
	}
	for(i = 0; i < num; i++)
	{
		driver_remove_file(driver, yas537_attr_list[i]);
	}
	
	return ret;

}
开发者ID:hacknmtk,项目名称:android_kernel_alcatel_5017,代码行数:18,代码来源:yas_mag_kernel.c


示例19: fpga_uinput_init

static int __init fpga_uinput_init(void)
{
	int ret;
	struct resource *res;

	ret = driver_register(&fpga_uinput_driver);
	if (ret < 0)
		goto fail_driver_register;

	ret = driver_create_file(&fpga_uinput_driver,
			&driver_attr_fpga_uinput);
	if (ret < 0)
		goto fail_create_file;

	res = request_mem_region(UINPUT_BASE, UINPUT_SIZE, "fpga_uinput");
	if (res == NULL) {
		ret = -EBUSY;
		goto fail_request_mem;
	}

	fpga_uinput_mem = ioremap(UINPUT_BASE, UINPUT_SIZE);
	if (fpga_uinput_mem == NULL) {
		ret = -EFAULT;
		goto fail_ioremap;
	}

	ret = request_irq(UINPUT_INT_NUM, fpga_uinput_interrupt,
			0, "fpga_uinput", NULL);
	if (ret < 0)
		goto fail_request_irq;

	return 0;

fail_request_irq:
	iounmap(fpga_uinput_mem);
fail_ioremap:
	release_mem_region(UINPUT_BASE, UINPUT_SIZE);
fail_request_mem:
	driver_remove_file(&fpga_uinput_driver, &driver_attr_fpga_uinput);
fail_create_file:
	driver_unregister(&fpga_uinput_driver);
fail_driver_register:
	return ret;
}
开发者ID:zhemao,项目名称:interrupt_example,代码行数:44,代码来源:fpga_uinput.c


示例20: bus_exit

static void __exit bus_exit(void)
{
	int i;
	for (i = 0; my_bus_attrs[i]; i++)
		bus_remove_file(&my_bus, my_bus_attrs[i]);

	for (i = 0; my_drv_attrs[i]; i++)
		driver_remove_file(&my_drv.drv, my_drv_attrs[i]);
	
	for (i = 0; my_dev_attrs[i]; i++)
		device_remove_file(&my_dev.dev, my_dev_attrs[i]);


	my_driver_unregister(&my_drv);
	my_device_unregister(&my_dev);
	bus_unregister(&my_bus);
	

}
开发者ID:Winddoing,项目名称:MyCode,代码行数:19,代码来源:driver.c



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ driver_unregister函数代码示例发布时间:2022-05-30
下一篇:
C++ driver_register函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap