From patchwork Thu Apr 28 03:23:26 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: axel lin X-Patchwork-Id: 738251 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p3S3NaEG016334 for ; Thu, 28 Apr 2011 03:23:37 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754245Ab1D1DXg (ORCPT ); Wed, 27 Apr 2011 23:23:36 -0400 Received: from mail-yw0-f46.google.com ([209.85.213.46]:46619 "EHLO mail-yw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751372Ab1D1DXf (ORCPT ); Wed, 27 Apr 2011 23:23:35 -0400 Received: by ywj3 with SMTP id 3so844094ywj.19 for ; Wed, 27 Apr 2011 20:23:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:subject:from:to:cc:content-type:date:message-id :mime-version:x-mailer:content-transfer-encoding; bh=yVg6f8i/3/kPA8wCbGiGHD6Yo0trOdQEL1dQOvz+KrU=; b=NfXGRColDOq7XuzG8W6QqhzVT85ppahshpHBcQwJ7vvVPmdpO58vV2WlC2hRQJ/fBG wq9ZPYYiFe5Jl1K9H9Toqds9b0WfAj1wMMwlSkU7UPbOD4HVbd00dUDCDewlYaqwmg/A lp3yVfFS7c4IBoPcB4XOLsoRkE7vFcEq1TQRY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:cc:content-type:date:message-id:mime-version :x-mailer:content-transfer-encoding; b=qM4IiDGH8I0fqCke4BA+nnANn3hcAJuVtaXzDffTMkTgoAd8i1QGDp2tU3M9+QDkVG GTF7gx94FM0A4DCmgRRh5dpdvPzWtIVJWtGTSF91bsdgiukQiOyO4LrawfjLWdI94XBZ gdJ0wa2ooISr5Yywvmem1XPIXXfs90kqLrhGc= Received: by 10.101.98.11 with SMTP id a11mr1889529anm.162.1303961014393; Wed, 27 Apr 2011 20:23:34 -0700 (PDT) Received: from [59.112.86.208] (59-112-86-208.dynamic.hinet.net [59.112.86.208]) by mx.google.com with ESMTPS id w39sm1378853ana.39.2011.04.27.20.23.31 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 27 Apr 2011 20:23:33 -0700 (PDT) Subject: [PATCH] Input: omap-keypad - fix a wrong free_irq() parameter From: Axel Lin To: linux-kernel@vger.kernel.org Cc: Timo =?ISO-8859-1?Q?Ter=E4s?= , Dmitry Torokhov , Tony Lindgren , linux-input@vger.kernel.org Date: Thu, 28 Apr 2011 11:23:26 +0800 Message-ID: <1303961006.8127.2.camel@phoenix> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Thu, 28 Apr 2011 03:23:37 +0000 (UTC) In current implementation, free_irq() was using NULL rather than the driver data as the data pointer so free_irq() wouldn't have matched. Signed-off-by: Axel Lin --- drivers/input/keyboard/omap-keypad.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/input/keyboard/omap-keypad.c b/drivers/input/keyboard/omap-keypad.c index 0e2a19c..f23a743 100644 --- a/drivers/input/keyboard/omap-keypad.c +++ b/drivers/input/keyboard/omap-keypad.c @@ -413,7 +413,7 @@ static int __devinit omap_kp_probe(struct platform_device *pdev) return 0; err5: for (i = irq_idx - 1; i >=0; i--) - free_irq(row_gpios[i], NULL); + free_irq(row_gpios[i], omap_kp); err4: input_unregister_device(omap_kp->input); input_dev = NULL; @@ -444,11 +444,11 @@ static int __devexit omap_kp_remove(struct platform_device *pdev) gpio_free(col_gpios[i]); for (i = 0; i < omap_kp->rows; i++) { gpio_free(row_gpios[i]); - free_irq(gpio_to_irq(row_gpios[i]), NULL); + free_irq(gpio_to_irq(row_gpios[i]), omap_kp); } } else { omap_writew(1, OMAP1_MPUIO_BASE + OMAP_MPUIO_KBD_MASKIT); - free_irq(omap_kp->irq, NULL); + free_irq(omap_kp->irq, omap_kp); } del_timer_sync(&omap_kp->timer);