.. | .. |
---|
732 | 732 | return max8997_update_reg(i2c, reg, ~pattern, mask); |
---|
733 | 733 | } |
---|
734 | 734 | |
---|
735 | | -static struct regulator_ops max8997_ldo_ops = { |
---|
| 735 | +static const struct regulator_ops max8997_ldo_ops = { |
---|
736 | 736 | .list_voltage = max8997_list_voltage, |
---|
737 | 737 | .is_enabled = max8997_reg_is_enabled, |
---|
738 | 738 | .enable = max8997_reg_enable, |
---|
.. | .. |
---|
742 | 742 | .set_suspend_disable = max8997_reg_disable_suspend, |
---|
743 | 743 | }; |
---|
744 | 744 | |
---|
745 | | -static struct regulator_ops max8997_buck_ops = { |
---|
| 745 | +static const struct regulator_ops max8997_buck_ops = { |
---|
746 | 746 | .list_voltage = max8997_list_voltage, |
---|
747 | 747 | .is_enabled = max8997_reg_is_enabled, |
---|
748 | 748 | .enable = max8997_reg_enable, |
---|
.. | .. |
---|
753 | 753 | .set_suspend_disable = max8997_reg_disable_suspend, |
---|
754 | 754 | }; |
---|
755 | 755 | |
---|
756 | | -static struct regulator_ops max8997_fixedvolt_ops = { |
---|
| 756 | +static const struct regulator_ops max8997_fixedvolt_ops = { |
---|
757 | 757 | .list_voltage = max8997_list_voltage, |
---|
758 | 758 | .is_enabled = max8997_reg_is_enabled, |
---|
759 | 759 | .enable = max8997_reg_enable, |
---|
.. | .. |
---|
761 | 761 | .set_suspend_disable = max8997_reg_disable_suspend, |
---|
762 | 762 | }; |
---|
763 | 763 | |
---|
764 | | -static struct regulator_ops max8997_safeout_ops = { |
---|
| 764 | +static const struct regulator_ops max8997_safeout_ops = { |
---|
765 | 765 | .list_voltage = regulator_list_voltage_table, |
---|
766 | 766 | .is_enabled = max8997_reg_is_enabled, |
---|
767 | 767 | .enable = max8997_reg_enable, |
---|
.. | .. |
---|
771 | 771 | .set_suspend_disable = max8997_reg_disable_suspend, |
---|
772 | 772 | }; |
---|
773 | 773 | |
---|
774 | | -static struct regulator_ops max8997_fixedstate_ops = { |
---|
| 774 | +static const struct regulator_ops max8997_fixedstate_ops = { |
---|
775 | 775 | .list_voltage = max8997_list_voltage_charger_cv, |
---|
776 | 776 | .get_voltage_sel = max8997_get_voltage_sel, |
---|
777 | 777 | .set_voltage = max8997_set_voltage_charger_cv, |
---|
.. | .. |
---|
805 | 805 | return max8997_list_voltage(rdev, sel); |
---|
806 | 806 | } |
---|
807 | 807 | |
---|
808 | | -static struct regulator_ops max8997_charger_ops = { |
---|
| 808 | +static const struct regulator_ops max8997_charger_ops = { |
---|
809 | 809 | .is_enabled = max8997_reg_is_enabled, |
---|
810 | 810 | .enable = max8997_reg_enable, |
---|
811 | 811 | .disable = max8997_reg_disable, |
---|
.. | .. |
---|
813 | 813 | .set_current_limit = max8997_set_current_limit, |
---|
814 | 814 | }; |
---|
815 | 815 | |
---|
816 | | -static struct regulator_ops max8997_charger_fixedstate_ops = { |
---|
| 816 | +static const struct regulator_ops max8997_charger_fixedstate_ops = { |
---|
817 | 817 | .get_current_limit = max8997_get_current_limit, |
---|
818 | 818 | .set_current_limit = max8997_set_current_limit, |
---|
819 | 819 | }; |
---|
.. | .. |
---|
925 | 925 | pdata->regulators = rdata; |
---|
926 | 926 | for_each_child_of_node(regulators_np, reg_np) { |
---|
927 | 927 | for (i = 0; i < ARRAY_SIZE(regulators); i++) |
---|
928 | | - if (!of_node_cmp(reg_np->name, regulators[i].name)) |
---|
| 928 | + if (of_node_name_eq(reg_np, regulators[i].name)) |
---|
929 | 929 | break; |
---|
930 | 930 | |
---|
931 | 931 | if (i == ARRAY_SIZE(regulators)) { |
---|
932 | | - dev_warn(&pdev->dev, "don't know how to configure regulator %s\n", |
---|
933 | | - reg_np->name); |
---|
| 932 | + dev_warn(&pdev->dev, "don't know how to configure regulator %pOFn\n", |
---|
| 933 | + reg_np); |
---|
934 | 934 | continue; |
---|
935 | 935 | } |
---|
936 | 936 | |
---|