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; }
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; }
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; }
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; }
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"); }
static int bt_remove(struct platform_device *pdev) { struct bt_dev_runtime_data *prdata = platform_get_drvdata(pdev); struct rfkill *rfk = NULL; struct bt_dev_data *pdata = NULL; platform_set_drvdata(pdev, NULL); #ifdef CONFIG_AM_WIFI_SD_MMC wifi_request_32k_clk(0, BT_RFKILL); #endif if(prdata) { rfk = prdata->bt_rfk; pdata = prdata->pdata; } if(pdata) { bt_device_deinit(pdata); kfree(pdata); } if (rfk) { rfkill_unregister(rfk); rfkill_destroy(rfk); } rfk = NULL; return 0; }
static inline void __oaktrail_rfkill_cleanup(struct rfkill *rf) { if (rf) { rfkill_unregister(rf); rfkill_destroy(rf); } }
static int htc_rfkill_remove(struct platform_device *dev) { rfkill_unregister(bt_rfk); rfkill_destroy(bt_rfk); fm_ant_node_exit(); return 0; }
static int sapphire_rfkill_remove(struct platform_device *dev) { rfkill_unregister(bt_rfk); rfkill_free(bt_rfk); return 0; }
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); }
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; }
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; }
static int endeavortd_rfkill_remove(struct platform_device *pdev) { rfkill_unregister(bt_rfk); rfkill_destroy(bt_rfk); return 0; }
static int incrediblec_rfkill_remove(struct platform_device *dev) { rfkill_unregister(bt_rfk); rfkill_free(bt_rfk); return 0; }
static void __exit gps_power_exit(void) { rfkill_unregister(gpsctrl->rfkill); kfree(gpsctrl->rfkill); regulator_put(gpsctrl->power); kfree(gpsctrl); }
static int spade_rfkill_remove(struct platform_device *dev) { rfkill_unregister(bt_rfk); rfkill_destroy(bt_rfk); return 0; }
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; }
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; }
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; }
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, >a02_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; }
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; }
static void rfkill_cleanup(void) { if (rfk_bluetooth) { rfkill_unregister(rfk_bluetooth); rfkill_destroy(rfk_bluetooth); } if (rfk_threeg) { rfkill_unregister(rfk_threeg); rfkill_destroy(rfk_threeg); } if (rfk_wlan) { rfkill_unregister(rfk_wlan); rfkill_destroy(rfk_wlan); } }
static int sw_rfkill_remove(struct platform_device *pdev) { if (likely(sw_rfkill)) { rfkill_unregister(sw_rfkill); rfkill_destroy(sw_rfkill); } return 0; }
static void asus_rfkill_exit(struct asus_laptop *asus) { if (asus->gps_rfkill) { rfkill_unregister(asus->gps_rfkill); rfkill_destroy(asus->gps_rfkill); asus->gps_rfkill = NULL; } }
static void bluetooth_exit(void) { if (bluetooth_rfkill) rfkill_unregister(bluetooth_rfkill); sysfs_remove_group(&lensl_pdev->dev.kobj, &bluetooth_attr_group); }
static int liberty_rfkill_remove(struct platform_device *dev) { rfkill_unregister(bt_rfk); //rfkill_free(bt_rfk); rfkill_destroy(bt_rfk); return 0; }
static int lgps3_rfkill_remove(struct platform_device *dev) { rfkill_unregister(bt_rfk); rfkill_destroy(bt_rfk); gpio_free(LGPS3_GPIO_BT_RESET_N); return 0; }
/* * Deregister a WiMAX device's RF Kill support * * Ick, we can't call rfkill_free() after rfkill_unregister()...oh * well. * * WARNING: wimax_dev->mutex must be unlocked */ void wimax_rfkill_rm(struct wimax_dev *wimax_dev) { struct device *dev = wimax_dev_to_dev(wimax_dev); d_fnstart(3, dev, "(wimax_dev %p)\n", wimax_dev); rfkill_unregister(wimax_dev->rfkill); rfkill_destroy(wimax_dev->rfkill); d_fnend(3, dev, "(wimax_dev %p)\n", wimax_dev); }
static int bcm4335_bluetooth_remove(struct platform_device *pdev) { rfkill_unregister(bt_rfkill); rfkill_destroy(bt_rfkill); gpio_free(ice_gpiox_get(FPGA_GPIO_BT_EN)); return 0; }
static int bcm4334_bluetooth_remove(struct platform_device *pdev) { rfkill_unregister(bt_rfkill); rfkill_destroy(bt_rfkill); gpio_free(gpio_rev(BT_EN)); return 0; }