From patchwork Wed Apr 30 16:59:09 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Molton X-Patchwork-Id: 4095151 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id BAC7ABFF02 for ; Wed, 30 Apr 2014 16:59:40 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BB2E7202BE for ; Wed, 30 Apr 2014 16:59:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C81C9202DD for ; Wed, 30 Apr 2014 16:59:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964885AbaD3Q7i (ORCPT ); Wed, 30 Apr 2014 12:59:38 -0400 Received: from ducie-dc1.codethink.co.uk ([185.25.241.215]:47934 "EHLO ducie-dc1.codethink.co.uk" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S964792AbaD3Q7h (ORCPT ); Wed, 30 Apr 2014 12:59:37 -0400 Received: from localhost (localhost [127.0.0.1]) by ducie-dc1.codethink.co.uk (Postfix) with ESMTP id EAEA546645D; Wed, 30 Apr 2014 17:59:36 +0100 (BST) X-Virus-Scanned: Debian amavisd-new at ducie-dc1.codethink.co.uk Received: from ducie-dc1.codethink.co.uk ([127.0.0.1]) by localhost (ducie-dc1.codethink.co.uk [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id wGtxt8tzjbnL; Wed, 30 Apr 2014 17:59:31 +0100 (BST) Received: from snark.dyn.ducie.codethink.co.uk (snark.dyn.ducie.codethink.co.uk [10.24.1.101]) by ducie-dc1.codethink.co.uk (Postfix) with ESMTPS id DA7E0466501; Wed, 30 Apr 2014 17:59:19 +0100 (BST) Received: from ian by snark.dyn.ducie.codethink.co.uk with local (Exim 4.82) (envelope-from ) id 1WfXql-0001pF-D1; Wed, 30 Apr 2014 17:59:15 +0100 From: Ian Molton To: linux-mmc@vger.kernel.org Cc: grant.likely@linaro.org, chris@printf.net, Ian Molton Subject: [PATCH 4/6] mmc: TMIO: use devm_ for requesting irq Date: Wed, 30 Apr 2014 17:59:09 +0100 Message-Id: <1398877151-6965-5-git-send-email-ian.molton@codethink.co.uk> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1398877151-6965-1-git-send-email-ian.molton@codethink.co.uk> References: <1398877151-6965-1-git-send-email-ian.molton@codethink.co.uk> Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 Trivial patch to cleanup resource allocation and freeing. Reviewed-by: Violeta Menendez Signed-off-by: Ian Molton --- drivers/mmc/host/tmio_mmc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/host/tmio_mmc.c b/drivers/mmc/host/tmio_mmc.c index 17415f8..6b5184c 100644 --- a/drivers/mmc/host/tmio_mmc.c +++ b/drivers/mmc/host/tmio_mmc.c @@ -104,7 +104,8 @@ static int tmio_mmc_probe(struct platform_device *pdev) if (ret) goto cell_disable; - ret = request_irq(irq, tmio_mmc_irq, IRQF_TRIGGER_FALLING, + ret = devm_request_irq(&pdev->dev, irq, tmio_mmc_irq, + IRQF_TRIGGER_FALLING, dev_name(&pdev->dev), host); if (ret) goto host_remove; @@ -130,7 +131,6 @@ static int tmio_mmc_remove(struct platform_device *pdev) if (mmc) { struct tmio_mmc_host *host = mmc_priv(mmc); - free_irq(platform_get_irq(pdev, 0), host); tmio_mmc_host_remove(host); if (cell->disable) cell->disable(pdev);