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

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

Merge "wcnss: Trigger WCNSS driver on first open"

parents 4cee7ccb a990964c
Loading
Loading
Loading
Loading
+5 −7
Original line number Diff line number Diff line
@@ -2015,19 +2015,17 @@ fail_gpio_res:
static int wcnss_node_open(struct inode *inode, struct file *file)
{
	struct platform_device *pdev;
	int rc = 0;

	if (!penv)
		return -EFAULT;

	/* first open is only to trigger WCNSS platform driver */
	if (!penv->triggered) {
		pr_info(DEVICE " triggered by userspace\n");
		pdev = penv->pdev;
		return wcnss_trigger_config(pdev);

	} else if (penv->device_opened) {
		pr_info(DEVICE " already opened\n");
		return -EBUSY;
		rc = wcnss_trigger_config(pdev);
		if (rc)
			return -EFAULT;
	}

	mutex_lock(&penv->dev_lock);
@@ -2038,7 +2036,7 @@ static int wcnss_node_open(struct inode *inode, struct file *file)
	penv->device_opened = 1;
	mutex_unlock(&penv->dev_lock);

	return 0;
	return rc;
}

static ssize_t wcnss_wlan_read(struct file *fp, char __user