本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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;
}
示例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");
}
示例6: __oaktrail_rfkill_cleanup
static inline void __oaktrail_rfkill_cleanup(struct rfkill *rf)
{
if (rf) {
rfkill_unregister(rf);
rfkill_destroy(rf);
}
}
示例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;
}
示例8: sapphire_rfkill_remove
static int sapphire_rfkill_remove(struct platform_device *dev)
{
rfkill_unregister(bt_rfk);
rfkill_free(bt_rfk);
return 0;
}
示例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);
}
示例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;
}
示例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;
}
示例12: endeavortd_rfkill_remove
static int endeavortd_rfkill_remove(struct platform_device *pdev)
{
rfkill_unregister(bt_rfk);
rfkill_destroy(bt_rfk);
return 0;
}
示例13: incrediblec_rfkill_remove
static int incrediblec_rfkill_remove(struct platform_device *dev)
{
rfkill_unregister(bt_rfk);
rfkill_free(bt_rfk);
return 0;
}
示例14: gps_power_exit
static void __exit gps_power_exit(void)
{
rfkill_unregister(gpsctrl->rfkill);
kfree(gpsctrl->rfkill);
regulator_put(gpsctrl->power);
kfree(gpsctrl);
}
示例15: spade_rfkill_remove
static int spade_rfkill_remove(struct platform_device *dev)
{
rfkill_unregister(bt_rfk);
rfkill_destroy(bt_rfk);
return 0;
}