diff options
Diffstat (limited to 'drivers/eeprom/at25.c')
-rw-r--r-- | drivers/eeprom/at25.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/drivers/eeprom/at25.c b/drivers/eeprom/at25.c index 56168c216d..ca1df82122 100644 --- a/drivers/eeprom/at25.c +++ b/drivers/eeprom/at25.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0-or-later /* * at25.c -- support most SPI EEPROMs, such as Atmel AT25 models * @@ -5,11 +6,6 @@ * * based on linux driver by: * Copyright (C) 2006 David Brownell - * - * 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. */ #include <common.h> @@ -237,7 +233,7 @@ static struct cdev_operations at25_fops = { .write = at25_ee_write, }; -static int at25_np_to_chip(struct device_d *dev, +static int at25_np_to_chip(struct device *dev, struct device_node *np, struct spi_eeprom *chip) { @@ -295,7 +291,7 @@ static int at25_np_to_chip(struct device_d *dev, return 0; } -static int at25_probe(struct device_d *dev) +static int at25_probe(struct device *dev) { int err, sr; int addrlen; @@ -305,8 +301,8 @@ static int at25_probe(struct device_d *dev) at25 = xzalloc(sizeof(*at25)); /* Chip description */ - if (dev->device_node) { - err = at25_np_to_chip(dev, dev->device_node, &at25->chip); + if (dev->of_node) { + err = at25_np_to_chip(dev, dev->of_node, &at25->chip); if (err) goto fail; } else { @@ -358,7 +354,7 @@ static int at25_probe(struct device_d *dev) goto fail; dev_dbg(dev, "%s probed\n", at25->cdev.name); - of_parse_partitions(&at25->cdev, dev->device_node); + of_parse_partitions(&at25->cdev, dev->of_node); of_partitions_register_fixup(&at25->cdev); return 0; @@ -376,8 +372,9 @@ static __maybe_unused struct of_device_id at25_dt_ids[] = { /* sentinel */ } }; +MODULE_DEVICE_TABLE(of, at25_dt_ids); -static struct driver_d at25_driver = { +static struct driver at25_driver = { .name = DRIVERNAME, .of_compatible = DRV_OF_COMPAT(at25_dt_ids), .probe = at25_probe, |