diff mbox

Input: i8042 - Fix console keyboard support on Gen2 Hyper-V VMs

Message ID 20160422131746.GI4298@mwanda (mailing list archive)
State New, archived
Headers show

Commit Message

Dan Carpenter April 22, 2016, 1:17 p.m. UTC
Why is platform_create_bundle() failing?  It didn't fail in the first
version of the patch.

Btw, I'm not asking rhetorical questions, if I ask a question it means I
legitimately don't know the answer.

But I don't like this patch.  Could you describe how you have tested it
with real hardware?  What I want to know is that you loaded the module
without the hardware installed and then installed the hardware and got
it to work.  You have made that more complicated and you've said that
you're willing to complicate life for those users slightly because it's
a trade off for fixing your bug...  But that's sort of annoying and no
one has even tested how it works.

What I was really wondering last time was why can we not just do this?
Testing to see if the hardware is present is normally done in the
probe() function and not the init() function.  I have not tested this
and I don't know what happens when we do this.  Apparently, it causes
platform_create_bundle() to fail but I'm not sure why...  Maybe the
create bundle call probe() and that fails?

How hard would it be to separate these things out into two modules
really?  You say that you'd have to duplicate everything but maybe we
could instead just make the common functions into a library type thing..

--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Mark Laws April 22, 2016, 5:30 p.m. UTC | #1
A few tripels later and the patch has been completely rewritten.
The problem symbols have been moved to a new module, libi8042.c, which
both libps2.c and i8042.c use.  libps2.c no longer depends on i8042.c,
and i8042.c no longer needs the gross hack of the previous patch.

Since I didn't write anything new, just shuffled things around, I
haven't changed any copyrights.  I have no idea what the right procedure
is here, so please let me know, since I'm probably screwing up somehow.

Mark Laws (1):
  Input: i8042 - Fix console keyboard support on Gen2 Hyper-V VMs

 drivers/input/serio/Kconfig    |  7 ++++-
 drivers/input/serio/Makefile   |  1 +
 drivers/input/serio/i8042.c    | 48 ---------------------------------
 drivers/input/serio/i8042.h    |  7 -----
 drivers/input/serio/libi8042.c | 60 ++++++++++++++++++++++++++++++++++++++++++
 drivers/input/serio/libps2.c   |  2 +-
 include/linux/i8042.h          | 17 +-----------
 include/linux/libi8042.h       | 55 ++++++++++++++++++++++++++++++++++++++
 8 files changed, 124 insertions(+), 73 deletions(-)
 create mode 100644 drivers/input/serio/libi8042.c
 create mode 100644 include/linux/libi8042.h
diff mbox

Patch

diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c
index 4541957..4f0bc7c 100644
--- a/drivers/input/serio/i8042.c
+++ b/drivers/input/serio/i8042.c
@@ -1573,10 +1573,6 @@  static int __init i8042_init(void)
 	if (err)
 		return err;
 
-	err = i8042_controller_check();
-	if (err)
-		goto err_platform_exit;
-
 	pdev = platform_create_bundle(&i8042_driver, i8042_probe, NULL, 0, NULL, 0);
 	if (IS_ERR(pdev)) {
 		err = PTR_ERR(pdev);