Example #1
0
static int __devexit mdm6600_remove(struct platform_device *pdev)
{
	dev_info(&pdev->dev, "cleanup\n");

	radio_dev_unregister(&radio_cdev);

	if (working_queue)
		destroy_workqueue(working_queue);

	return 0;
}
static int __devexit wrigley_remove(struct platform_device *pdev)
{
	struct wrigley_info *info = platform_get_drvdata(pdev);

	pr_info("%s: %s\n", __func__, dev_name(&pdev->dev));
	cancel_delayed_work_sync(&info->work);
	radio_dev_unregister(&info->rdev);

	gpio_free(info->flash_gpio);
	free_irq(gpio_to_irq(info->reset_gpio), info);
	gpio_free(info->reset_gpio);
	gpio_free(info->disable_gpio);

	platform_set_drvdata(pdev, NULL);
	kfree(info);

	return 0;
}