misc.c (0cce284537fb42d9c28b9b31038ffc9b464555f5) misc.c (e13606d7321c0c08d4ac2d74a1102680a40cfdee)
1/*
2 * Copyright (C) 2007 PA Semi, Inc
3 *
4 * Parts based on arch/powerpc/sysdev/fsl_soc.c:
5 *
6 * 2006 (c) MontaVista Software, Inc.
7 *
8 * This program is free software; you can redistribute it and/or modify it

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

64 while ((node = of_get_next_child(adap_node, node))) {
65 struct i2c_board_info info = {};
66 const u32 *addr;
67 int len;
68
69 addr = of_get_property(node, "reg", &len);
70 if (!addr || len < sizeof(int) ||
71 *addr > (1 << 10) - 1) {
1/*
2 * Copyright (C) 2007 PA Semi, Inc
3 *
4 * Parts based on arch/powerpc/sysdev/fsl_soc.c:
5 *
6 * 2006 (c) MontaVista Software, Inc.
7 *
8 * This program is free software; you can redistribute it and/or modify it

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

64 while ((node = of_get_next_child(adap_node, node))) {
65 struct i2c_board_info info = {};
66 const u32 *addr;
67 int len;
68
69 addr = of_get_property(node, "reg", &len);
70 if (!addr || len < sizeof(int) ||
71 *addr > (1 << 10) - 1) {
72 printk(KERN_WARNING
73 "pasemi_register_i2c_devices: "
74 "invalid i2c device entry\n");
72 pr_warn("pasemi_register_i2c_devices: invalid i2c device entry\n");
75 continue;
76 }
77
78 info.irq = irq_of_parse_and_map(node, 0);
79 if (!info.irq)
80 info.irq = -1;
81
82 if (find_i2c_driver(node, &info) < 0)

--- 12 unchanged lines hidden ---
73 continue;
74 }
75
76 info.irq = irq_of_parse_and_map(node, 0);
77 if (!info.irq)
78 info.irq = -1;
79
80 if (find_i2c_driver(node, &info) < 0)

--- 12 unchanged lines hidden ---