Hi Dennis,
thanks a lot for the patch.
On Fri, 9 Dec 2016, Dennis Wassenberg wrote:
> +int hid_lenovo_led_set(enum hid_lenovo_led_type led, bool on)
> +{
> + struct led_classdev *dev = NULL;
> + struct lenovo_led_list_entry *entry;
> +
> + if (led >= HID_LENOVO_LED_MAX)
> + return -EINVAL;
> +
> + hid_lenovo_initial_leds[led] = on ? LED_FULL : LED_OFF;
> +
> + list_for_each_entry(entry, &hid_lenovo_leds, list) {
> + if (entry->type == led) {
> + dev = entry->dev;
> + break;
> + }
> + }
How exactly is this synchronized against lenovo_remove_tpx1cover()?
> +
> + if (!dev)
> + return -ENODEV;
> +
> + if (!dev->brightness_set)
> + return -ENODEV;
> +
> + dev->brightness_set(dev, on ? LED_FULL : LED_OFF);
> +
> + return 0;
> +}
> +EXPORT_SYMBOL_GPL(hid_lenovo_led_set);
Does this really need to be exported to the whole universe? (I guess this
will be further discussed in 4/4).
--
Jiri Kosina
SUSE Labs
--
To unsubscribe from this list: send the line "unsubscribe linux-sound" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html