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

Commit 7fcd9515 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "fbdev: msm: update event callback function to perform ESD check"

parents 1ceb294a d96f630c
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/* Copyright (c) 2013-2018, 2020, The Linux Foundation. All rights reserved. */
/* Copyright (c) 2013-2018, 2020-2021, The Linux Foundation. All rights reserved. */

#include <linux/module.h>
#include <linux/kernel.h>
@@ -150,14 +150,16 @@ static int fb_event_callback(struct notifier_block *self,
	struct mdss_dsi_ctrl_pdata *ctrl_pdata = NULL;
	struct mdss_panel_info *pinfo;
	struct msm_fb_data_type *mfd;
	char fb_id[7] = {'\0'};

	if (!evdata) {
		pr_err("%s: event data not available\n", __func__);
		return NOTIFY_BAD;
	}

	strlcpy(fb_id, evdata->info->fix.id, 7);
	/* handle only mdss fb device */
	if (strcmp("mdssfb", evdata->info->fix.id))
	if (strcmp("mdssfb", fb_id))
		return NOTIFY_DONE;

	mfd = evdata->info->par;