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


C++ driver_remove_file函数代码示例

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


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


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