History

ALSA: Use of_property_read_bool() for boolean properties

It is preferred to use typed property access functions (i.e. of_property_read_<type> functions) rather than low-level of_get_property/of_find_property functions for reading properties. Convert reading boolean properties to to of_property_read_bool().

Rob Herring committed 3 years ago

Commit 0d19bd41 parent d42c5211 file · +1 −1Browse files

Unified · Split

sound/ppc/tumbler.c+1−1
@@ -1361,7 +1361,7 @@ int snd_pmac_tumbler_init(struct snd_pmac *chip) · 1360 unmodified lines
13611361
13621362 for_each_child_of_node(chip->node, np) {
13631363 if (of_node_name_eq(np, "sound")) {
1364− if (of_get_property(np, "has-anded-reset", NULL))
1364+ if (of_property_read_bool(np, "has-anded-reset"))
13651365 mix->anded_reset = 1;
13661366 if (of_property_present(np, "layout-id"))
13671367 mix->reset_on_sleep = 0;

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