Re: [PATCH led-next 1/1] leds: mlxreg: Allow multi-instantiation of same name LED for modular systems

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

 



On Thu, 8 Oct 2020 08:47:45 +0000
Vadim Pasternak <vadimp@xxxxxxxxxx> wrote:

> > 
> > But noone is currently using mlxreg123 in their applications, so that part is not
> > going in.  
> 
> Yes, this is true.
> I could modify it as:
> 
> 		if (priv->pdev->id > 0)
> 			sprintf(led_data->led_cdev_name, "%s%d:%s", "card",
> 				priv->pdev->id, data->label);
> 		else
> 			sprintf(led_data->led_cdev_name, "%s:%s", "mlxreg",
> 				data->label);
> 

Vadim, the LED core constructs names in form
  device:color:function-enumerator
so if you must have number there, IMO it should be
  mlxreg:green:status-48
  mlxreg:green:status-56
  ...

Marek



[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