From patchwork Fri Nov 9 17:05:22 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 1721401 Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 0213A3FCF7 for ; Fri, 9 Nov 2012 17:05:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754921Ab2KIRFY (ORCPT ); Fri, 9 Nov 2012 12:05:24 -0500 Received: from mail-ob0-f174.google.com ([209.85.214.174]:58466 "EHLO mail-ob0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754801Ab2KIRFW (ORCPT ); Fri, 9 Nov 2012 12:05:22 -0500 Received: by mail-ob0-f174.google.com with SMTP id uo13so4226446obb.19 for ; Fri, 09 Nov 2012 09:05:22 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:x-gm-message-state; bh=aOaTllfDXdTq5woVq1g6YUEalWN0ajM3OOUoKYPsr28=; b=VbiTK/rV/jOWtqMjbOq/DD5H1TPaRi1a4zF7nQOsXIP4EW8y/yo7OYXQfTSab5J+cR 8eK/WwQdbmIgPX/KbKgZ59+2wNaIfc2/LWvEMoP6KawTlBAqOXftpyhFBr6h9kbohfqC GHk6rKFANOeNNGevRoBo6ObYwe1jtPRwRWhsXniyxv9O4ZqSN39g6Xt7sibdwNw83xOj 4QABnYAt5E8fD0MWuOE6D6xEnJ/6nA9CRLMn6fUwukOb16ER8KsbcgkeXiaYrRD7tV1A JMlnfqqGg71mmXST7fjdBg42IuptULBkDSUeUB7ik+5dt6hv2M35VN3LRPjLN8D9rv/7 55gA== MIME-Version: 1.0 Received: by 10.60.32.178 with SMTP id k18mr8464351oei.8.1352480722376; Fri, 09 Nov 2012 09:05:22 -0800 (PST) Received: by 10.76.98.102 with HTTP; Fri, 9 Nov 2012 09:05:22 -0800 (PST) In-Reply-To: <20121109053311.GA12105@core.coreip.homeip.net> References: <9f07bb7dbf29978970d901bbe89add0a333cc925.1352381962.git.viresh.kumar@linaro.org> <20121108163835.GA8877@core.coreip.homeip.net> <20121109053311.GA12105@core.coreip.homeip.net> Date: Fri, 9 Nov 2012 22:35:22 +0530 Message-ID: Subject: Re: [PATCH 1/3] input: spear-keyboard: Use devm_*() routines From: Viresh Kumar To: Dmitry Torokhov Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, spear-devel@list.st.com X-Gm-Message-State: ALoCoQkaWO8UOJTzpb+fVODJfaRzIzPqQ+WWkKmksV924o0LNi2F9UbOQeR5H7rg/9AELsCKQhjR Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org On 9 November 2012 11:03, Dmitry Torokhov wrote: > On Fri, Nov 09, 2012 at 08:06:29AM +0530, Viresh Kumar wrote: >> On 8 November 2012 22:08, Dmitry Torokhov wrote: >> > On Thu, Nov 08, 2012 at 07:10:47PM +0530, Viresh Kumar wrote: >> > It also breaks the error unwinding/removal of the driver as it frees >> > input device while IRQ handler is still active. >> >> I have heard of this argument before, probably from you. :) >> Just need clarification again. How will we get an interrupt when the controller >> is stopped, unless we have a shared irq. > > My bad, I missed that spear-keyboard driver implements open() and > close() methods and shuts off the device properly. Still, thanks for > switching everything to devm_*, I think it is much cleaner this way as > opposed to mixing managed and unmanaged resources. Another fixup: commit ebdec75f51050cf4a5ac41d3a1e880e14bf96a95 Author: Viresh Kumar Date: Fri Nov 9 22:28:48 2012 +0530 fixup! input: spear-keyboard: Use devm_*() routines --- drivers/input/keyboard/spear-keyboard.c | 1 - 1 file changed, 1 deletion(-) device_init_wakeup(&pdev->dev, 0); -- 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/keyboard/spear-keyboard.c b/drivers/input/keyboard/spear-keyboard.c index 25e0a3b..65f5950 100644 --- a/drivers/input/keyboard/spear-keyboard.c +++ b/drivers/input/keyboard/spear-keyboard.c @@ -292,7 +292,6 @@ static int __devexit spear_kbd_remove(struct platform_device *pdev) { struct spear_kbd *kbd = platform_get_drvdata(pdev); - input_unregister_device(kbd->input); clk_unprepare(kbd->clk);