forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-11 297b60346df8beafee954a0fd7c2d64f33f3b9bc
kernel/arch/x86/platform/intel-mid/sfi.c
....@@ -1,13 +1,9 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * intel_mid_sfi.c: Intel MID SFI initialization code
34 *
45 * (C) Copyright 2013 Intel Corporation
56 * 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.
117 */
128
139 #include <linux/init.h>
....@@ -291,8 +287,8 @@
291287
292288 adapter = i2c_get_adapter(i2c_bus[i]);
293289 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))
296292 pr_err("can't create i2c device %s\n",
297293 i2c_devs[i]->type);
298294 } else