Esempio n. 1
0
static int __devexit earjack_debugger_remove(struct platform_device *pdev)
{
	struct earjack_debugger_device *adev = platform_get_drvdata(pdev);

#ifdef CONFIG_ZERO_WAIT
	zw_notifier_chain_unregister(&zw_earjack_debugger_nb);
#endif

	free_irq(adev->irq, adev);
	gpio_free(adev->gpio);
	kfree(adev);

	return 0;
}
Esempio n. 2
0
static int anx7808_i2c_remove(struct i2c_client *client)
{
	struct anx7808_data *anx7808 = i2c_get_clientdata(client);
	int i = 0;

#ifdef CONFIG_ZERO_WAIT
	zw_irqs_info_unregister(client->irq);
	zw_notifier_chain_unregister(&zw_slimport_nb);
#endif

	for (i = 0; i < ARRAY_SIZE(slimport_device_attrs); i++)
		device_remove_file(&client->dev, &slimport_device_attrs[i]);
	free_irq(client->irq, anx7808);
	anx7808_free_gpio(anx7808);
	destroy_workqueue(anx7808->workqueue);
	wake_lock_destroy(&anx7808->slimport_lock);
	kfree(anx7808);
	return 0;
}