88pm8607.c (aa7eb8e78d8ecd6cd0475d86ea8385ff9cb47ece) | 88pm8607.c (99cd25ce10249c7f9d7172fe2ed266b023cd3323) |
---|---|
1/* 2 * Regulators driver for Marvell 88PM8607 3 * 4 * Copyright (C) 2009 Marvell International Ltd. 5 * Haojian Zhuang <haojian.zhuang@marvell.com> 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License version 2 as --- 398 unchanged lines hidden (view full) --- 407 dev_err(&pdev->dev, "No I/O resource!\n"); 408 return -EINVAL; 409 } 410 for (i = 0; i < ARRAY_SIZE(pm8607_regulator_info); i++) { 411 info = &pm8607_regulator_info[i]; 412 if (info->desc.id == res->start) 413 break; 414 } | 1/* 2 * Regulators driver for Marvell 88PM8607 3 * 4 * Copyright (C) 2009 Marvell International Ltd. 5 * Haojian Zhuang <haojian.zhuang@marvell.com> 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License version 2 as --- 398 unchanged lines hidden (view full) --- 407 dev_err(&pdev->dev, "No I/O resource!\n"); 408 return -EINVAL; 409 } 410 for (i = 0; i < ARRAY_SIZE(pm8607_regulator_info); i++) { 411 info = &pm8607_regulator_info[i]; 412 if (info->desc.id == res->start) 413 break; 414 } |
415 if ((i < 0) || (i > PM8607_ID_RG_MAX)) { | 415 if (i == ARRAY_SIZE(pm8607_regulator_info)) { |
416 dev_err(&pdev->dev, "Failed to find regulator %llu\n", 417 (unsigned long long)res->start); 418 return -EINVAL; 419 } 420 info->i2c = (chip->id == CHIP_PM8607) ? chip->client : chip->companion; 421 info->chip = chip; 422 423 /* check DVC ramp slope double */ --- 50 unchanged lines hidden --- | 416 dev_err(&pdev->dev, "Failed to find regulator %llu\n", 417 (unsigned long long)res->start); 418 return -EINVAL; 419 } 420 info->i2c = (chip->id == CHIP_PM8607) ? chip->client : chip->companion; 421 info->chip = chip; 422 423 /* check DVC ramp slope double */ --- 50 unchanged lines hidden --- |