From patchwork Wed Sep 18 12:48:32 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thierry Reding X-Patchwork-Id: 2906471 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 26FB39F1BF for ; Wed, 18 Sep 2013 12:49:51 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8757420381 for ; Wed, 18 Sep 2013 12:49:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 644ED200F8 for ; Wed, 18 Sep 2013 12:49:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752047Ab3IRMto (ORCPT ); Wed, 18 Sep 2013 08:49:44 -0400 Received: from mail-bk0-f53.google.com ([209.85.214.53]:51763 "EHLO mail-bk0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751534Ab3IRMtn (ORCPT ); Wed, 18 Sep 2013 08:49:43 -0400 Received: by mail-bk0-f53.google.com with SMTP id d7so2744341bkh.26 for ; Wed, 18 Sep 2013 05:49:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=J0/TLuONChU1LXr6ZnJRgi5e4iel3iM2tpeM4admWeA=; b=Lzz7QLtSEJAi5HXDSOic9XWX1bxjoZMB7vBLq6cnjQhKNQi0Ungd4zOqK0gUaKBQ+2 a2WzgRfBHQI1x0ffggjeGDqYhpz6fcrw7Ut/mPVBJXVYjDwriVSZDsy+IeEEHS0usu05 u7muzIdpogE447VMt7nz+Dj8d4qJTVkvhHkWcU062DjMSn/vOcXP156xPVbNSDOa3LWs xtV+qIBjedqdgdxZprih/u3ywkC1++rTpIJnMPRqTChoaTFP18u19hM0PbQtLG56OfsL 8duB0Bzn/D7eXm7Cufc5huEJIOZ1JdtRPuublkAWc3SQuN3v8YzsdNgeQc6NsrFk58bW uT2w== X-Received: by 10.204.168.197 with SMTP id v5mr34212524bky.24.1379508582152; Wed, 18 Sep 2013 05:49:42 -0700 (PDT) Received: from localhost (port-55509.pppoe.wtnet.de. [46.59.217.135]) by mx.google.com with ESMTPSA id jt14sm827127bkb.0.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 18 Sep 2013 05:49:41 -0700 (PDT) From: Thierry Reding To: Benjamin Herrenschmidt , Jean-Christophe Plagniol-Villard , Tomi Valkeinen Cc: linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] radeon: Conditionally compile PM code Date: Wed, 18 Sep 2013 14:48:32 +0200 Message-Id: <1379508512-30155-1-git-send-email-treding@nvidia.com> X-Mailer: git-send-email 1.8.4 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, 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 The power management code is only used on X86 and PowerMac. To prevent the compiler from warning about unused code, only build when PM and one of X86 or PowerMac is selected. Signed-off-by: Thierry Reding --- drivers/video/aty/radeon_pm.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/video/aty/radeon_pm.c b/drivers/video/aty/radeon_pm.c index f7091ec..f4317f1 100644 --- a/drivers/video/aty/radeon_pm.c +++ b/drivers/video/aty/radeon_pm.c @@ -1427,6 +1427,8 @@ static void radeon_pm_full_reset_sdram(struct radeonfb_info *rinfo) mdelay( 15); } +#if defined(CONFIG_PM) +#if defined(CONFIG_X86) || defined(CONFIG_PPC_PMAC) static void radeon_pm_reset_pad_ctlr_strength(struct radeonfb_info *rinfo) { u32 tmp, tmp2; @@ -1939,9 +1941,10 @@ static void radeon_reinitialize_M10(struct radeonfb_info *rinfo) */ radeon_pm_m10_enable_lvds_spread_spectrum(rinfo); } +#endif #ifdef CONFIG_PPC_OF - +#ifdef CONFIG_PPC_PMAC static void radeon_pm_m9p_reconfigure_mc(struct radeonfb_info *rinfo) { OUTREG(MC_CNTL, rinfo->save_regs[46]); @@ -2202,6 +2205,8 @@ static void radeon_reinitialize_M9P(struct radeonfb_info *rinfo) radeon_pm_restore_pixel_pll(rinfo); radeon_pm_m10_enable_lvds_spread_spectrum(rinfo); } +#endif +#endif #if 0 /* Not ready yet */ static void radeon_reinitialize_QW(struct radeonfb_info *rinfo)