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

C++ rfkill_unregister函数代码示例

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

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



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

示例1: hp_wmi_bios_remove

static int __exit hp_wmi_bios_remove(struct platform_device *device)
{
	int i;
	cleanup_sysfs(device);

	for (i = 0; i < rfkill2_count; i++) {
		rfkill_unregister(rfkill2[i].rfkill);
		rfkill_destroy(rfkill2[i].rfkill);
	}

	if (wifi_rfkill) {
		rfkill_unregister(wifi_rfkill);
		rfkill_destroy(wifi_rfkill);
	}
	if (bluetooth_rfkill) {
		rfkill_unregister(bluetooth_rfkill);
		rfkill_destroy(bluetooth_rfkill);
	}
	if (wwan_rfkill) {
		rfkill_unregister(wwan_rfkill);
		rfkill_destroy(wwan_rfkill);
	}

	return 0;
}
开发者ID:AlexShiLucky,项目名称:linux,代码行数:25,代码来源:hp-wmi.c


示例2: rfkill_init

static int rfkill_init(struct platform_device *sdev)
{
	/* add rfkill */
	int retval;

	/* keep the hardware wireless state */
	get_wireless_state_ec_standard();

	rfk_bluetooth = rfkill_alloc("msi-bluetooth", &sdev->dev,
				RFKILL_TYPE_BLUETOOTH,
				&rfkill_bluetooth_ops, NULL);
	if (!rfk_bluetooth) {
		retval = -ENOMEM;
		goto err_bluetooth;
	}
	retval = rfkill_register(rfk_bluetooth);
	if (retval)
		goto err_bluetooth;

	rfk_wlan = rfkill_alloc("msi-wlan", &sdev->dev, RFKILL_TYPE_WLAN,
				&rfkill_wlan_ops, NULL);
	if (!rfk_wlan) {
		retval = -ENOMEM;
		goto err_wlan;
	}
	retval = rfkill_register(rfk_wlan);
	if (retval)
		goto err_wlan;

	if (threeg_exists) {
		rfk_threeg = rfkill_alloc("msi-threeg", &sdev->dev,
				RFKILL_TYPE_WWAN, &rfkill_threeg_ops, NULL);
		if (!rfk_threeg) {
			retval = -ENOMEM;
			goto err_threeg;
		}
		retval = rfkill_register(rfk_threeg);
		if (retval)
			goto err_threeg;
	}

	/* schedule to run rfkill state initial */
	schedule_delayed_work(&msi_rfkill_init,
				round_jiffies_relative(1 * HZ));

	return 0;

err_threeg:
	rfkill_destroy(rfk_threeg);
	if (rfk_wlan)
		rfkill_unregister(rfk_wlan);
err_wlan:
	rfkill_destroy(rfk_wlan);
	if (rfk_bluetooth)
		rfkill_unregister(rfk_bluetooth);
err_bluetooth:
	rfkill_destroy(rfk_bluetooth);

	return retval;
}
开发者ID:119-org,项目名称:hi3518-osdrv,代码行数:60,代码来源:msi-laptop.c


示例3: wl127x_rfkill_remove

static int wl127x_rfkill_remove(struct platform_device *pdev)
{
	struct wl127x_rfkill_platform_data *pdata = pdev->dev.platform_data;

	if (pdata->bt_nshutdown_gpio >= 0) {
		rfkill_unregister(pdata->rfkill[WL127X_BLUETOOTH]);
		rfkill_destroy(pdata->rfkill[WL127X_BLUETOOTH]);
		if (pdata->bt_hw_release)
			pdata->bt_hw_release();
		gpio_free(pdata->bt_nshutdown_gpio);
	}

	if (pdata->pwr_ctl >= 0) {
		rfkill_unregister(pdata->rfkill[WL127X_PWR_CTL]);
		rfkill_destroy(pdata->rfkill[WL127X_PWR_CTL]);
	}

	if (pdata->fm_enable_gpio >= 0) {
		rfkill_unregister(pdata->rfkill[WL127X_FM]);
		rfkill_destroy(pdata->rfkill[WL127X_FM]);
		gpio_free(pdata->fm_enable_gpio);
	}

	return 0;
}
开发者ID:MuMu360121,项目名称:jordan-kernel,代码行数:25,代码来源:wl127x-rfkill.c


示例4: rfkill_init

