hc
2024-01-05 071106ecf68c401173c58808b1cf5f68cc50d390
kernel/drivers/iio/multiplexer/iio-mux.c
....@@ -1,13 +1,10 @@
1
+// SPDX-License-Identifier: GPL-2.0
12 /*
23 * IIO multiplexer driver
34 *
45 * Copyright (C) 2017 Axentia Technologies AB
56 *
67 * Author: Peter Rosin <peda@axentia.se>
7
- *
8
- * This program is free software; you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License version 2 as
10
- * published by the Free Software Foundation.
118 */
129
1310 #include <linux/err.h>
....@@ -357,11 +354,9 @@
357354 return -ENODEV;
358355
359356 parent = devm_iio_channel_get(dev, "parent");
360
- if (IS_ERR(parent)) {
361
- if (PTR_ERR(parent) != -EPROBE_DEFER)
362
- dev_err(dev, "failed to get parent channel\n");
363
- return PTR_ERR(parent);
364
- }
357
+ if (IS_ERR(parent))
358
+ return dev_err_probe(dev, PTR_ERR(parent),
359
+ "failed to get parent channel\n");
365360
366361 sizeof_ext_info = iio_get_channel_ext_info_count(parent);
367362 if (sizeof_ext_info) {
....@@ -398,7 +393,6 @@
398393 mux->cached_state = -1;
399394
400395 indio_dev->name = dev_name(dev);
401
- indio_dev->dev.parent = dev;
402396 indio_dev->info = &mux_info;
403397 indio_dev->modes = INDIO_DIRECT_MODE;
404398 indio_dev->channels = mux->chan;