diff options
Diffstat (limited to 'drivers/gpio/gpio-tegra.c')
-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 dde0656ea951..da4cb5b0cb87 100644 --- a/drivers/gpio/gpio-tegra.c +++ b/drivers/gpio/gpio-tegra.c | |||
@@ -414,10 +414,11 @@ static int tegra_gpio_probe(struct platform_device *pdev) | |||
414 | int j; | 414 | int j; |
415 | 415 | ||
416 | match = of_match_device(tegra_gpio_of_match, &pdev->dev); | 416 | match = of_match_device(tegra_gpio_of_match, &pdev->dev); |
417 | if (match) | 417 | if (!match) { |
418 | config = (struct tegra_gpio_soc_config *)match->data; | 418 | dev_err(&pdev->dev, "Error: No device match found\n"); |
419 | else | 419 | return -ENODEV; |
420 | config = &tegra20_gpio_config; | 420 | } |
421 | config = (struct tegra_gpio_soc_config *)match->data; | ||
421 | 422 | ||
422 | tegra_gpio_bank_stride = config->bank_stride; | 423 | tegra_gpio_bank_stride = config->bank_stride; |
423 | tegra_gpio_upper_offset = config->upper_offset; | 424 | tegra_gpio_upper_offset = config->upper_offset; |
@@ -478,9 +479,7 @@ static int tegra_gpio_probe(struct platform_device *pdev) | |||
478 | } | 479 | } |
479 | } | 480 | } |
480 | 481 | ||
481 | #ifdef CONFIG_OF_GPIO | ||
482 | tegra_gpio_chip.of_node = pdev->dev.of_node; | 482 | tegra_gpio_chip.of_node = pdev->dev.of_node; |
483 | #endif | ||
484 | 483 | ||
485 | gpiochip_add(&tegra_gpio_chip); | 484 | gpiochip_add(&tegra_gpio_chip); |
486 | 485 | ||