From patchwork Sat Feb 9 18:14:00 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joachim Eastwood X-Patchwork-Id: 219424 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 048DB2C0087 for ; Sun, 10 Feb 2013 05:14:49 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932459Ab3BISOr (ORCPT ); Sat, 9 Feb 2013 13:14:47 -0500 Received: from mail-la0-f49.google.com ([209.85.215.49]:43337 "EHLO mail-la0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932445Ab3BISOr (ORCPT ); Sat, 9 Feb 2013 13:14:47 -0500 Received: by mail-la0-f49.google.com with SMTP id fs13so4655445lab.22 for ; Sat, 09 Feb 2013 10:14:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer; bh=XAft5s6qtyjRzLtvSYuqpojBawKiMt1sHPEaVqOl1pA=; b=RAzHV1rn/tmWYD/Xdv+7nb9YUr9v5SbxjrdjyjnxfWx6yX33Vt0/FZxO0i8svwQYWE XvHImVd/6NUz0CC4/BFuZ2etgyWCeX02zn23QKq6ZSEhrWn8VoGKOY/IF6S+Mhz0Dylz PwnwQyB1cRmwJFoCMyhtt5ikfOPyV794JpWXXWo3qXJ/OkF2zUuUyWtLATWsnbn/KCJY S+36PhI0z/4juFJSzKsaFmTvEMYImXFPKBX4M27JuV0h9EVkF9IJGkdzqjKDPvjyctVC bYeM9xpKQrQTJq0+dJW8k2y/W/Z8YWSXkASegBzwU3/tQ7qn4Qj2hhrOaNO3ftmqqjTc CQeA== X-Received: by 10.112.38.98 with SMTP id f2mr3717119lbk.61.1360433685467; Sat, 09 Feb 2013 10:14:45 -0800 (PST) Received: from localhost.localdomain ([90.149.223.57]) by mx.google.com with ESMTPS id mq7sm1341942lab.1.2013.02.09.10.14.43 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 09 Feb 2013 10:14:44 -0800 (PST) From: Joachim Eastwood To: ludovic.desroches@atmel.com, w.sang@pengutronix.de Cc: linux-i2c@vger.kernel.org, Joachim Eastwood Subject: [PATCH] i2c: at91: fix unsed variable warning when building with !CONFIG_OF Date: Sat, 9 Feb 2013 19:14:00 +0100 Message-Id: <1360433640-30160-1-git-send-email-manabian@gmail.com> X-Mailer: git-send-email 1.8.0 Sender: linux-i2c-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org Commit 70d46a2 "i2c: at91: add dt support to i2c-at91" added DT only support for at91sam9x5. Building i2c-at91 without CONFIG_OF now warns about at91sam9x5_config as being unused. drivers/i2c/busses/i2c-at91.c:556:30: warning: 'at91sam9x5_config' defined but not used [-Wunused-variable] Move at91sam9x5_config under the defined(CONFIG_OF) guard as new AT91 SoCs will be DT only. Signed-off-by: Joachim Eastwood --- Hi, This patch is agains 3.8-rc7 since the warning was introduced in the 3.8 merge cycle. regards Joachim Eastwood drivers/i2c/busses/i2c-at91.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/i2c/busses/i2c-at91.c b/drivers/i2c/busses/i2c-at91.c index 2bfc04d..708026b 100644 --- a/drivers/i2c/busses/i2c-at91.c +++ b/drivers/i2c/busses/i2c-at91.c @@ -553,13 +553,6 @@ static struct at91_twi_pdata at91sam9g10_config = { .has_dma_support = false, }; -static struct at91_twi_pdata at91sam9x5_config = { - .clk_max_div = 7, - .clk_offset = 4, - .has_unre_flag = false, - .has_dma_support = true, -}; - static const struct platform_device_id at91_twi_devtypes[] = { { .name = "i2c-at91rm9200", @@ -582,6 +575,13 @@ static const struct platform_device_id at91_twi_devtypes[] = { }; #if defined(CONFIG_OF) +static struct at91_twi_pdata at91sam9x5_config = { + .clk_max_div = 7, + .clk_offset = 4, + .has_unre_flag = false, + .has_dma_support = true, +}; + static const struct of_device_id atmel_twi_dt_ids[] = { { .compatible = "atmel,at91sam9260-i2c",