static int rfkill_init(struct platform_device *sdev)
{
	/* add rfkill */
	int retval;

	rfk_bluetooth = rfkill_alloc("msi-bluetooth", &sdev->dev,
				RFKILL_TYPE_BLUETOOTH,
				&rfkill_bluetooth_ops, NULL);
	if (!rfk_bluetooth) {
		retval = -ENOMEM;
		goto err_bluetooth;
	}
	retval = rfkill_register(rfk_bluetooth);
	if (retval)
		goto err_bluetooth;

	rfk_wlan = rfkill_alloc("msi-wlan", &sdev->dev, RFKILL_TYPE_WLAN,
				&rfkill_wlan_ops, NULL);
	if (!rfk_wlan) {
		retval = -ENOMEM;
		goto err_wlan;
	}
	retval = rfkill_register(rfk_wlan);
	if (retval)
		goto err_wlan;

	if (threeg_exists) {
		rfk_threeg = rfkill_alloc("msi-threeg", &sdev->dev,
				RFKILL_TYPE_WWAN, &rfkill_threeg_ops, NULL);
		if (!rfk_threeg) {
			retval = -ENOMEM;
			goto err_threeg;
		}
		retval = rfkill_register(rfk_threeg);
		if (retval)
			goto err_threeg;
	}

	return 0;

err_threeg:
	rfkill_destroy(rfk_threeg);
	if (rfk_wlan)
		rfkill_unregister(rfk_wlan);
err_wlan:
	rfkill_destroy(rfk_wlan);
	if (rfk_bluetooth)
		rfkill_unregister(rfk_bluetooth);
err_bluetooth:
	rfkill_destroy(rfk_bluetooth);

	return retval;
}
开发者ID:A2109devs,项目名称:lenovo_a2109a_kernel,代码行数:53,代码来源:msi-laptop.c


示例5: compal_cleanup

static void __exit compal_cleanup(void)
{

	platform_device_unregister(compal_device);
	platform_driver_unregister(&compal_driver);
	backlight_device_unregister(compalbl_device);
	rfkill_unregister(wifi_rfkill);
	rfkill_destroy(wifi_rfkill);
	rfkill_unregister(bt_rfkill);
	rfkill_destroy(bt_rfkill);

	printk(KERN_INFO "compal-laptop: driver unloaded.\n");
}
开发者ID:ArthySundaram,项目名称:firstrepo,代码行数:13,代码来源:compal-laptop.c


示例6: __oaktrail_rfkill_cleanup

static inline void __oaktrail_rfkill_cleanup(struct rfkill *rf)
{
	if (rf) {
		rfkill_unregister(rf);
		rfkill_destroy(rf);
	}
}
开发者ID:119-org,项目名称:hi3518-osdrv,代码行数:7,代码来源:intel_oaktrail.c


示例7: htc_rfkill_remove

static int htc_rfkill_remove(struct platform_device *dev)
{
    rfkill_unregister(bt_rfk);
    rfkill_destroy(bt_rfk);
    fm_ant_node_exit();
    return 0;
}
开发者ID:boa19861105,项目名称:android_kernel_htc_b3uhl-JP,代码行数:7,代码来源:board-8994-rfkill.c


示例8: sapphire_rfkill_remove

static int sapphire_rfkill_remove(struct platform_device *dev)
{
	rfkill_unregister(bt_rfk);
	rfkill_free(bt_rfk);

	return 0;
}
开发者ID:quachtinhbs,项目名称:ds_sensation_2.6.29,代码行数:7,代码来源:board-sapphire-rfkill.c


示例9: bluetooth_power_rfkill_remove

static void bluetooth_power_rfkill_remove(struct platform_device *pdev)
{
	struct rfkill *rfkill;

	dev_dbg(&pdev->dev, "%s\n", __func__);

	rfkill = platform_get_drvdata(pdev);
	if (rfkill)
		rfkill_unregister(rfkill);
#ifdef CONFIG_AR6K
	if (g_WifiRfkill)
		rfkill_unregister(g_WifiRfkill);
#endif
	rfkill_destroy(rfkill);
	platform_set_drvdata(pdev, NULL);
}
开发者ID:R-N,项目名称:boston-2.6.32.x,代码行数:16,代码来源:bluetooth-power.c


示例10: smba_gsm_remove

