Re: [PATCH RFC 2/2] leds: trigger: add a trigger for UARTs

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

 



On Sun, Nov 11, 2018 at 12:30:39PM +0100, Pavel Machek wrote:
> Hi!
> 
> > This is only a proof of concept driver that makes an LED blink on UART
> > activity. Feedback about the concept is very welcome.
> 
> > +static void ledtrig_uart_halt(struct ledtrig_uart_data *trigger_data)
> > +{
> > +	cancel_delayed_work_sync(&trigger_data->dwork);
> > +}
> > +
> > +static void ledtrig_uart_restart(struct ledtrig_uart_data *trigger_data)
> > +{
> > +	pr_info("%s:%d: devname = %s\n", __func__, __LINE__, trigger_data->devname);
> > +	if (!trigger_data->devname)
> > +		return;
> > +
> > +	schedule_delayed_work(&trigger_data->dwork, 0);
> > +}
> 
> You should not need to do delayed work by hand.

What is the obvious alternative I missed then? This is taken from the
network trigger which then might benefit from your suggestion, too.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux