Example #1
0
static int __exit hsi_remove(struct platform_device *pd)
{
	struct hsi_dev *hsi_ctrl = platform_get_drvdata(pd);

	if (!hsi_ctrl)
		return 0;

	unregister_hsi_devices(hsi_ctrl);
	hsi_debug_remove_ctrl(hsi_ctrl);
	hsi_controller_exit(hsi_ctrl);
	kfree(hsi_ctrl);

	return 0;
}
Example #2
0
static int __exit hsi_platform_device_remove(struct platform_device *pd)
{
    struct hsi_dev *hsi_ctrl = platform_get_drvdata(pd);

    dev_dbg(&pd->dev, "HSI DRIVER : hsi_platform_device_remove\n");

    if (!hsi_ctrl)
        return 0;

    unregister_hsi_devices(hsi_ctrl);

    /* From here no need for HSI HW access */
    pm_runtime_disable(hsi_ctrl->dev);

    hsi_debug_remove_ctrl(hsi_ctrl);
    hsi_controller_exit(hsi_ctrl);

    kfree(hsi_ctrl);

    return 0;
}