misc.c (446279168e030fd0ed68e2bba336bef8bb3da352) misc.c (245685495bff35062a394f5cdbd32b237dc596a5)
1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * Copyright (C) 2007 PA Semi, Inc
4 *
5 * Parts based on arch/powerpc/sysdev/fsl_soc.c:
6 *
7 * 2006 (c) MontaVista Software, Inc.
8 */

--- 22 unchanged lines hidden (view full) ---

31static int __init find_i2c_driver(struct device_node *node,
32 struct i2c_board_info *info)
33{
34 int i;
35
36 for (i = 0; i < ARRAY_SIZE(i2c_devices); i++) {
37 if (!of_device_is_compatible(node, i2c_devices[i].of_device))
38 continue;
1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * Copyright (C) 2007 PA Semi, Inc
4 *
5 * Parts based on arch/powerpc/sysdev/fsl_soc.c:
6 *
7 * 2006 (c) MontaVista Software, Inc.
8 */

--- 22 unchanged lines hidden (view full) ---

31static int __init find_i2c_driver(struct device_node *node,
32 struct i2c_board_info *info)
33{
34 int i;
35
36 for (i = 0; i < ARRAY_SIZE(i2c_devices); i++) {
37 if (!of_device_is_compatible(node, i2c_devices[i].of_device))
38 continue;
39 if (strlcpy(info->type, i2c_devices[i].i2c_type,
40 I2C_NAME_SIZE) >= I2C_NAME_SIZE)
39 if (strscpy(info->type, i2c_devices[i].i2c_type, I2C_NAME_SIZE) < 0)
41 return -ENOMEM;
42 return 0;
43 }
44 return -ENODEV;
45}
46
47static int __init pasemi_register_i2c_devices(void)
48{

--- 40 unchanged lines hidden ---
40 return -ENOMEM;
41 return 0;
42 }
43 return -ENODEV;
44}
45
46static int __init pasemi_register_i2c_devices(void)
47{

--- 40 unchanged lines hidden ---