lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sun, 19 Mar 2023 23:39:07 +0100
From:   Patrik Dahlström <risca@...akolonin.se>
To:     linux-iio@...r.kernel.org
Cc:     linux-kernel@...r.kernel.org, letux-kernel@...nphoenux.org,
        kernel@...a-handheld.com, pgoudagunta@...dia.com,
        hns@...delico.com, jic23@...nel.org, lars@...afoo.de,
        Patrik Dahlström <risca@...akolonin.se>
Subject: [PATCH 2/3] iio: adc: palmas_gpadc: remove adc_wakeupX_data

It does not seem to be used by anyone and having two ways to configure
the same thing but for different use cases is bound to introduce bugs.
This removes the special use case and leaves the generic one. It's still
possible to achieve the same thing as before from userspace.

Signed-off-by: Patrik Dahlström <risca@...akolonin.se>
---
 drivers/iio/adc/palmas_gpadc.c | 18 ------------------
 include/linux/mfd/palmas.h     |  2 --
 2 files changed, 20 deletions(-)

diff --git a/drivers/iio/adc/palmas_gpadc.c b/drivers/iio/adc/palmas_gpadc.c
index 84c6e3b66205..419d7db51345 100644
--- a/drivers/iio/adc/palmas_gpadc.c
+++ b/drivers/iio/adc/palmas_gpadc.c
@@ -948,18 +948,6 @@ static int palmas_gpadc_probe(struct platform_device *pdev)
 				     "request auto1 irq %d failed\n",
 				     adc->irq_auto_1);
 
-	if (gpadc_pdata->adc_wakeup1_data) {
-		memcpy(&adc->wakeup1_data, gpadc_pdata->adc_wakeup1_data,
-			sizeof(adc->wakeup1_data));
-		adc->wakeup1_enable = true;
-	}
-
-	if (gpadc_pdata->adc_wakeup2_data) {
-		memcpy(&adc->wakeup2_data, gpadc_pdata->adc_wakeup2_data,
-				sizeof(adc->wakeup2_data));
-		adc->wakeup2_enable = true;
-	}
-
 	adc->event0.channel = -1;
 	adc->event0.direction = IIO_EV_DIR_NONE;
 	adc->event1.channel = -1;
@@ -1004,12 +992,6 @@ static int palmas_gpadc_probe(struct platform_device *pdev)
 	}
 
 	device_set_wakeup_capable(&pdev->dev, 1);
-	if (adc->wakeup1_enable || adc->wakeup2_enable) {
-		ret = palmas_adc_wakeup_configure(adc);
-		if (ret)
-			return ret;
-		device_wakeup_enable(&pdev->dev);
-	}
 	ret = devm_add_action_or_reset(&pdev->dev,
 				       palmas_disable_wakeup,
 				       adc);
diff --git a/include/linux/mfd/palmas.h b/include/linux/mfd/palmas.h
index 1e61c7e9f50d..dc79d5e2d680 100644
--- a/include/linux/mfd/palmas.h
+++ b/include/linux/mfd/palmas.h
@@ -153,8 +153,6 @@ struct palmas_gpadc_platform_data {
 	int start_polarity;
 
 	int auto_conversion_period_ms;
-	struct palmas_adc_wakeup_property *adc_wakeup1_data;
-	struct palmas_adc_wakeup_property *adc_wakeup2_data;
 };
 
 struct palmas_reg_init {
-- 
2.25.1

Powered by blists - more mailing lists