summaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpio-sifive.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpio/gpio-sifive.c')
-rw-r--r--drivers/gpio/gpio-sifive.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/gpio/gpio-sifive.c b/drivers/gpio/gpio-sifive.c
index 63f2c097e4..58934fdfa7 100644
--- a/drivers/gpio/gpio-sifive.c
+++ b/drivers/gpio/gpio-sifive.c
@@ -1,10 +1,10 @@
-// SPDX-License-Identifier: GPL-2.0
+// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (C) 2019 SiFive
*/
#include <linux/basic_mmio_gpio.h>
-#include <printk.h>
+#include <linux/printk.h>
#include <driver.h>
#include <errno.h>
@@ -28,7 +28,7 @@ static int __of_irq_count(struct device_node *np)
return npins / sizeof(__be32);
}
-static int sifive_gpio_probe(struct device_d *dev)
+static int sifive_gpio_probe(struct device *dev)
{
struct bgpio_chip *bgc;
struct resource *res;
@@ -44,7 +44,7 @@ static int sifive_gpio_probe(struct device_d *dev)
}
base = IOMEM(res->start);
- ngpio = __of_irq_count(dev->device_node);
+ ngpio = __of_irq_count(dev->of_node);
if (ngpio > SIFIVE_GPIO_MAX) {
dev_err(dev, "Too many GPIO interrupts (max=%d)\n",
SIFIVE_GPIO_MAX);
@@ -78,8 +78,9 @@ static const struct of_device_id sifive_gpio_match[] = {
{ .compatible = "sifive,fu540-c000-gpio" },
{ },
};
+MODULE_DEVICE_TABLE(of, sifive_gpio_match);
-static struct driver_d sifive_gpio_driver = {
+static struct driver sifive_gpio_driver = {
.name = "sifive_gpio",
.of_compatible = sifive_gpio_match,
.probe = sifive_gpio_probe,