hc
2023-12-11 6778948f9de86c3cfaf36725a7c87dcff9ba247f
kernel/drivers/mfd/palmas.c
....@@ -1,15 +1,10 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * TI Palmas MFD Driver
34 *
45 * Copyright 2011-2012 Texas Instruments Inc.
56 *
67 * Author: Graeme Gregory <gg@slimlogic.co.uk>
7
- *
8
- * This program is free software; you can redistribute it and/or modify it
9
- * under the terms of the GNU General Public License as published by the
10
- * Free Software Foundation; either version 2 of the License, or (at your
11
- * option) any later version.
12
- *
138 */
149
1510 #include <linux/module.h>
....@@ -554,12 +549,12 @@
554549 palmas->i2c_clients[i] = i2c;
555550 else {
556551 palmas->i2c_clients[i] =
557
- i2c_new_dummy(i2c->adapter,
552
+ i2c_new_dummy_device(i2c->adapter,
558553 i2c->addr + i);
559
- if (!palmas->i2c_clients[i]) {
554
+ if (IS_ERR(palmas->i2c_clients[i])) {
560555 dev_err(palmas->dev,
561556 "can't attach client %d\n", i);
562
- ret = -ENOMEM;
557
+ ret = PTR_ERR(palmas->i2c_clients[i]);
563558 goto err_i2c;
564559 }
565560 palmas->i2c_clients[i]->dev.of_node = of_node_get(node);