本文整理汇总了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);
}
}
示例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;
}
示例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;
}
示例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;
示例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);
}
示例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);
}
示例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]);
}
}
示例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;
}
示例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);
}
示例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;
}
示例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;
}
示例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;
}
}
示例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);
}
示例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;
}