summaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpio-ath79.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpio/gpio-ath79.c')
-rw-r--r--drivers/gpio/gpio-ath79.c27
1 files changed, 11 insertions, 16 deletions
diff --git a/drivers/gpio/gpio-ath79.c b/drivers/gpio/gpio-ath79.c
index d08d743b54..b32e9552ce 100644
--- a/drivers/gpio/gpio-ath79.c
+++ b/drivers/gpio/gpio-ath79.c
@@ -1,16 +1,14 @@
+// SPDX-License-Identifier: GPL-2.0-only
+// SPDX-FileCopyrightText: 2010-2011 Jaiganesh Narayanan <jnarayanan@atheros.com>
+// SPDX-FileCopyrightText: 2008-2011 Gabor Juhos <juhosg@openwrt.org>
+// SPDX-FileCopyrightText: 2008 Imre Kaloz <kaloz@openwrt.org>
+// SPDX-FileCopyrightText: 2015 Antony Pavlov <antonynpavlov@gmail.com>
+
/*
* Atheros AR71XX/AR724X/AR913X GPIO API support
*
- * Copyright (C) 2010-2011 Jaiganesh Narayanan <jnarayanan@atheros.com>
- * Copyright (C) 2008-2011 Gabor Juhos <juhosg@openwrt.org>
- * Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org>
- * Copyright (C) 2015 Antony Pavlov <antonynpavlov@gmail.com>
- *
* Parts of this file are based on Atheros' 2.6.15/2.6.31 BSP
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 as published
- * by the Free Software Foundation.
*/
#include <common.h>
@@ -104,11 +102,12 @@ static const struct of_device_id ath79_gpio_of_match[] = {
{ .compatible = "qca,ar7100-gpio" },
{},
};
+MODULE_DEVICE_TABLE(of, ath79_gpio_of_match);
-static int ath79_gpio_probe(struct device_d *dev)
+static int ath79_gpio_probe(struct device *dev)
{
struct resource *iores;
- struct device_node *np = dev->device_node;
+ struct device_node *np = dev->of_node;
int err;
if (!np) {
@@ -145,14 +144,10 @@ static int ath79_gpio_probe(struct device_d *dev)
return 0;
}
-static struct driver_d ath79_gpio_driver = {
+static struct driver ath79_gpio_driver = {
.name = "ath79-gpio",
.probe = ath79_gpio_probe,
.of_compatible = DRV_OF_COMPAT(ath79_gpio_of_match),
};
-static int ath79_gpio_init(void)
-{
- return platform_driver_register(&ath79_gpio_driver);
-}
-coredevice_initcall(ath79_gpio_init);
+coredevice_platform_driver(ath79_gpio_driver);