static int smba_gsm_remove(struct platform_device *pdev)
{
	struct smba_pm_gsm_data *gsm_data = dev_get_drvdata(&pdev->dev);

	sysfs_remove_group(&pdev->dev.kobj, &smba_gsm_attr_group);

	if (!gsm_data)
		return 0;
	
	if (gsm_data->rfkill) {
		rfkill_unregister(gsm_data->rfkill);
		rfkill_destroy(gsm_data->rfkill);
	}

	if (gsm_data->regulator[0] && gsm_data->regulator[1])
		__smba_pm_gsm_toggle_radio(&pdev->dev, 0);

	if (gsm_data->regulator[0]) 
		regulator_put(gsm_data->regulator[0]);
		
	if (gsm_data->regulator[1]) 
		regulator_put(gsm_data->regulator[1]);

	kfree(gsm_data);

	return 0;
}
开发者ID:TeamDRH,项目名称:android-tegra-nv-2.6.39-rel-14r7,代码行数:27,代码来源:board-smba9701-pm-gsm.c


示例11: xo1_rfkill_remove

static int __devexit xo1_rfkill_remove(struct platform_device *pdev)
{
	struct rfkill *rfk = platform_get_drvdata(pdev);
	rfkill_unregister(rfk);
	rfkill_destroy(rfk);
	return 0;
}
开发者ID:0xroot,项目名称:Blackphone-BP1-Kernel,代码行数:7,代码来源:xo1-rfkill.c


示例12: endeavortd_rfkill_remove

static int endeavortd_rfkill_remove(struct platform_device *pdev)
{
	rfkill_unregister(bt_rfk);
	rfkill_destroy(bt_rfk);

	return 0;
}
开发者ID:Alex-V2,项目名称:Alex-V_SE_OneX,代码行数:7,代码来源:board-endeavortd-rfkill.c


示例13: incrediblec_rfkill_remove

static int incrediblec_rfkill_remove(struct platform_device *dev)
{
	rfkill_unregister(bt_rfk);
	rfkill_free(bt_rfk);

	return 0;
}
开发者ID:Cicatrize,项目名称:HTC-Supersonic-Incredible-2.6.29,代码行数:7,代码来源:board-incrediblec-rfkill.c


示例14: gps_power_exit

static void __exit gps_power_exit(void)
{
	rfkill_unregister(gpsctrl->rfkill);
	kfree(gpsctrl->rfkill);
	regulator_put(gpsctrl->power);
	kfree(gpsctrl);
}
开发者ID:xuanhoa9985,项目名称:KERNEL-NPM801,代码行数:7,代码来源:gps-power.c


示例15: spade_rfkill_remove

static int spade_rfkill_remove(struct platform_device *dev)
{
	rfkill_unregister(bt_rfk);
	rfkill_destroy(bt_rfk);

	return 0;
}
开发者ID:12rafael,项目名称:jellytimekernel,代码行数:7,代码来源:board-spade-rfkill.c


示例16: bluetooth_pm_remove

static int bluetooth_pm_remove(struct platform_device *pdev)
{
	/* assert bt wake */
	gpio_set_value(bsi->ext_wake, 0);
	if (test_bit(BT_PROTO, &flags)) {
		if (disable_irq_wake(bsi->host_wake_irq))
			printk("%s, Couldn't disable hostwake IRQ wakeup mode \n", __func__);
		free_irq(bsi->host_wake_irq, NULL);
		del_timer(&tx_timer);
//BT_S : [CONBT-1475] LGC_BT_COMMON_IMP_KERNEL_UART_HCI_COMMAND_TIMEOUT
		del_timer(&uart_control_timer);
//BT_E : [CONBT-1475] LGC_BT_COMMON_IMP_KERNEL_UART_HCI_COMMAND_TIMEOUT
	}

	bluetooth_pm_remove_bt_proc_interface();

	if (bsi->ext_wake)
		gpio_free(bsi->ext_wake);		
	if (bsi->host_wake)
		gpio_free(bsi->host_wake);		
	if (bsi->rfkill) {
		rfkill_unregister(bsi->rfkill);
		rfkill_destroy(bsi->rfkill);
		kfree(bsi->rfkill);
	}
	if (bsi->bt_reset)
		gpio_free(bsi->bt_reset);

	wake_lock_destroy(&bsi->wake_lock);

	kfree(bsi);
	
	return 0;
}
开发者ID:bju2000,项目名称:kernel_lge_msm8994,代码行数:34,代码来源:bluetooth-pm.c


示例17: toshiba_acpi_remove

static int toshiba_acpi_remove(struct acpi_device *acpi_dev, int type)
{
	struct toshiba_acpi_dev *dev = acpi_driver_data(acpi_dev);

	remove_toshiba_proc_entries(dev);

	if (dev->ntfy_supported) {
		i8042_remove_filter(toshiba_acpi_i8042_filter);
		cancel_work_sync(&dev->hotkey_work);
	}

	if (dev->hotkey_dev) {
		input_unregister_device(dev->hotkey_dev);
		sparse_keymap_free(dev->hotkey_dev);
	}

	if (dev->bt_rfk) {
		rfkill_unregister(dev->bt_rfk);
		rfkill_destroy(dev->bt_rfk);
	}

	if (dev->backlight_dev)
		backlight_device_unregister(dev->backlight_dev);

	if (dev->illumination_supported)
		led_classdev_unregister(&dev->led_dev);

	if (toshiba_acpi)
		toshiba_acpi = NULL;

	kfree(dev);

	return 0;
}
开发者ID:romanbb,项目名称:android_kernel_lge_d851,代码行数:34,代码来源:toshiba_acpi.c


示例18: bluedroid_pm_remove

static int bluedroid_pm_remove(struct platform_device *pdev)
{
    struct bluedroid_pm_data *bluedroid_pm = platform_get_drvdata(pdev);

    if (bluedroid_pm->host_wake)
        gpio_free(bluedroid_pm->host_wake);
    if (bluedroid_pm->host_wake_irq)
        free_irq(bluedroid_pm->host_wake_irq, NULL);
    if (bluedroid_pm->ext_wake) {
        gpio_free(bluedroid_pm->ext_wake);
        remove_bt_proc_interface();
    }
    if (bluedroid_pm->gpio_reset || bluedroid_pm->gpio_shutdown ||
            bluedroid_pm->vdd_1v8 || bluedroid_pm->vdd_3v3) {
        rfkill_unregister(bluedroid_pm->rfkill);
        rfkill_destroy(bluedroid_pm->rfkill);
        kfree(bluedroid_pm->rfkill);
    }
    if (bluedroid_pm->gpio_shutdown)
        gpio_free(bluedroid_pm->gpio_shutdown);
    if (bluedroid_pm->gpio_reset)
        gpio_free(bluedroid_pm->gpio_reset);
    if (bluedroid_pm->vdd_3v3)
        regulator_put(bluedroid_pm->vdd_3v3);
    if (bluedroid_pm->vdd_1v8)
        regulator_put(bluedroid_pm->vdd_1v8);
    kfree(bluedroid_pm);

    return 0;
}
开发者ID:thoniorf,项目名称:ouya_1_1-kernel,代码行数:30,代码来源:bluedroid_pm.c


示例19: gta02_bt_remove

static int gta02_bt_remove(struct platform_device *pdev)
{
	struct gta02_pm_bt_data *bt_data = dev_get_drvdata(&pdev->dev);
	struct regulator *regulator;

	sysfs_remove_group(&pdev->dev.kobj, &gta02_bt_attr_group);

	if (bt_data->rfkill) {
		rfkill_unregister(bt_data->rfkill);
		rfkill_free(bt_data->rfkill);
	}

	if (!bt_data || !bt_data->regulator)
		return 0;

	regulator = bt_data->regulator;

	/* Make sure regulator is disabled before calling regulator_put */
	if (regulator_is_enabled(regulator))
		regulator_disable(regulator);

	regulator_put(regulator);

	kfree(bt_data);

	return 0;
}
开发者ID:mirko,项目名称:openwrt-x-burst,代码行数:27,代码来源:gta02-pm-bt.c


示例20: bliss_rfkill_remove

static int bliss_rfkill_remove(struct platform_device *dev)
{
	rfkill_unregister(bt_rfk);
	rfkill_destroy(bt_rfk);
	gpio_free(BLISS_GPIO_BT_EN);

	return 0;
}
开发者ID:Rumpel78,项目名称:android_kernel_htc_bliss,代码行数:8,代码来源:board-bliss-rfkill.c



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ rfork函数代码示例发布时间:2022-05-30
下一篇:
C++ rfkill_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