コード例 #1
0
ファイル: light.c プロジェクト: gregkh/greybus
static void gb_lights_disconnect(struct gb_bundle *bundle)
{
	struct gb_lights *glights = greybus_get_drvdata(bundle);

	if (gb_pm_runtime_get_sync(bundle))
		gb_pm_runtime_get_noresume(bundle);

	gb_connection_disable(glights->connection);
	gb_connection_destroy(glights->connection);

	gb_lights_release(glights);
}
コード例 #2
0
ファイル: vibrator.c プロジェクト: AshishNamdev/linux
static void gb_vibrator_disconnect(struct gb_bundle *bundle)
{
	struct gb_vibrator_device *vib = greybus_get_drvdata(bundle);
	int ret;

	ret = gb_pm_runtime_get_sync(bundle);
	if (ret)
		gb_pm_runtime_get_noresume(bundle);

	if (cancel_delayed_work_sync(&vib->delayed_work))
		turn_off(vib);

	device_unregister(vib->dev);
	ida_simple_remove(&minors, vib->minor);
	gb_connection_disable(vib->connection);
	gb_connection_destroy(vib->connection);
	kfree(vib);
}