コード例 #1
0
ファイル: rmi_bus.c プロジェクト: thypon/bowser-kernel
static void __exit rmi_bus_exit(void)
{
	/*
	 * We should only ever get here if all drivers are unloaded, so
	 * all we have to do at this point is unregister ourselves.
	 */
	rmi_bus_teardown_debugfs();
	rmi_unregister_sensor_driver();
	rmi_unregister_function_driver(&rmi_f01_driver);
	bus_unregister(&rmi_bus_type);
}
コード例 #2
0
ファイル: rmi_bus.c プロジェクト: thypon/bowser-kernel
static int __init rmi_bus_init(void)
{
	int error;

	mutex_init(&rmi_bus_mutex);

	error = bus_register(&rmi_bus_type);
	if (error) {
		pr_err("%s: error registering the RMI bus: %d\n",
			__func__, error);
		return error;
	}

	rmi_bus_setup_debugfs();

	error = rmi_register_function_driver(&rmi_f01_driver);
	if (error) {
		pr_err("%s: error registering the RMI F01 driver: %d\n",
			__func__, error);
		goto err_unregister_bus;
	}

	error = rmi_register_sensor_driver();
	if (error) {
		pr_err("%s: error registering the RMI sensor driver: %d\n",
			__func__, error);
		goto err_unregister_f01;
	}

	return 0;

err_unregister_f01:
	rmi_unregister_function_driver(&rmi_f01_driver);
err_unregister_bus:
	bus_unregister(&rmi_bus_type);
	return error;
}
コード例 #3
0
ファイル: rmi_f17.c プロジェクト: AndrewDB/rk3066-kernel
static void f17_module_exit(void)
{
	rmi_unregister_function_driver(&function_handler);
}