diff options
Diffstat (limited to 'drivers/spi/ath79_spi.c')
-rw-r--r-- | drivers/spi/ath79_spi.c | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/drivers/spi/ath79_spi.c b/drivers/spi/ath79_spi.c index 2a4e32a4cc..41a31ae922 100644 --- a/drivers/spi/ath79_spi.c +++ b/drivers/spi/ath79_spi.c @@ -1,18 +1,8 @@ +// SPDX-License-Identifier: GPL-2.0-or-later /* * Copyright (C) 2013, 2014 Antony Pavlov <antonynpavlov@gmail.com> * * This file is part of barebox. - * - * 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> @@ -136,7 +126,7 @@ static inline void ath79_spi_chipselect(struct ath79_spi *sp, int chipselect) static int ath79_spi_setup(struct spi_device *spi) { struct spi_master *master = spi->master; - struct device_d spi_dev = spi->dev; + struct device spi_dev = spi->dev; if (spi->bits_per_word != 8) { dev_err(master->dev, "master doesn't support %d bits per word requested by %s\n", @@ -230,7 +220,7 @@ static void ath79_spi_disable(struct ath79_spi *sp) ath79_spi_wr(sp, 0, AR71XX_SPI_REG_FS); } -static int ath79_spi_probe(struct device_d *dev) +static int ath79_spi_probe(struct device *dev) { struct resource *iores; struct spi_master *master; @@ -248,7 +238,7 @@ static int ath79_spi_probe(struct device_d *dev) master->num_chipselect = 3; if (IS_ENABLED(CONFIG_OFDEVICE)) { - struct device_node *node = dev->device_node; + struct device_node *node = dev->of_node; u32 num_cs; int ret; @@ -279,7 +269,7 @@ static int ath79_spi_probe(struct device_d *dev) return 0; } -static void ath79_spi_remove(struct device_d *dev) +static void ath79_spi_remove(struct device *dev) { struct ath79_spi *sp = dev->priv; @@ -294,8 +284,9 @@ static __maybe_unused struct of_device_id ath79_spi_dt_ids[] = { /* sentinel */ } }; +MODULE_DEVICE_TABLE(of, ath79_spi_dt_ids); -static struct driver_d ath79_spi_driver = { +static struct driver ath79_spi_driver = { .name = "ath79-spi", .probe = ath79_spi_probe, .remove = ath79_spi_remove, |