Skip to content

Commit

Permalink
nomadik-gpio: use dev name if no name is specified
Browse files Browse the repository at this point in the history
Platforms may choose not to provide an additional name for the GPIO
block.

Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
  • Loading branch information
Rabin Vincent authored and Linus Walleij committed Dec 8, 2010
1 parent ec4a637 commit 8d568ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/arm/plat-nomadik/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,7 @@ static int __devinit nmk_gpio_probe(struct platform_device *dev)

chip = &nmk_chip->chip;
chip->base = pdata->first_gpio;
chip->label = pdata->name;
chip->label = pdata->name ?: dev_name(&dev->dev);
chip->dev = &dev->dev;
chip->owner = THIS_MODULE;

Expand Down

0 comments on commit 8d568ae

Please sign in to comment.