Staging: nvec: Remove macro definition to_nvec_led

Remove definition 'to_nvec_led' because it is only used once.
Rewrite the code directly in the calling function
'nvec_led_brightness_set'.

Signed-off-by: Sumitra Sharma <sumitraartsy@gmail.com>
Link: https://lore.kernel.org/r/20230322054051.GA150453@sumitra.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Sumitra Sharma 2023-03-21 22:40:51 -07:00 committed by Greg Kroah-Hartman
parent 7045b31e1b
commit 1bd51241bd

View File

@ -14,9 +14,6 @@
#include <linux/platform_device.h>
#include "nvec.h"
#define to_nvec_led(led_cdev) \
container_of(led_cdev, struct nvec_led, cdev)
#define NVEC_LED_REQ {'\x0d', '\x10', '\x45', '\x10', '\x00'}
#define NVEC_LED_MAX 8
@ -29,7 +26,7 @@ struct nvec_led {
static void nvec_led_brightness_set(struct led_classdev *led_cdev,
enum led_brightness value)
{
struct nvec_led *led = to_nvec_led(led_cdev);
struct nvec_led *led = container_of(led_cdev, struct nvec_led, cdev);
unsigned char buf[] = NVEC_LED_REQ;
buf[4] = value;