Skip to content

Commit

Permalink
i2c: at91: fix unsed variable warning when building with !CONFIG_OF
Browse files Browse the repository at this point in the history
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 <manabian@gmail.com>
Signed-off-by: Wolfram Sang <wolfram@the-dreams.de>
  • Loading branch information
Joachim Eastwood authored and Wolfram Sang committed Feb 10, 2013
1 parent 13f35ac commit 4182b43
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions drivers/i2c/busses/i2c-at91.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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,at91rm9200-i2c",
Expand Down

0 comments on commit 4182b43

Please sign in to comment.