Hi! > - err = devm_led_classdev_register(&client->dev, led); > + init_data.fwnode = pdata->leds[i].fwnode; > + > + if (is_of_node(init_data.fwnode)) { > + if (to_of_node(init_data.fwnode)->name[0] == > + '\0') > + set_default_label = true; > + else > + set_default_label = false; > + } else { > + set_default_label = true; > + } I'd write it as set_default_label = true; if (... && ...) set_default_label = false; > + if (set_default_label) { > + snprintf(default_label, sizeof(default_label), > + "%d", i); > + init_data.default_label = default_label; > + } else { > + init_data.default_label = NULL; > + } init_data.default_label = NULL; if (...) { set_default_label) { > + snprintf(default_label, sizeof(default_label), > + "%d", i); > + init_data.default_label = default_label; } Thank you, Pavel -- http://www.livejournal.com/~pavelmachek
Attachment:
signature.asc
Description: Digital signature