Example #1
0
static long msm_ispif_subdev_ioctl(struct v4l2_subdev *sd,
                                   unsigned int cmd, void *arg)
{
    struct ispif_device *ispif =
        (struct ispif_device *)v4l2_get_subdevdata(sd);

    switch (cmd) {
    case VIDIOC_MSM_ISPIF_CFG:
        return msm_ispif_cmd(sd, arg);
    case MSM_SD_NOTIFY_FREEZE: {
        ispif->ispif_sof_debug = 0;
        return 0;
    }
    case MSM_SD_SHUTDOWN: {
        struct ispif_device *ispif =
            (struct ispif_device *)v4l2_get_subdevdata(sd);
        if (ispif && ispif->base)
            msm_ispif_release(ispif);
        return 0;
    }
    default:
        pr_err_ratelimited("%s: invalid cmd 0x%x received\n",
                           __func__, cmd);
        return -ENOIOCTLCMD;
    }
}
static long msm_ispif_subdev_ioctl(struct v4l2_subdev *sd,
	unsigned int cmd, void *arg)
{
#ifdef CONFIG_COMPAT
	void __user *up;
	if (is_compat_task()) {
		up = (void __user *)compat_ptr((unsigned long)arg);
		arg = up;
	}
#endif

	switch (cmd) {
	case VIDIOC_MSM_ISPIF_CFG:
		return msm_ispif_cmd(sd, arg);
	case MSM_SD_SHUTDOWN: {
		struct ispif_device *ispif =
			(struct ispif_device *)v4l2_get_subdevdata(sd);
		if (ispif && ispif->base)
			msm_ispif_release(ispif);
		return 0;
	}
	default:
		pr_err_ratelimited("%s: invalid cmd 0x%x received\n",
			__func__, cmd);
		return -ENOIOCTLCMD;
	}
}
Example #3
0
static long msm_ispif_subdev_ioctl(struct v4l2_subdev *sd,
	unsigned int cmd, void *arg)
{
	switch (cmd) {
	case VIDIOC_MSM_ISPIF_CFG:
		return msm_ispif_cmd(sd, arg);
	case MSM_SD_SHUTDOWN: {
		struct ispif_device *ispif =
			(struct ispif_device *)v4l2_get_subdevdata(sd);
		msm_ispif_release(ispif);
		return 0;
	}
	default:
		pr_err("%s: invalid cmd 0x%x received\n", __func__, cmd);
		return -ENOIOCTLCMD;
	}
}