diff options
Diffstat (limited to 'drivers/aiodev/core.c')
-rw-r--r-- | drivers/aiodev/core.c | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/drivers/aiodev/core.c b/drivers/aiodev/core.c index 7240de2c40..1fbb7b9188 100644 --- a/drivers/aiodev/core.c +++ b/drivers/aiodev/core.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * core.c - Code implementing core functionality of AIODEV susbsystem * @@ -5,15 +6,6 @@ * * Copyright (c) 2015 Zodiac Inflight Innovation * Author: Andrey Smirnov <andrew.smirnov@gmail.com> - * - * 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. */ #include <common.h> @@ -37,18 +29,18 @@ struct aiochannel *aiochannel_by_name(const char *name) return ERR_PTR(-ENOENT); } -EXPORT_SYMBOL(aiochannel_get_by_name); +EXPORT_SYMBOL(aiochannel_by_name); -struct aiochannel *aiochannel_get(struct device_d *dev, int index) +struct aiochannel *aiochannel_get(struct device *dev, int index) { struct of_phandle_args spec; struct aiodevice *aiodev; int ret, chnum = 0; - if (!dev->device_node) + if (!dev->of_node) return ERR_PTR(-EINVAL); - ret = of_parse_phandle_with_args(dev->device_node, + ret = of_parse_phandle_with_args(dev->of_node, "io-channels", "#io-channel-cells", index, &spec); @@ -56,7 +48,7 @@ struct aiochannel *aiochannel_get(struct device_d *dev, int index) return ERR_PTR(ret); list_for_each_entry(aiodev, &aiodevices, list) { - if (aiodev->hwdev->device_node == spec.np) + if (aiodev->hwdev->of_node == spec.np) goto found; } @@ -99,10 +91,10 @@ int aiodevice_register(struct aiodevice *aiodev) int i, ret; if (!aiodev->name && aiodev->hwdev && - aiodev->hwdev->device_node) { + aiodev->hwdev->of_node) { aiodev->dev.id = DEVICE_ID_SINGLE; - aiodev->name = of_alias_get(aiodev->hwdev->device_node); + aiodev->name = of_alias_get(aiodev->hwdev->of_node); } if (!aiodev->name) { |