diff options
author | Stephen Warren <swarren@nvidia.com> | 2013-02-15 16:54:48 -0500 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2013-03-03 21:22:18 -0500 |
commit | 165b6c2f33860e13d20cd7ac5993ea3acfb5ea34 (patch) | |
tree | fb6182cb5bc63d3ec162081531459f00a298e3c1 | |
parent | e97f9b5277afeabb54892ebc6f68500098467ba1 (diff) |
gpio/tegra: assume CONFIG_OF
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>
-rw-r--r-- | drivers/gpio/gpio-tegra.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/gpio/gpio-tegra.c b/drivers/gpio/gpio-tegra.c index 414ad912232f..a78a81fbc2b0 100644 --- a/drivers/gpio/gpio-tegra.c +++ b/drivers/gpio/gpio-tegra.c | |||
@@ -398,10 +398,11 @@ static int tegra_gpio_probe(struct platform_device *pdev) | |||
398 | int j; | 398 | int j; |
399 | 399 | ||
400 | match = of_match_device(tegra_gpio_of_match, &pdev->dev); | 400 | match = of_match_device(tegra_gpio_of_match, &pdev->dev); |
401 | if (match) | 401 | if (!match) { |
402 | config = (struct tegra_gpio_soc_config *)match->data; | 402 | dev_err(&pdev->dev, "Error: No device match found\n"); |
403 | else | 403 | return -ENODEV; |
404 | config = &tegra20_gpio_config; | 404 | } |
405 | config = (struct tegra_gpio_soc_config *)match->data; | ||
405 | 406 | ||
406 | tegra_gpio_bank_stride = config->bank_stride; | 407 | tegra_gpio_bank_stride = config->bank_stride; |
407 | tegra_gpio_upper_offset = config->upper_offset; | 408 | tegra_gpio_upper_offset = config->upper_offset; |
@@ -462,9 +463,7 @@ static int tegra_gpio_probe(struct platform_device *pdev) | |||
462 | } | 463 | } |
463 | } | 464 | } |
464 | 465 | ||
465 | #ifdef CONFIG_OF_GPIO | ||
466 | tegra_gpio_chip.of_node = pdev->dev.of_node; | 466 | tegra_gpio_chip.of_node = pdev->dev.of_node; |
467 | #endif | ||
468 | 467 | ||
469 | gpiochip_add(&tegra_gpio_chip); | 468 | gpiochip_add(&tegra_gpio_chip); |
470 | 469 | ||