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]
Message-ID: <20241009154046.1011226-2-jogletre@opensource.cirrus.com>
Date: Wed, 9 Oct 2024 15:40:41 +0000
From: James Ogletree <jogletre@...nsource.cirrus.com>
To: <jikos@...nel.org>, <bentiss@...nel.org>, <dmitry.torokhov@...il.com>
CC: <linux-input@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <linux-usb@...r.kernel.org>, <patches@...nsource.cirrus.com>,
        James Ogletree
	<jogletre@...nsource.cirrus.com>
Subject: [RFC PATCH 1/6] Input: Add variable to track maximum concurrent playbacks

Add max_concurrent_playbacks to ff_device which contains
the maximum number of concurrent playbacks allowed by the
device.

Signed-off-by: James Ogletree <jogletre@...nsource.cirrus.com>
---
 drivers/input/evdev.c | 2 +-
 include/linux/input.h | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/input/evdev.c b/drivers/input/evdev.c
index a8ce3d140722..42b55e03696b 100644
--- a/drivers/input/evdev.c
+++ b/drivers/input/evdev.c
@@ -1069,7 +1069,7 @@ static long evdev_do_ioctl(struct file *file, unsigned int cmd,
 
 	case EVIOCGEFFECTS:
 		i = test_bit(EV_FF, dev->evbit) ?
-				dev->ff->max_effects : 0;
+				dev->ff->max_concurrent_playbacks : 0;
 		if (put_user(i, ip))
 			return -EFAULT;
 		return 0;
diff --git a/include/linux/input.h b/include/linux/input.h
index 89a0be6ee0e2..6d6e450e2231 100644
--- a/include/linux/input.h
+++ b/include/linux/input.h
@@ -531,6 +531,7 @@ extern const struct class input_class;
  *	device (not emulated like ones in input_dev->ffbit)
  * @mutex: mutex for serializing access to the device
  * @max_effects: maximum number of effects supported by device
+ * @max_concurrent_playbacks: maximum number of concurrent playbacks
  * @effects: pointer to an array of effects currently loaded into device
  * @effect_owners: array of effect owners; when file handle owning
  *	an effect gets closed the effect is automatically erased
@@ -562,6 +563,7 @@ struct ff_device {
 	struct mutex mutex;
 
 	int max_effects;
+	int max_concurrent_playbacks;
 	struct ff_effect *effects;
 	struct file *effect_owners[] __counted_by(max_effects);
 };
-- 
2.43.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