6634906800314902c5013e4cb7b7cb6250d79836
[openwrt/staging/neocturne.git] /
1 From c84c80c7388f887b10dafd70fc55bc6c5fe9fa5a Mon Sep 17 00:00:00 2001
2 From: Christian Marangi <ansuelsmth@gmail.com>
3 Date: Mon, 29 May 2023 18:32:37 +0200
4 Subject: [PATCH 07/13] leds: trigger: netdev: reject interval store for
5 hw_control
6
7 Reject interval store with hw_control enabled. It's are currently not
8 supported and MUST be set to the default value with hw control enabled.
9
10 Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
11 Reviewed-by: Andrew Lunn <andrew@lunn.ch>
12 Signed-off-by: David S. Miller <davem@davemloft.net>
13 ---
14 drivers/leds/trigger/ledtrig-netdev.c | 3 +++
15 1 file changed, 3 insertions(+)
16
17 --- a/drivers/leds/trigger/ledtrig-netdev.c
18 +++ b/drivers/leds/trigger/ledtrig-netdev.c
19 @@ -265,6 +265,9 @@ static ssize_t interval_store(struct dev
20 unsigned long value;
21 int ret;
22
23 + if (trigger_data->hw_control)
24 + return -EINVAL;
25 +
26 ret = kstrtoul(buf, 0, &value);
27 if (ret)
28 return ret;