History

regulator: provide regulator_bulk_set_supply_names()

There are many regulator consumers who - before using the regulator bulk functions - set the supply names in regulator_bulk_data using a for loop. Let's provide a simple helper in the consumer API that allows users to do the same with a single function call.

Bartosz Golaszewski committed 7 years ago

Commit d0087e71 parent baedad42 files · +33 −0Browse files

Showing the changes to include/linux (1 of 2 files). Show all

Unified · Split

include/linux/regulator/consumer.h+12−0
@@ -281,6 +281,12 @@ void devm_regulator_unregister_notifier(struct regulator *regulator, · 280 unmodified lines
281281 void *regulator_get_drvdata(struct regulator *regulator);
282282 void regulator_set_drvdata(struct regulator *regulator, void *data);
283283
284+/* misc helpers */
285+
286+void regulator_bulk_set_supply_names(struct regulator_bulk_data *consumers,
287+ const char *const *supply_names,
288+ unsigned int num_supplies);
289+
284290 #else
285291
286292 /*
@@ -580,6 +586,12 @@ static inline int regulator_list_voltage(struct regulator *regulator, unsigned s · 293 unmodified lines
580586 return -EINVAL;
581587 }
582588
589+void regulator_bulk_set_supply_names(struct regulator_bulk_data *consumers,
590+ const char *const *supply_names,
591+ unsigned int num_supplies)
592+{
593+}
594+
583595 #endif
584596
585597 static inline int regulator_set_voltage_triplet(struct regulator *regulator,

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t