From patchwork Mon Mar 31 15:15:42 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tero Kristo X-Patchwork-Id: 27489 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qg0-f69.google.com (mail-qg0-f69.google.com [209.85.192.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 5095E202E0 for ; Mon, 31 Mar 2014 15:19:28 +0000 (UTC) Received: by mail-qg0-f69.google.com with SMTP id a108sf11816999qge.8 for ; Mon, 31 Mar 2014 08:19:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:subject:date:message-id :in-reply-to:references:mime-version:cc:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :sender:errors-to:x-original-sender :x-original-authentication-results:mailing-list:content-type :content-transfer-encoding; bh=ivQU425jVqCv5UvqAqExmY8rky5C4PaxTVyN2sCWFus=; b=DHo15nXSEzYkLy5UITpK6m+CrXv5Xn1uloi4nvC+26pkU2XaWE4hhNJEWx5e95Jh19 ASWn1jXVPEqu5P4zxox5+VNkMRX6ci132FOyl5UXBHSo6G0D+nqQlGcFr/45tOdgZQ2p DEMLW42nTTlFK9kTrbNTvdfSM1y+jOfn5ttvjgXW301ve7/rpiiKmVdAjdZzvodtbY62 ISBFtwVgOCf2m73qU2PJtfDsoEpCDklhpXCZcJqoPczZUBwbCKR/HXeRXHJoFWjIpXuU rlH0Mh9xSUhTLALXkLRc8O/QjuLBmVTVluYBHNfQs8TVv8/UmKTFM5PORk7MzFRb0KCm qvYg== X-Gm-Message-State: ALoCoQn24EGyxLJhwrvLwKYVGmoOGsWg9bJM4+h40WNUmHasracQDcYLAimr//yVLjdFRnuARvNX X-Received: by 10.52.28.116 with SMTP id a20mr8930952vdh.2.1396279168071; Mon, 31 Mar 2014 08:19:28 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.43.134 with SMTP id e6ls2450535qga.17.gmail; Mon, 31 Mar 2014 08:19:27 -0700 (PDT) X-Received: by 10.58.126.4 with SMTP id mu4mr24525409veb.0.1396279167895; Mon, 31 Mar 2014 08:19:27 -0700 (PDT) Received: from mail-vc0-f172.google.com (mail-vc0-f172.google.com [209.85.220.172]) by mx.google.com with ESMTPS id cb3si3015955vdc.131.2014.03.31.08.19.27 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 31 Mar 2014 08:19:27 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.172 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.172; Received: by mail-vc0-f172.google.com with SMTP id la4so8338086vcb.17 for ; Mon, 31 Mar 2014 08:19:27 -0700 (PDT) X-Received: by 10.58.150.68 with SMTP id ug4mr46067veb.50.1396279167809; Mon, 31 Mar 2014 08:19:27 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.12.8 with SMTP id v8csp150872vcv; Mon, 31 Mar 2014 08:19:27 -0700 (PDT) X-Received: by 10.194.110.100 with SMTP id hz4mr6646827wjb.50.1396279167012; Mon, 31 Mar 2014 08:19:27 -0700 (PDT) Received: from casper.infradead.org (casper.infradead.org. [2001:770:15f::2]) by mx.google.com with ESMTPS id x3si1186476wif.3.2014.03.31.08.19.26 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 31 Mar 2014 08:19:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:770:15f::2 as permitted sender) client-ip=2001:770:15f::2; Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WUdyT-00057U-3h; Mon, 31 Mar 2014 15:18:09 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WUdyH-0004H3-I4; Mon, 31 Mar 2014 15:17:57 +0000 Received: from comal.ext.ti.com ([198.47.26.152]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WUdxb-00044H-8c for linux-arm-kernel@lists.infradead.org; Mon, 31 Mar 2014 15:17:18 +0000 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id s2VFGtch015103; Mon, 31 Mar 2014 10:16:55 -0500 Received: from DLEE70.ent.ti.com (dlemailx.itg.ti.com [157.170.170.113]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id s2VFGtLc013425; Mon, 31 Mar 2014 10:16:55 -0500 Received: from dflp32.itg.ti.com (10.64.6.15) by DLEE70.ent.ti.com (157.170.170.113) with Microsoft SMTP Server id 14.3.174.1; Mon, 31 Mar 2014 10:16:55 -0500 Received: from localhost.localdomain (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id s2VFGm3o013169; Mon, 31 Mar 2014 10:16:54 -0500 From: Tero Kristo To: , , Subject: [PATCH 03/55] ARM: OMAP2+: PRM: remove unnecessary cpu_is_XXX calls from prm_init / exit Date: Mon, 31 Mar 2014 18:15:42 +0300 Message-ID: <1396278994-12624-4-git-send-email-t-kristo@ti.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1396278994-12624-1-git-send-email-t-kristo@ti.com> References: <1396278994-12624-1-git-send-email-t-kristo@ti.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140331_111715_676575_B96308A4 X-CRM114-Status: UNSURE ( 9.45 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -7.5 (-------) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-7.5 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high trust [198.47.26.152 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -0.6 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: t-kristo@ti.com X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.172 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Done in preparation to make PRM its own driver, as the cpu_is_XXX calls are not available outside mach-omap2 folder. The init functions are called only from cpu specific init chain, and thus don't need to double check against cpu type. The exit calls check against the data provided during init-time registration and thus don't need cpu check either. Signed-off-by: Tero Kristo --- arch/arm/mach-omap2/prm2xxx.c | 13 +------------ arch/arm/mach-omap2/prm3xxx.c | 10 +--------- arch/arm/mach-omap2/prm44xx.c | 10 +--------- 3 files changed, 3 insertions(+), 30 deletions(-) diff --git a/arch/arm/mach-omap2/prm2xxx.c b/arch/arm/mach-omap2/prm2xxx.c index 45f83dd..a7f1cac 100644 --- a/arch/arm/mach-omap2/prm2xxx.c +++ b/arch/arm/mach-omap2/prm2xxx.c @@ -18,9 +18,6 @@ #include #include -#include "soc.h" -#include "common.h" -#include "vp.h" #include "powerdomain.h" #include "clockdomain.h" #include "prm2xxx_3xxx_private.h" @@ -261,19 +258,11 @@ static struct prm_ll_data omap2xxx_prm_ll_data = { int __init omap2xxx_prm_init(void) { - if (!cpu_is_omap24xx()) - return 0; - return prm_register(&omap2xxx_prm_ll_data); } static void __exit omap2xxx_prm_exit(void) { - if (!cpu_is_omap24xx()) - return; - - /* Should never happen */ - WARN(prm_unregister(&omap2xxx_prm_ll_data), - "%s: prm_ll_data function pointer mismatch\n", __func__); + prm_unregister(&omap2xxx_prm_ll_data); } __exitcall(omap2xxx_prm_exit); diff --git a/arch/arm/mach-omap2/prm3xxx.c b/arch/arm/mach-omap2/prm3xxx.c index 6d3e9c2..1a39954 100644 --- a/arch/arm/mach-omap2/prm3xxx.c +++ b/arch/arm/mach-omap2/prm3xxx.c @@ -639,9 +639,6 @@ static struct prm_ll_data omap3xxx_prm_ll_data = { int __init omap3xxx_prm_init(void) { - if (!cpu_is_omap34xx()) - return 0; - return prm_register(&omap3xxx_prm_ll_data); } @@ -664,11 +661,6 @@ omap_subsys_initcall(omap3xxx_prm_late_init); static void __exit omap3xxx_prm_exit(void) { - if (!cpu_is_omap34xx()) - return; - - /* Should never happen */ - WARN(prm_unregister(&omap3xxx_prm_ll_data), - "%s: prm_ll_data function pointer mismatch\n", __func__); + prm_unregister(&omap3xxx_prm_ll_data); } __exitcall(omap3xxx_prm_exit); diff --git a/arch/arm/mach-omap2/prm44xx.c b/arch/arm/mach-omap2/prm44xx.c index 3655e16..be96881 100644 --- a/arch/arm/mach-omap2/prm44xx.c +++ b/arch/arm/mach-omap2/prm44xx.c @@ -660,9 +660,6 @@ static struct prm_ll_data omap44xx_prm_ll_data = { int __init omap44xx_prm_init(void) { - if (!cpu_is_omap44xx() && !soc_is_omap54xx() && !soc_is_dra7xx()) - return 0; - return prm_register(&omap44xx_prm_ll_data); } @@ -679,11 +676,6 @@ omap_subsys_initcall(omap44xx_prm_late_init); static void __exit omap44xx_prm_exit(void) { - if (!cpu_is_omap44xx()) - return; - - /* Should never happen */ - WARN(prm_unregister(&omap44xx_prm_ll_data), - "%s: prm_ll_data function pointer mismatch\n", __func__); + prm_unregister(&omap44xx_prm_ll_data); } __exitcall(omap44xx_prm_exit);