diff options
Diffstat (limited to 'drivers/gpio/gpio-mvebu.c')
-rw-r--r-- | drivers/gpio/gpio-mvebu.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/drivers/gpio/gpio-mvebu.c b/drivers/gpio/gpio-mvebu.c index d42509422394..418e38650363 100644 --- a/drivers/gpio/gpio-mvebu.c +++ b/drivers/gpio/gpio-mvebu.c | |||
@@ -535,7 +535,7 @@ static void mvebu_gpio_dbg_show(struct seq_file *s, struct gpio_chip *chip) | |||
535 | #define mvebu_gpio_dbg_show NULL | 535 | #define mvebu_gpio_dbg_show NULL |
536 | #endif | 536 | #endif |
537 | 537 | ||
538 | static struct of_device_id mvebu_gpio_of_match[] = { | 538 | static const struct of_device_id mvebu_gpio_of_match[] = { |
539 | { | 539 | { |
540 | .compatible = "marvell,orion-gpio", | 540 | .compatible = "marvell,orion-gpio", |
541 | .data = (void *) MVEBU_GPIO_SOC_VARIANT_ORION, | 541 | .data = (void *) MVEBU_GPIO_SOC_VARIANT_ORION, |
@@ -574,10 +574,8 @@ static int mvebu_gpio_probe(struct platform_device *pdev) | |||
574 | soc_variant = MVEBU_GPIO_SOC_VARIANT_ORION; | 574 | soc_variant = MVEBU_GPIO_SOC_VARIANT_ORION; |
575 | 575 | ||
576 | mvchip = devm_kzalloc(&pdev->dev, sizeof(struct mvebu_gpio_chip), GFP_KERNEL); | 576 | mvchip = devm_kzalloc(&pdev->dev, sizeof(struct mvebu_gpio_chip), GFP_KERNEL); |
577 | if (!mvchip) { | 577 | if (!mvchip) |
578 | dev_err(&pdev->dev, "Cannot allocate memory\n"); | ||
579 | return -ENOMEM; | 578 | return -ENOMEM; |
580 | } | ||
581 | 579 | ||
582 | if (of_property_read_u32(pdev->dev.of_node, "ngpios", &ngpios)) { | 580 | if (of_property_read_u32(pdev->dev.of_node, "ngpios", &ngpios)) { |
583 | dev_err(&pdev->dev, "Missing ngpios OF property\n"); | 581 | dev_err(&pdev->dev, "Missing ngpios OF property\n"); |
@@ -738,9 +736,4 @@ static struct platform_driver mvebu_gpio_driver = { | |||
738 | }, | 736 | }, |
739 | .probe = mvebu_gpio_probe, | 737 | .probe = mvebu_gpio_probe, |
740 | }; | 738 | }; |
741 | 739 | module_platform_driver(mvebu_gpio_driver); | |
742 | static int __init mvebu_gpio_init(void) | ||
743 | { | ||
744 | return platform_driver_register(&mvebu_gpio_driver); | ||
745 | } | ||
746 | postcore_initcall(mvebu_gpio_init); | ||