Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1edcac8e authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: mdss: fb: Copy & send unsigned value for notify update"

parents 8a4e38d8 8d0702af
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
@@ -107,9 +107,10 @@ void mdss_fb_no_update_notify_timer_cb(unsigned long data)
static int mdss_fb_notify_update(struct msm_fb_data_type *mfd,
							unsigned long *argp)
{
	int ret, notify, to_user;
	int ret;
	unsigned long notify = 0x0, to_user = 0x0;

	ret = copy_from_user(&notify, argp, sizeof(int));
	ret = copy_from_user(&notify, argp, sizeof(unsigned long));
	if (ret) {
		pr_err("%s:ioctl failed\n", __func__);
		return ret;
@@ -122,12 +123,12 @@ static int mdss_fb_notify_update(struct msm_fb_data_type *mfd,
		INIT_COMPLETION(mfd->update.comp);
		ret = wait_for_completion_interruptible_timeout(
						&mfd->update.comp, 4 * HZ);
		to_user = mfd->update.value;
		to_user = (unsigned int)mfd->update.value;
	} else if (notify == NOTIFY_UPDATE_STOP) {
		INIT_COMPLETION(mfd->no_update.comp);
		ret = wait_for_completion_interruptible_timeout(
						&mfd->no_update.comp, 4 * HZ);
		to_user = mfd->no_update.value;
		to_user = (unsigned int)mfd->no_update.value;
	} else {
		if (mfd->panel_power_on) {
			INIT_COMPLETION(mfd->power_off_comp);
@@ -139,7 +140,7 @@ static int mdss_fb_notify_update(struct msm_fb_data_type *mfd,
	if (ret == 0)
		ret = -ETIMEDOUT;
	else if (ret > 0)
		ret = copy_to_user(argp, &to_user, sizeof(int));
		ret = copy_to_user(argp, &to_user, sizeof(unsigned long));
	return ret;
}