From patchwork Fri Dec 14 05:53:51 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 1877301 Return-Path: X-Original-To: patchwork-linux-sh@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 26BAEDF230 for ; Fri, 14 Dec 2012 05:51:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751309Ab2LNFtU (ORCPT ); Fri, 14 Dec 2012 00:49:20 -0500 Received: from mail-da0-f46.google.com ([209.85.210.46]:61094 "EHLO mail-da0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753491Ab2LNFtR (ORCPT ); Fri, 14 Dec 2012 00:49:17 -0500 Received: by mail-da0-f46.google.com with SMTP id p5so1272089dak.19 for ; Thu, 13 Dec 2012 21:49:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:date:message-id:in-reply-to:references:subject; bh=cGOtizRHrIMVd4GxNlu/cc/dXeH7eLnVpGwfMVTjylM=; b=dcfD5nHJNHh0RBN6AITVTo1SXij+alOWIC/tEdeeApwNlN/xf4PYJzcUsAnYcmCNrL nXP3GodjB4LwOmNnuGNae3f3OHFhd3U7nK8N+I3hO3QcAA4sDWCZ7zC8eOIjDlooPIFl +7PuUohP07u97WgkWKk1xFgv3RSNsY7o+iJMY/6WjThj3qze5/AxfM0P6QAXnEBRcEYz SZ+QOHCycmOdeMDTIoHRPWw/Vr/QtpeNSV3702KbSWOVpnLUTEiv0/RMdTBe62JNlhUn 7KaII1lNSMFIMLQPts/B0NWISV9PU4K9cMNsRvCUvSTZje2c0koZ1tYQ1vyU12n7yYdk 2cYw== Received: by 10.68.204.103 with SMTP id kx7mr12911661pbc.33.1355464156927; Thu, 13 Dec 2012 21:49:16 -0800 (PST) Received: from [127.0.0.1] (FLH1Adc226.tky.mesh.ad.jp. [220.102.212.226]) by mx.google.com with ESMTPS id d9sm2570788paw.33.2012.12.13.21.49.14 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 13 Dec 2012 21:49:16 -0800 (PST) From: Magnus Damm To: linux-kernel@vger.kernel.org Cc: linux-sh@vger.kernel.org, johnstul@us.ibm.com, horms@verge.net.au, shinya.kuribayashi.px@renesas.com, tglx@linutronix.de, Magnus Damm Date: Fri, 14 Dec 2012 14:53:51 +0900 Message-Id: <20121214055351.10081.82218.sendpatchset@w520> In-Reply-To: <20121214055323.10081.12056.sendpatchset@w520> References: <20121214055323.10081.12056.sendpatchset@w520> Subject: [PATCH 03/08] clocksource: sh_cmt: Consolidate platform_set_drvdata() call Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org From: Magnus Damm Cleanup the use of platform_set_drvdata() to reduce code size Signed-off-by: Shinya Kuribayashi Signed-off-by: Magnus Damm --- drivers/clocksource/sh_cmt.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- 0003/drivers/clocksource/sh_cmt.c +++ work/drivers/clocksource/sh_cmt.c 2012-12-14 12:54:59.000000000 +0900 @@ -649,8 +649,6 @@ static int sh_cmt_setup(struct sh_cmt_pr goto err0; } - platform_set_drvdata(pdev, p); - res = platform_get_resource(p->pdev, IORESOURCE_MEM, 0); if (!res) { dev_err(&p->pdev->dev, "failed to get I/O memory\n"); @@ -718,6 +716,8 @@ static int sh_cmt_setup(struct sh_cmt_pr goto err2; } + platform_set_drvdata(pdev, p); + return 0; err2: clk_put(p->clk); @@ -753,7 +753,6 @@ static int __devinit sh_cmt_probe(struct ret = sh_cmt_setup(p, pdev); if (ret) { kfree(p); - platform_set_drvdata(pdev, NULL); pm_runtime_idle(&pdev->dev); return ret; }