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


C++ rfkill_unregister函数代码示例

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


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


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