diff options
Diffstat (limited to 'drivers/spi/omap3_spi.c')
-rw-r--r-- | drivers/spi/omap3_spi.c | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/drivers/spi/omap3_spi.c b/drivers/spi/omap3_spi.c index ff9eccc37d..78c3a82338 100644 --- a/drivers/spi/omap3_spi.c +++ b/drivers/spi/omap3_spi.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0-or-later /* * Copyright (C) 2012 Jan Luebbe <j.luebbe@pengutronix.de> * @@ -12,17 +13,6 @@ * Copyright (C) 2005, 2006 Nokia Corporation * * Modified by Ruslan Araslanov <ruslan.araslanov@vitecmm.com> - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * 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. - * */ #include <common.h> @@ -342,18 +332,19 @@ static int omap3_spi_setup(struct spi_device *spi) return 0; } -static int omap3_spi_probe_dt(struct device_d *dev, struct omap3_spi_master *omap3_master) +static int omap3_spi_probe_dt(struct device *dev, + struct omap3_spi_master *omap3_master) { - if (!IS_ENABLED(CONFIG_OFDEVICE) || !dev->device_node) + if (!IS_ENABLED(CONFIG_OFDEVICE) || !dev->of_node) return -ENODEV; - if (of_property_read_bool(dev->device_node, "ti,pindir-d0-out-d1-in")) + if (of_property_read_bool(dev->of_node, "ti,pindir-d0-out-d1-in")) omap3_master->swap_miso_mosi = 1; return 0; } -static int omap3_spi_probe(struct device_d *dev) +static int omap3_spi_probe(struct device *dev) { struct resource *iores; struct spi_master *master; @@ -431,6 +422,7 @@ static __maybe_unused struct of_device_id omap_spi_dt_ids[] = { /* sentinel */ } }; +MODULE_DEVICE_TABLE(of, omap_spi_dt_ids); static struct platform_device_id omap_spi_ids[] = { { @@ -444,7 +436,7 @@ static struct platform_device_id omap_spi_ids[] = { }, }; -static struct driver_d omap3_spi_driver = { +static struct driver omap3_spi_driver = { .name = "omap-spi", .probe = omap3_spi_probe, .of_compatible = DRV_OF_COMPAT(omap_spi_dt_ids), |