Re: [PATCH can-next v3 1/2] can: add tx/rx LED trigger support

2012-07-31 Thread Fabio Baltieri
On Tue, Jul 31, 2012 at 10:46:57AM +0200, Wolfgang Grandegger wrote: > Hi Fabio, > > On 07/30/2012 09:20 PM, Fabio Baltieri wrote: > > This patch implements the functions to add two LED triggers, named > > -tx and -rx, to a canbus device driver. > > > > Triggers are called from specific handlers

Re: [PATCH can-next v3 1/2] can: add tx/rx LED trigger support

2012-07-31 Thread Marc Kleine-Budde
On 07/31/2012 01:57 PM, Fabio Baltieri wrote: [...] Can you provide a devm implementation for can_led? >>> >>> Sounds reasonable, you mean like a devm_kasprintf implementation to >>> remove kfree and unwinding code? >> >> IMHO it would be sufficient if you implement the devm cleanup

Re: [PATCH can-next v3 1/2] can: add tx/rx LED trigger support

2012-07-31 Thread Fabio Baltieri
On Tue, Jul 31, 2012 at 09:10:00AM +0200, Marc Kleine-Budde wrote: > >>> +/* > >>> + * Register CAN LED triggers for a CAN device > >>> + * > >>> + * This is normally called from a driver's probe function > >>> + */ > >>> +void can_led_init(struct net_device *netdev) > >>> +{ > >>> + struct

Re: [PATCH can-next v3 1/2] can: add tx/rx LED trigger support

2012-07-31 Thread Fabio Baltieri
On Tue, Jul 31, 2012 at 12:12:59PM +0200, Marc Kleine-Budde wrote: > >> +/* > >> + * Register CAN LED triggers for a CAN device > >> + * > >> + * This is normally called from a driver's probe function > >> + */ > >> +void can_led_init(struct net_device *netdev) > >> +{ > >> + struct can_priv

Re: [PATCH can-next v3 1/2] can: add tx/rx LED trigger support

2012-07-31 Thread Marc Kleine-Budde
On 07/31/2012 10:46 AM, Wolfgang Grandegger wrote: > Hi Fabio, > > On 07/30/2012 09:20 PM, Fabio Baltieri wrote: >> This patch implements the functions to add two LED triggers, named >> -tx and -rx, to a canbus device driver. >> >> Triggers are called from specific handlers by each CAN device

Re: [PATCH can-next v3 1/2] can: add tx/rx LED trigger support

2012-07-31 Thread Wolfgang Grandegger
Hi Fabio, On 07/30/2012 09:20 PM, Fabio Baltieri wrote: > This patch implements the functions to add two LED triggers, named > -tx and -rx, to a canbus device driver. > > Triggers are called from specific handlers by each CAN device driver and > can be disabled altogether with a Kconfig option.

Re: [PATCH can-next v3 1/2] can: add tx/rx LED trigger support

2012-07-31 Thread Marc Kleine-Budde
On 07/31/2012 08:57 AM, Fabio Baltieri wrote: > Hi Marc, > > On Mon, Jul 30, 2012 at 11:17:53PM +0200, Marc Kleine-Budde wrote: >> On 07/30/2012 09:20 PM, Fabio Baltieri wrote: >>> This patch implements the functions to add two LED triggers, named >>> -tx and -rx, to a canbus device driver. >>>

Re: [PATCH can-next v3 1/2] can: add tx/rx LED trigger support

2012-07-31 Thread Fabio Baltieri
Hi Marc, On Mon, Jul 30, 2012 at 11:17:53PM +0200, Marc Kleine-Budde wrote: > On 07/30/2012 09:20 PM, Fabio Baltieri wrote: > > This patch implements the functions to add two LED triggers, named > > -tx and -rx, to a canbus device driver. > > > > Triggers are called from specific handlers by

Re: [PATCH can-next v3 1/2] can: add tx/rx LED trigger support

2012-07-31 Thread Fabio Baltieri
Hi Marc, On Mon, Jul 30, 2012 at 11:17:53PM +0200, Marc Kleine-Budde wrote: On 07/30/2012 09:20 PM, Fabio Baltieri wrote: This patch implements the functions to add two LED triggers, named ifname-tx and ifname-rx, to a canbus device driver. Triggers are called from specific handlers by

Re: [PATCH can-next v3 1/2] can: add tx/rx LED trigger support

2012-07-31 Thread Marc Kleine-Budde
On 07/31/2012 08:57 AM, Fabio Baltieri wrote: Hi Marc, On Mon, Jul 30, 2012 at 11:17:53PM +0200, Marc Kleine-Budde wrote: On 07/30/2012 09:20 PM, Fabio Baltieri wrote: This patch implements the functions to add two LED triggers, named ifname-tx and ifname-rx, to a canbus device driver.

Re: [PATCH can-next v3 1/2] can: add tx/rx LED trigger support

2012-07-31 Thread Wolfgang Grandegger
Hi Fabio, On 07/30/2012 09:20 PM, Fabio Baltieri wrote: This patch implements the functions to add two LED triggers, named ifname-tx and ifname-rx, to a canbus device driver. Triggers are called from specific handlers by each CAN device driver and can be disabled altogether with a Kconfig

Re: [PATCH can-next v3 1/2] can: add tx/rx LED trigger support

2012-07-31 Thread Marc Kleine-Budde
On 07/31/2012 10:46 AM, Wolfgang Grandegger wrote: Hi Fabio, On 07/30/2012 09:20 PM, Fabio Baltieri wrote: This patch implements the functions to add two LED triggers, named ifname-tx and ifname-rx, to a canbus device driver. Triggers are called from specific handlers by each CAN device

Re: [PATCH can-next v3 1/2] can: add tx/rx LED trigger support

2012-07-31 Thread Fabio Baltieri
On Tue, Jul 31, 2012 at 12:12:59PM +0200, Marc Kleine-Budde wrote: +/* + * Register CAN LED triggers for a CAN device + * + * This is normally called from a driver's probe function + */ +void can_led_init(struct net_device *netdev) +{ + struct can_priv *priv = netdev_priv(netdev);

Re: [PATCH can-next v3 1/2] can: add tx/rx LED trigger support

2012-07-31 Thread Fabio Baltieri
On Tue, Jul 31, 2012 at 09:10:00AM +0200, Marc Kleine-Budde wrote: +/* + * Register CAN LED triggers for a CAN device + * + * This is normally called from a driver's probe function + */ +void can_led_init(struct net_device *netdev) +{ + struct can_priv *priv = netdev_priv(netdev);

Re: [PATCH can-next v3 1/2] can: add tx/rx LED trigger support

2012-07-31 Thread Marc Kleine-Budde
On 07/31/2012 01:57 PM, Fabio Baltieri wrote: [...] Can you provide a devm implementation for can_led? Sounds reasonable, you mean like a devm_kasprintf implementation to remove kfree and unwinding code? IMHO it would be sufficient if you implement the devm cleanup functions here. Uh -

Re: [PATCH can-next v3 1/2] can: add tx/rx LED trigger support

2012-07-31 Thread Fabio Baltieri
On Tue, Jul 31, 2012 at 10:46:57AM +0200, Wolfgang Grandegger wrote: Hi Fabio, On 07/30/2012 09:20 PM, Fabio Baltieri wrote: This patch implements the functions to add two LED triggers, named ifname-tx and ifname-rx, to a canbus device driver. Triggers are called from specific

Re: [PATCH can-next v3 1/2] can: add tx/rx LED trigger support

2012-07-30 Thread Marc Kleine-Budde
On 07/30/2012 09:20 PM, Fabio Baltieri wrote: > This patch implements the functions to add two LED triggers, named > -tx and -rx, to a canbus device driver. > > Triggers are called from specific handlers by each CAN device driver and > can be disabled altogether with a Kconfig option. > > The

Re: [PATCH can-next v3 1/2] can: add tx/rx LED trigger support

2012-07-30 Thread Marc Kleine-Budde
On 07/30/2012 09:20 PM, Fabio Baltieri wrote: This patch implements the functions to add two LED triggers, named ifname-tx and ifname-rx, to a canbus device driver. Triggers are called from specific handlers by each CAN device driver and can be disabled altogether with a Kconfig option.