Re: [PATCH 1/4] leds: class: simplify the implementation of devm_of_led_get()

From: Andy Shevchenko
Date: Wed Jun 15 2022 - 11:53:46 EST


On Wed, Jun 15, 2022 at 5:49 PM Jean-Jacques Hiblot
<jjhiblot@xxxxxxxxxxxxxxx> wrote:
>
> Use the devm_add_action_or_reset() helper.

...

> @@ -20,8 +20,10 @@
> #include <linux/timer.h>
> #include <uapi/linux/uleds.h>
> #include <linux/of.h>
> +#include <linux/acpi.h>
> #include "leds.h"
>
> +
> static struct class *leds_class;
>
> static ssize_t brightness_show(struct device *dev,

Stray changes.

...

> + led_put((struct led_classdev *) cdev);

Casting from/to void * is redundant.

--
With Best Regards,
Andy Shevchenko