From patchwork Thu May 16 20:34:10 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Russell King X-Patchwork-Id: 244417 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 805A12C00A7 for ; Fri, 17 May 2013 06:35:04 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752651Ab3EPUe5 (ORCPT ); Thu, 16 May 2013 16:34:57 -0400 Received: from caramon.arm.linux.org.uk ([78.32.30.218]:52059 "EHLO caramon.arm.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752100Ab3EPUez (ORCPT ); Thu, 16 May 2013 16:34:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=arm.linux.org.uk; s=caramon; h=Date:Sender:Message-Id:Subject:Cc:To:From:References:In-Reply-To; bh=glxZkp5MPiMOE6CxAlVxB0mPk1LMpbRccBVqEmbcxm4=; b=iP31X1p25NAiM2EkIBoSA36P4prfYZFB9ByIxZ97S7i4rx8tGTY81ko9+BlwS8aUsFmS7aFRXzeZ4pz7lrS/LYSkw8ls4Ok+D6oUM1LWR0Zlz+SY260Djv40cQGq0pTgWcAx1kfKCRIZLD0EUH7i1nGn7y1Btl8YP7ljny/O7XI=; Received: from e0022681537dd.dyn.arm.linux.org.uk ([2002:4e20:1eda:1:222:68ff:fe15:37dd]:34837 helo=rmk-PC.arm.linux.org.uk) by caramon.arm.linux.org.uk with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1Ud4sN-00080m-8U; Thu, 16 May 2013 21:34:11 +0100 Received: from rmk by rmk-PC.arm.linux.org.uk with local (Exim 4.76) (envelope-from ) id 1Ud4sM-0004Ji-3h; Thu, 16 May 2013 21:34:10 +0100 In-Reply-To: <20130516202921.GW18614@n2100.arm.linux.org.uk> References: <20130516202921.GW18614@n2100.arm.linux.org.uk> From: Russell King To: linux-arm-kernel@lists.infradead.org Cc: Jason Cooper , Sebastian Hesselbarth , "Mark A. Greer" , Wolfram Sang , "Ben Dooks (embedded platforms)" , linux-i2c@vger.kernel.org Subject: [PATCH 4/9] I2C: mv64xxx: use devm_clk_get() to avoid missing clk_put() Message-Id: Date: Thu, 16 May 2013 21:34:10 +0100 Sender: linux-i2c-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org This driver forgets to use clk_put(). Rather than adding clk_put(), lets instead use devm_clk_get() to obtain this clock so that it's automatically handled on cleanup. Signed-off-by: Russell King --- drivers/i2c/busses/i2c-mv64xxx.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/i2c/busses/i2c-mv64xxx.c b/drivers/i2c/busses/i2c-mv64xxx.c index 19cc9bf..0b4da77 100644 --- a/drivers/i2c/busses/i2c-mv64xxx.c +++ b/drivers/i2c/busses/i2c-mv64xxx.c @@ -599,7 +599,7 @@ mv64xxx_i2c_probe(struct platform_device *pd) #if defined(CONFIG_HAVE_CLK) /* Not all platforms have a clk */ - drv_data->clk = clk_get(&pd->dev, NULL); + drv_data->clk = devm_clk_get(&pd->dev, NULL); if (!IS_ERR(drv_data->clk)) { clk_prepare(drv_data->clk); clk_enable(drv_data->clk);