diff options
Diffstat (limited to 'drivers/gpio')
-rw-r--r-- | drivers/gpio/gpio-generic.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/gpio/gpio-generic.c b/drivers/gpio/gpio-generic.c index d815dd25eb47..b5dff9e742f8 100644 --- a/drivers/gpio/gpio-generic.c +++ b/drivers/gpio/gpio-generic.c | |||
@@ -488,7 +488,7 @@ static int bgpio_pdev_probe(struct platform_device *pdev) | |||
488 | void __iomem *dirout; | 488 | void __iomem *dirout; |
489 | void __iomem *dirin; | 489 | void __iomem *dirin; |
490 | unsigned long sz; | 490 | unsigned long sz; |
491 | unsigned long flags = 0; | 491 | unsigned long flags = pdev->id_entry->driver_data; |
492 | int err; | 492 | int err; |
493 | struct bgpio_chip *bgc; | 493 | struct bgpio_chip *bgc; |
494 | struct bgpio_pdata *pdata = dev_get_platdata(dev); | 494 | struct bgpio_pdata *pdata = dev_get_platdata(dev); |
@@ -519,9 +519,6 @@ static int bgpio_pdev_probe(struct platform_device *pdev) | |||
519 | if (err) | 519 | if (err) |
520 | return err; | 520 | return err; |
521 | 521 | ||
522 | if (!strcmp(platform_get_device_id(pdev)->name, "basic-mmio-gpio-be")) | ||
523 | flags |= BGPIOF_BIG_ENDIAN; | ||
524 | |||
525 | bgc = devm_kzalloc(&pdev->dev, sizeof(*bgc), GFP_KERNEL); | 522 | bgc = devm_kzalloc(&pdev->dev, sizeof(*bgc), GFP_KERNEL); |
526 | if (!bgc) | 523 | if (!bgc) |
527 | return -ENOMEM; | 524 | return -ENOMEM; |
@@ -551,9 +548,14 @@ static int bgpio_pdev_remove(struct platform_device *pdev) | |||
551 | } | 548 | } |
552 | 549 | ||
553 | static const struct platform_device_id bgpio_id_table[] = { | 550 | static const struct platform_device_id bgpio_id_table[] = { |
554 | { "basic-mmio-gpio", }, | 551 | { |
555 | { "basic-mmio-gpio-be", }, | 552 | .name = "basic-mmio-gpio", |
556 | {}, | 553 | .driver_data = 0, |
554 | }, { | ||
555 | .name = "basic-mmio-gpio-be", | ||
556 | .driver_data = BGPIOF_BIG_ENDIAN, | ||
557 | }, | ||
558 | { } | ||
557 | }; | 559 | }; |
558 | MODULE_DEVICE_TABLE(platform, bgpio_id_table); | 560 | MODULE_DEVICE_TABLE(platform, bgpio_id_table); |
559 | 561 | ||