.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* |
---|
2 | 3 | * Broadcom BCM590xx PMU |
---|
3 | 4 | * |
---|
4 | 5 | * Copyright 2014 Linaro Limited |
---|
5 | 6 | * Author: Matt Porter <mporter@linaro.org> |
---|
6 | | - * |
---|
7 | | - * This program is free software; you can redistribute it and/or modify it |
---|
8 | | - * under the terms of the GNU General Public License as published by the |
---|
9 | | - * Free Software Foundation; either version 2 of the License, or (at your |
---|
10 | | - * option) any later version. |
---|
11 | 7 | */ |
---|
12 | 8 | |
---|
13 | 9 | #include <linux/err.h> |
---|
.. | .. |
---|
65 | 61 | } |
---|
66 | 62 | |
---|
67 | 63 | /* Secondary I2C slave address is the base address with A(2) asserted */ |
---|
68 | | - bcm590xx->i2c_sec = i2c_new_dummy(i2c_pri->adapter, |
---|
| 64 | + bcm590xx->i2c_sec = i2c_new_dummy_device(i2c_pri->adapter, |
---|
69 | 65 | i2c_pri->addr | BIT(2)); |
---|
70 | | - if (!bcm590xx->i2c_sec) { |
---|
| 66 | + if (IS_ERR(bcm590xx->i2c_sec)) { |
---|
71 | 67 | dev_err(&i2c_pri->dev, "failed to add secondary I2C device\n"); |
---|
72 | | - return -ENODEV; |
---|
| 68 | + return PTR_ERR(bcm590xx->i2c_sec); |
---|
73 | 69 | } |
---|
74 | 70 | i2c_set_clientdata(bcm590xx->i2c_sec, bcm590xx); |
---|
75 | 71 | |
---|