Skip to content

Commit

Permalink
gpio/tegra: assume CONFIG_OF
Browse files Browse the repository at this point in the history
Tegra only supports, and always enables, device tree. Remove all ifdefs
and runtime checks for DT support from the driver.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
  • Loading branch information
Stephen Warren authored and Grant Likely committed Mar 4, 2013
1 parent e97f9b5 commit 165b6c2
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions drivers/gpio/gpio-tegra.c
Original file line number Diff line number Diff line change
Expand Up @@ -398,10 +398,11 @@ static int tegra_gpio_probe(struct platform_device *pdev)
int j;

match = of_match_device(tegra_gpio_of_match, &pdev->dev);
if (match)
config = (struct tegra_gpio_soc_config *)match->data;
else
config = &tegra20_gpio_config;
if (!match) {
dev_err(&pdev->dev, "Error: No device match found\n");
return -ENODEV;
}
config = (struct tegra_gpio_soc_config *)match->data;

tegra_gpio_bank_stride = config->bank_stride;
tegra_gpio_upper_offset = config->upper_offset;
Expand Down Expand Up @@ -462,9 +463,7 @@ static int tegra_gpio_probe(struct platform_device *pdev)
}
}

#ifdef CONFIG_OF_GPIO
tegra_gpio_chip.of_node = pdev->dev.of_node;
#endif

gpiochip_add(&tegra_gpio_chip);

Expand Down

0 comments on commit 165b6c2

Please sign in to comment.