Re: [PATCH v1] leds: trigger: pattern: notify userpace if pattern finished

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi. Thank you for quick reply.

On 2022-08-24 18:51, Andy Shevchenko wrote:
...
>> +static void pattern_trig_remove_pattern_ended(struct led_classdev *led_cdev)
>> +{
>> +       struct pattern_trig_data *data = led_get_trigger_data(led_cdev);
>> +
>> +       sysfs_put(data->pattern_ended);
>> +       device_remove_file(led_cdev->dev, &dev_attr_pattern_ended);
>> +}
> 
> I'm wondering if you can always have a file and instead provide a
> value there, so user space may use epoll() mechanism on that. It will
> simplify your code here.
> 
Do you mean to add 'dev_attr_pattern_ended' to 'pattern_trig_attrs',
and use 'sysfs_notify' instead of 'sysfs_notify_dirent' call'?

-- 
Best Regards,
Kurbanov Martin





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux