From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751681Ab2H0BpU (ORCPT ); Sun, 26 Aug 2012 21:45:20 -0400 Received: from mail-lb0-f174.google.com ([209.85.217.174]:64626 "EHLO mail-lb0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751516Ab2H0BpR (ORCPT ); Sun, 26 Aug 2012 21:45:17 -0400 MIME-Version: 1.0 In-Reply-To: <1345996865-32082-5-git-send-email-Julia.Lawall@lip6.fr> References: <1345996865-32082-1-git-send-email-Julia.Lawall@lip6.fr> <1345996865-32082-5-git-send-email-Julia.Lawall@lip6.fr> From: Barry Song <21cnbao@gmail.com> Date: Mon, 27 Aug 2012 09:44:54 +0800 Message-ID: Subject: Re: [PATCH 4/13] i2c: sirf: use clk_prepare_enable and clk_disable_unprepare To: Julia Lawall Cc: kernel-janitors@vger.kernel.org, "Wolfram Sang (embedded platforms)" , linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org, "Ben Dooks (embedded platforms)" , "Jean Delvare (PC drivers, core)" , linux-arm-kernel@lists.infradead.org, DL-SHA-WorkGroupLinux Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2012/8/27 Julia Lawall : > From: Julia Lawall > > Clk_prepare_enable and clk_disable_unprepare combine clk_prepare and > clk_enable, and clk_disable and clk_unprepare. They make the code more > concise, and ensure that clk_unprepare is called when clk_enable fails. > > A simplified version of the semantic patch that introduces calls to these > functions is as follows: (http://coccinelle.lip6.fr/) > > // > @@ > expression e; > @@ > > - clk_prepare(e); > - clk_enable(e); > + clk_prepare_enable(e); > > @@ > expression e; > @@ > > - clk_disable(e); > - clk_unprepare(e); > + clk_disable_unprepare(e); > // > > Signed-off-by: Julia Lawall Acked-by: Barry Song <21cnbao@gmail.com>