.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* |
---|
2 | 3 | * DA9150 Core MFD Driver |
---|
3 | 4 | * |
---|
4 | 5 | * Copyright (c) 2014 Dialog Semiconductor |
---|
5 | 6 | * |
---|
6 | 7 | * Author: Adam Thomson <Adam.Thomson.Opensource@diasemi.com> |
---|
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 | 8 | */ |
---|
13 | 9 | |
---|
14 | 10 | #include <linux/kernel.h> |
---|
.. | .. |
---|
424 | 420 | qif_addr = da9150_reg_read(da9150, DA9150_CORE2WIRE_CTRL_A); |
---|
425 | 421 | qif_addr = (qif_addr & DA9150_CORE_BASE_ADDR_MASK) >> 1; |
---|
426 | 422 | qif_addr |= DA9150_QIF_I2C_ADDR_LSB; |
---|
427 | | - da9150->core_qif = i2c_new_dummy(client->adapter, qif_addr); |
---|
428 | | - if (!da9150->core_qif) { |
---|
| 423 | + da9150->core_qif = i2c_new_dummy_device(client->adapter, qif_addr); |
---|
| 424 | + if (IS_ERR(da9150->core_qif)) { |
---|
429 | 425 | dev_err(da9150->dev, "Failed to attach QIF client\n"); |
---|
430 | | - return -ENODEV; |
---|
| 426 | + return PTR_ERR(da9150->core_qif); |
---|
431 | 427 | } |
---|
432 | 428 | |
---|
433 | 429 | i2c_set_clientdata(da9150->core_qif, da9150); |
---|