From patchwork Fri Nov 9 17:03:56 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 1721371 Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id C9A0EDF264 for ; Fri, 9 Nov 2012 17:04:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754777Ab2KIRD5 (ORCPT ); Fri, 9 Nov 2012 12:03:57 -0500 Received: from mail-ob0-f174.google.com ([209.85.214.174]:49264 "EHLO mail-ob0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754355Ab2KIRD4 (ORCPT ); Fri, 9 Nov 2012 12:03:56 -0500 Received: by mail-ob0-f174.google.com with SMTP id uo13so4225197obb.19 for ; Fri, 09 Nov 2012 09:03:56 -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=XMjfAIj//OC9tnw+9MnghchScLIZ0NGZZpLOhJ1TOb8=; b=hacexq1r6aqy2F8b7lomqE/ja61tAvVBblF0DNzlCAosia/W/bfkU0eB6BadTerLhF Pbfc+9zpdZMYi8kqXxMqv0kKil13wGOqA+8WcMXTsOfmwIz4TjD0UW+AgLZahk7EXW9S RHJ+W7rdJLsNh74xn7g8i6k4YT1PKC/i5ifKxr0wnMY7HzouXp7G2A4t9kj/OoN4kVsb bY4IL66+AiA+COp4EbBzVkyOnhApnZcs+8yb3ZRIASnoi/QUKoAquZV9MPKvwHbZoDFu 3tyiJ7Kv75CpVd1p/qbQc6A95uspVTI31Oqdvz6Lt8j60mb5tnhgXxnbXaQuut/kb/UW qoWg== MIME-Version: 1.0 Received: by 10.60.28.234 with SMTP id e10mr8477485oeh.67.1352480636082; Fri, 09 Nov 2012 09:03:56 -0800 (PST) Received: by 10.76.98.102 with HTTP; Fri, 9 Nov 2012 09:03:56 -0800 (PST) In-Reply-To: <20121109164503.GA17752@core.coreip.homeip.net> References: <3d6f34ca5960203a5efb761f4d56b4e10ee24827.1352474824.git.viresh.kumar@linaro.org> <20121109164503.GA17752@core.coreip.homeip.net> Date: Fri, 9 Nov 2012 22:33:56 +0530 Message-ID: Subject: Re: [PATCH 1/3] input: stmpe-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: ALoCoQkGWYMh4QTTUsXnTYFvgqGXuSfKuhhxQfNRAi4JPAACB/fB1vRoAkW8TC/ohs5koJ6PT0S/ Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org On 9 November 2012 22:15, Dmitry Torokhov wrote: > If input device was alocated with devm_* interface it does not need be > explicitly unregistered/freed. Thanks for pointing out: Fixup: commit 4bf57c85f49f16a139af80f8de76fa01eee77a5d Author: Viresh Kumar Date: Fri Nov 9 22:31:34 2012 +0530 fixup! input: stmpe-keyboard: Use devm_*() routines --- drivers/input/keyboard/stmpe-keypad.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) static int __devexit stmpe_keypad_remove(struct platform_device *pdev) @@ -344,7 +340,6 @@ static int __devexit stmpe_keypad_remove(struct platform_device *pdev) struct stmpe *stmpe = keypad->stmpe; stmpe_disable(stmpe, STMPE_BLOCK_KEYPAD); - input_unregister_device(keypad->input); return 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/stmpe-keypad.c b/drivers/input/keyboard/stmpe-keypad.c index 6e25497..706b16f 100644 --- a/drivers/input/keyboard/stmpe-keypad.c +++ b/drivers/input/keyboard/stmpe-keypad.c @@ -326,16 +326,12 @@ static int __devinit stmpe_keypad_probe(struct platform_device *pdev) IRQF_ONESHOT, "stmpe-keypad", keypad); if (ret) { dev_err(&pdev->dev, "unable to get irq: %d\n", ret); - goto out_unregisterinput; + return ret; } platform_set_drvdata(pdev, keypad); return 0; - -out_unregisterinput: - input_unregister_device(input); - return ret; }