.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * intel_mid_sfi.c: Intel MID SFI initialization code |
---|
3 | 4 | * |
---|
4 | 5 | * (C) Copyright 2013 Intel Corporation |
---|
5 | 6 | * Author: Sathyanarayanan Kuppuswamy <sathyanarayanan.kuppuswamy@intel.com> |
---|
6 | | - * |
---|
7 | | - * This program is free software; you can redistribute it and/or |
---|
8 | | - * modify it under the terms of the GNU General Public License |
---|
9 | | - * as published by the Free Software Foundation; version 2 |
---|
10 | | - * of the License. |
---|
11 | 7 | */ |
---|
12 | 8 | |
---|
13 | 9 | #include <linux/init.h> |
---|
.. | .. |
---|
291 | 287 | |
---|
292 | 288 | adapter = i2c_get_adapter(i2c_bus[i]); |
---|
293 | 289 | if (adapter) { |
---|
294 | | - client = i2c_new_device(adapter, i2c_devs[i]); |
---|
295 | | - if (!client) |
---|
| 290 | + client = i2c_new_client_device(adapter, i2c_devs[i]); |
---|
| 291 | + if (IS_ERR(client)) |
---|
296 | 292 | pr_err("can't create i2c device %s\n", |
---|
297 | 293 | i2c_devs[i]->type); |
---|
298 | 294 | } else |
---|