linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 01/20] Input: iforce - remove "being used" silliness
@ 2018-09-18  0:47 Dmitry Torokhov
  2018-09-18  0:47 ` [PATCH 02/20] Input: iforce - introduce transport ops Dmitry Torokhov
                   ` (19 more replies)
  0 siblings, 20 replies; 24+ messages in thread
From: Dmitry Torokhov @ 2018-09-18  0:47 UTC (permalink / raw)
  To: linux-input, Tim Schumacher; +Cc: linux-kernel

The kernel is supposed to handle multiple devices, static flags
in packet handling code will never work.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
---

This is a random assortment of iforce patches that I made a few weeks back.

Tim, I do not have hardware, so I was bound to screw it up, but if you
have some time I'd appreciate if you try them out (and if I indeed broke
things if you could identify issues that would be even more awesome).

Thanks!


 drivers/input/joystick/iforce/iforce-packets.c | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/drivers/input/joystick/iforce/iforce-packets.c b/drivers/input/joystick/iforce/iforce-packets.c
index c10169f4554e..91893c751524 100644
--- a/drivers/input/joystick/iforce/iforce-packets.c
+++ b/drivers/input/joystick/iforce/iforce-packets.c
@@ -149,12 +149,6 @@ void iforce_process_packet(struct iforce *iforce, u16 cmd, unsigned char *data)
 {
 	struct input_dev *dev = iforce->dev;
 	int i;
-	static int being_used = 0;
-
-	if (being_used)
-		dev_warn(&iforce->dev->dev,
-			 "re-entrant call to iforce_process %d\n", being_used);
-	being_used++;
 
 #ifdef CONFIG_JOYSTICK_IFORCE_232
 	if (HI(iforce->expect_packet) == HI(cmd)) {
@@ -165,10 +159,8 @@ void iforce_process_packet(struct iforce *iforce, u16 cmd, unsigned char *data)
 #endif
 	wake_up(&iforce->wait);
 
-	if (!iforce->type) {
-		being_used--;
+	if (!iforce->type)
 		return;
-	}
 
 	switch (HI(cmd)) {
 
@@ -233,7 +225,6 @@ void iforce_process_packet(struct iforce *iforce, u16 cmd, unsigned char *data)
 			}
 			break;
 	}
-	being_used--;
 }
 
 int iforce_get_id_packet(struct iforce *iforce, char *packet)
-- 
2.19.0.397.gdd90340f6a-goog


^ permalink raw reply related	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2019-06-19  0:24 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-18  0:47 [PATCH 01/20] Input: iforce - remove "being used" silliness Dmitry Torokhov
2018-09-18  0:47 ` [PATCH 02/20] Input: iforce - introduce transport ops Dmitry Torokhov
2018-09-18  0:47 ` [PATCH 03/20] Input: iforce - move get_id to the transport operations Dmitry Torokhov
2018-09-18  0:47 ` [PATCH 04/20] Input: iforce - move command completion handling to serio code Dmitry Torokhov
2018-09-18  0:47 ` [PATCH 05/20] Input: iforce - introduce start and stop io transport ops Dmitry Torokhov
2018-09-18  0:47 ` [PATCH 06/20] Input: iforce - add bus type and parent arguments to iforce_init_device() Dmitry Torokhov
2018-09-18  0:47 ` [PATCH 07/20] Input: iforce - move transport data into transport modules Dmitry Torokhov
2018-09-18  0:47 ` [PATCH 08/20] Input: iforce - split into core and " Dmitry Torokhov
2018-09-18  0:47 ` [PATCH 09/20] Input: iforce - use DMA-safe buffer when getting IDs from USB Dmitry Torokhov
2018-09-18  0:47 ` [PATCH 10/20] Input: iforce - update formatting of switch statements Dmitry Torokhov
2018-09-18  0:47 ` [PATCH 11/20] Input: iforce - factor out hat handling when parsing packets Dmitry Torokhov
2018-09-18  0:47 ` [PATCH 12/20] Input: iforce - do not combine arguments for iforce_process_packet() Dmitry Torokhov
2018-09-18  0:47 ` [PATCH 13/20] Input: iforce - signal command completion from transport code Dmitry Torokhov
2018-09-18  0:47 ` [PATCH 14/20] Input: iforce - only call iforce_process_packet() if initialized Dmitry Torokhov
2018-09-18  0:47 ` [PATCH 15/20] Input: iforce - allow callers supply data buffer when fetching device IDs Dmitry Torokhov
2018-09-18  0:47 ` [PATCH 16/20] Input: iforce - use DMA-safe buffores for USB transfers Dmitry Torokhov
2018-09-18  0:47 ` [PATCH 17/20] Input: only credit entropy when events are generated by a device Dmitry Torokhov
2018-09-18  0:47 ` [PATCH 18/20] Input: iforce - drop bus type from iforce structure Dmitry Torokhov
2018-09-18  0:47 ` [PATCH 19/20] Input: iforce - drop couple of temps from transport code Dmitry Torokhov
2018-09-18  0:47 ` [PATCH 20/20] Input: iforce - use unaligned accessors, where appropriate Dmitry Torokhov
2018-09-19 14:51 ` [PATCH 01/20] Input: iforce - remove "being used" silliness Tim Schumacher
2018-09-19 17:10   ` Dmitry Torokhov
2019-06-12 14:44     ` Tim Schumacher
2019-06-19  0:24       ` Dmitry Torokhov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).