From patchwork Fri Apr 22 13:17:46 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 8911931 Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id E8D689F1D3 for ; Fri, 22 Apr 2016 13:18:15 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7AFE5201F2 for ; Fri, 22 Apr 2016 13:18:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6492720120 for ; Fri, 22 Apr 2016 13:18:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752577AbcDVNSI (ORCPT ); Fri, 22 Apr 2016 09:18:08 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:21245 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752636AbcDVNSH (ORCPT ); Fri, 22 Apr 2016 09:18:07 -0400 Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id u3MDI1pG030276 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 22 Apr 2016 13:18:01 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserv0021.oracle.com (8.13.8/8.13.8) with ESMTP id u3MDI1TW020847 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 22 Apr 2016 13:18:01 GMT Received: from abhmp0004.oracle.com (abhmp0004.oracle.com [141.146.116.10]) by aserv0121.oracle.com (8.13.8/8.13.8) with ESMTP id u3MDHxvG021499; Fri, 22 Apr 2016 13:18:00 GMT Received: from mwanda (/154.0.139.178) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 22 Apr 2016 06:17:59 -0700 Date: Fri, 22 Apr 2016 16:17:46 +0300 From: Dan Carpenter To: Mark Laws Cc: haiyangz@microsoft.com, devel@linuxdriverproject.org, linux-input@vger.kernel.org Subject: Re: [PATCH] Input: i8042 - Fix console keyboard support on Gen2 Hyper-V VMs Message-ID: <20160422131746.GI4298@mwanda> References: <1461330060-35567-1-git-send-email-mdl@60hz.org> <1461330060-35567-2-git-send-email-mdl@60hz.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1461330060-35567-2-git-send-email-mdl@60hz.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Source-IP: aserv0021.oracle.com [141.146.126.233] Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 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);