On Tue, Feb 03, 2015 at 02:04:05PM +0900, Jaewon Kim wrote: > This patch adds new regulator driver to support max77843 > MFD(Multi Function Device) chip`s regulators. > The Max77843 has two voltage regulators for USB safeout. This looks mostly good, a couple of very small things: > +static const struct regulator_desc max77843_supported_regulators[] = { > + [MAX77843_SAFEOUT1] = { > + .name = "SAFEOUT1", > + .id = MAX77843_SAFEOUT1, > + .ops = &max77843_regulator_ops, > + .of_match = of_match_ptr("SAFEOUT1"), > + .regulators_node = of_match_ptr("regulators"), > + .type = REGULATOR_VOLTAGE, > + .owner = THIS_MODULE, > + .n_voltages = MAX77843_SUPPORTED_VOLTAGE_NUM, > + .volt_table = max77843_regulator_table, It's better to make n_voltages be ARRAY_SIZE() for the table, that way there's no need to keep the define and array lined up if someone extends the driver. A name like _safeout_voltage_table might be clearer too.
Attachment:
signature.asc
Description: Digital signature