diff options
Diffstat (limited to 'drivers/gpio/gpio-digic.c')
-rw-r--r-- | drivers/gpio/gpio-digic.c | 29 |
1 files changed, 6 insertions, 23 deletions
diff --git a/drivers/gpio/gpio-digic.c b/drivers/gpio/gpio-digic.c index 714e3b4a1d..7e2db85efe 100644 --- a/drivers/gpio/gpio-digic.c +++ b/drivers/gpio/gpio-digic.c @@ -1,19 +1,5 @@ -/* - * Copyright (C) 2013 Antony Pavlov <antonynpavlov@gmail.com> - * - * This file is part of barebox. - * See file CREDITS for list of people who contributed to this project. - * - * 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. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - */ +// SPDX-License-Identifier: GPL-2.0-only +// SPDX-FileCopyrightText: 2013 Antony Pavlov <antonynpavlov@gmail.com> #include <common.h> #include <malloc.h> @@ -120,7 +106,7 @@ static struct gpio_ops digic_gpio_ops = { .set = digic_gpio_set_value, }; -static int digic_gpio_probe(struct device_d *dev) +static int digic_gpio_probe(struct device *dev) { struct resource *iores; struct digic_gpio_chip *chip; @@ -170,15 +156,12 @@ static __maybe_unused struct of_device_id digic_gpio_dt_ids[] = { /* sentinel */ } }; +MODULE_DEVICE_TABLE(of, digic_gpio_dt_ids); -static struct driver_d digic_gpio_driver = { +static struct driver digic_gpio_driver = { .name = "digic-gpio", .probe = digic_gpio_probe, .of_compatible = DRV_OF_COMPAT(digic_gpio_dt_ids), }; -static int digic_gpio_init(void) -{ - return platform_driver_register(&digic_gpio_driver); -} -coredevice_initcall(digic_gpio_init); +coredevice_platform_driver(digic_gpio_driver); |