From patchwork Fri Jun 15 08:42:56 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 9317 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id D151A23E1B for ; Fri, 15 Jun 2012 08:43:09 +0000 (UTC) Received: from mail-yx0-f180.google.com (mail-yx0-f180.google.com [209.85.213.180]) by fiordland.canonical.com (Postfix) with ESMTP id 91A89A182C7 for ; Fri, 15 Jun 2012 08:43:09 +0000 (UTC) Received: by yenq6 with SMTP id q6so2392391yen.11 for ; Fri, 15 Jun 2012 01:43:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:mime-version:content-type :content-transfer-encoding:x-gm-message-state; bh=+VTxEBdP/Fp2trh4tsSHEmEx+3p7QT9TaErhk11CnVU=; b=U5gBSh7Rcp0+UCaDA/NksCnGjWX0gY8SlPS8RR5pJ9ie6kvzbfcbbs/ZqiMMsv8Fz9 CnF/s6dC1TXWTNcLOjVfaxsPir3v9eO5EZNxu7bpyneaa4xO296YFMm+KNd+1vEYeEu/ J15uo3+IZ19qbKDG/5eidwoisOkV0L7Bn8Hr2inQKURVWwPAScrA/o/8OiJLEZhYlSu9 GL4XRF602eb/bYgPhHws9AhhJJHP2aoKMElEbgNeZdzLr/MjjsZSEjFnsPNkxv7HxP4m J4Llhwj7eQVr/evzo9QRogPIHYQH6BQ564w9aoT5oQNBVtoW4w91KO3lXogQbQbecVlY k2fQ== Received: by 10.50.40.193 with SMTP id z1mr878239igk.0.1339749788877; Fri, 15 Jun 2012 01:43:08 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.231.24.148 with SMTP id v20csp132191ibb; Fri, 15 Jun 2012 01:43:08 -0700 (PDT) Received: by 10.216.140.35 with SMTP id d35mr2674878wej.105.1339749787745; Fri, 15 Jun 2012 01:43:07 -0700 (PDT) Received: from mail-wi0-f172.google.com (mail-wi0-f172.google.com [209.85.212.172]) by mx.google.com with ESMTPS id gg6si1539046wib.16.2012.06.15.01.43.07 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 15 Jun 2012 01:43:07 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.172 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) client-ip=209.85.212.172; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.172 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) smtp.mail=lee.jones@linaro.org Received: by wibhj8 with SMTP id hj8so219363wib.13 for ; Fri, 15 Jun 2012 01:43:07 -0700 (PDT) Received: by 10.180.78.193 with SMTP id d1mr2459450wix.18.1339749787169; Fri, 15 Jun 2012 01:43:07 -0700 (PDT) Received: from localhost.localdomain (cpc1-aztw13-0-0-cust473.18-1.cable.virginmedia.com. [77.102.241.218]) by mx.google.com with ESMTPS id f19sm3138481wiw.11.2012.06.15.01.43.05 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 15 Jun 2012 01:43:06 -0700 (PDT) From: Lee Jones To: linux-arm-kernel@lists.infradead.org Cc: linus.walleij@linaro.org, arnd@arndb.de, Lee Jones , stable@vger.kernel.org Subject: [PATCH 1/1] ARM: ux500: Fix build errors/warnings when MACH_UX500_DT is not set Date: Fri, 15 Jun 2012 09:42:56 +0100 Message-Id: <1339749776-9468-1-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.7.9.5 MIME-Version: 1.0 X-Gm-Message-State: ALoCoQnd2A1KfkDhovuCg6z/1fvwEHZpP16BL69TTTUuCKSPpBoe+UX2Jq/v/1rdHFCM/BQXnUZW When MACH_UX500_DT and all related Device Tree configurations are forced off the warning and error below prevent the kernel from compiling. This simple patch fixes both issues and allows for full build and boot of ST-Ericsson's low-cost development board, Snowball. Warnings fixed: arch/arm/mach-ux500/board-mop500.c:680:32: warning: ‘snowball_of_platform_devs’ defined but not used Errors fixed: arch/arm/mach-ux500/timer.c: In function ‘ux500_timer_init’: arch/arm/mach-ux500/timer.c:66:3: error: implicit declaration of function ‘of_find_matching_node’ arch/arm/mach-ux500/timer.c:66:6: warning: assignment makes pointer from integer without a cast Cc: stable@vger.kernel.org Signed-off-by: Lee Jones --- arch/arm/mach-ux500/board-mop500.c | 10 +++++----- arch/arm/mach-ux500/timer.c | 2 ++ 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c index 9c74ac5..73fb6e8 100644 --- a/arch/arm/mach-ux500/board-mop500.c +++ b/arch/arm/mach-ux500/board-mop500.c @@ -677,11 +677,6 @@ static struct platform_device *snowball_platform_devs[] __initdata = { &ab8500_device, }; -static struct platform_device *snowball_of_platform_devs[] __initdata = { - &snowball_led_dev, - &snowball_key_dev, -}; - static void __init mop500_init_machine(void) { struct device *parent = NULL; @@ -821,6 +816,11 @@ MACHINE_END #ifdef CONFIG_MACH_UX500_DT +static struct platform_device *snowball_of_platform_devs[] __initdata = { + &snowball_led_dev, + &snowball_key_dev, +}; + struct of_dev_auxdata u8500_auxdata_lookup[] __initdata = { /* Requires DMA and call-back bindings. */ OF_DEV_AUXDATA("arm,pl011", 0x80120000, "uart0", &uart0_plat), diff --git a/arch/arm/mach-ux500/timer.c b/arch/arm/mach-ux500/timer.c index 741e71f..66e7f00 100644 --- a/arch/arm/mach-ux500/timer.c +++ b/arch/arm/mach-ux500/timer.c @@ -63,8 +63,10 @@ static void __init ux500_timer_init(void) /* TODO: Once MTU has been DT:ed place code above into else. */ if (of_have_populated_dt()) { +#ifdef CONFIG_OF np = of_find_matching_node(NULL, prcmu_timer_of_match); if (!np) +#endif goto dt_fail; tmp_base = of_iomap(np, 0);