Re: [PATCH can-next] can: can-dev: remove obsolete CAN LED support

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

 



On Tue. 19 May 2022 at 00:52, Oliver Hartkopp <socketcan@xxxxxxxxxxxx> wrote:
> Since commit 30f3b42147ba6f ("can: mark led trigger as broken") the
> CAN specific LED support was disabled and marked as BROKEN. As the common
> LED support with CONFIG_LEDS_TRIGGER_NETDEV should to this work now the
> code can be removed as preparation for a CAN netdevice Kconfig rework.
>
> Suggested-by: Vincent Mailhol <mailhol.vincent@xxxxxxxxxx>
> Signed-off-by: Oliver Hartkopp <socketcan@xxxxxxxxxxxx>
[...]
>  struct net_device *alloc_c_can_dev(int msg_obj_num)
>  {
> @@ -1376,12 +1367,11 @@ int register_c_can_dev(struct net_device *dev)
>         dev->flags |= IFF_ECHO; /* we support local echo */
>         dev->netdev_ops = &c_can_netdev_ops;
>         c_can_set_ethtool_ops(dev);
>
>         err = register_candev(dev);
> -       if (!err)
> -               devm_can_led_init(dev);
> +
>         return err;

I think we can remove the variable err and simply do:

return register_candev(dev);

>  }
>  EXPORT_SYMBOL_GPL(register_c_can_dev);
[...]

Yours sincerely,
Vincent Mailhol



[Index of Archives]     [Automotive Discussions]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [CAN Bus]

  Powered by Linux