summaryrefslogtreecommitdiff
path: root/drivers/leds
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2026-02-21 16:37:42 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2026-02-21 17:09:51 -0800
commitbf4afc53b77aeaa48b5409da5c8da6bb4eff7f43 (patch)
tree01fdd9d27f1b272bef0127966e08eac44d134d0a /drivers/leds
parente19e1b480ac73c3e62ffebbca1174f0f511f43e7 (diff)
Convert 'alloc_obj' family to use the new default GFP_KERNEL argument
This was done entirely with mindless brute force, using git grep -l '\<k[vmz]*alloc_objs*(.*, GFP_KERNEL)' | xargs sed -i 's/\(alloc_objs*(.*\), GFP_KERNEL)/\1)/' to convert the new alloc_obj() users that had a simple GFP_KERNEL argument to just drop that argument. Note that due to the extreme simplicity of the scripting, any slightly more complex cases spread over multiple lines would not be triggered: they definitely exist, but this covers the vast bulk of the cases, and the resulting diff is also then easier to check automatically. For the same reason the 'flex' versions will be done as a separate conversion. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/leds')
-rw-r--r--drivers/leds/led-triggers.c2
-rw-r--r--drivers/leds/rgb/leds-qcom-lpg.c2
-rw-r--r--drivers/leds/trigger/ledtrig-activity.c2
-rw-r--r--drivers/leds/trigger/ledtrig-backlight.c2
-rw-r--r--drivers/leds/trigger/ledtrig-gpio.c2
-rw-r--r--drivers/leds/trigger/ledtrig-heartbeat.c2
-rw-r--r--drivers/leds/trigger/ledtrig-input-events.c2
-rw-r--r--drivers/leds/trigger/ledtrig-netdev.c2
-rw-r--r--drivers/leds/trigger/ledtrig-oneshot.c2
-rw-r--r--drivers/leds/trigger/ledtrig-pattern.c2
-rw-r--r--drivers/leds/trigger/ledtrig-transient.c2
-rw-r--r--drivers/leds/trigger/ledtrig-tty.c2
-rw-r--r--drivers/leds/uleds.c2
13 files changed, 13 insertions, 13 deletions
diff --git a/drivers/leds/led-triggers.c b/drivers/leds/led-triggers.c
index 2fdb713307c3..b1223218bda1 100644
--- a/drivers/leds/led-triggers.c
+++ b/drivers/leds/led-triggers.c
@@ -486,7 +486,7 @@ void led_trigger_register_simple(const char *name, struct led_trigger **tp)
struct led_trigger *trig;
int err;
- trig = kzalloc_obj(struct led_trigger, GFP_KERNEL);
+ trig = kzalloc_obj(struct led_trigger);
if (trig) {
trig->name = name;
diff --git a/drivers/leds/rgb/leds-qcom-lpg.c b/drivers/leds/rgb/leds-qcom-lpg.c
index 138c8fb3514c..016bf468e094 100644
--- a/drivers/leds/rgb/leds-qcom-lpg.c
+++ b/drivers/leds/rgb/leds-qcom-lpg.c
@@ -996,7 +996,7 @@ static int lpg_pattern_set(struct lpg_led *led, struct led_pattern *led_pattern,
if (len % 2)
return -EINVAL;
- pattern = kzalloc_objs(*pattern, len / 2, GFP_KERNEL);
+ pattern = kzalloc_objs(*pattern, len / 2);
if (!pattern)
return -ENOMEM;
diff --git a/drivers/leds/trigger/ledtrig-activity.c b/drivers/leds/trigger/ledtrig-activity.c
index 4f0c16b04876..3674bceda718 100644
--- a/drivers/leds/trigger/ledtrig-activity.c
+++ b/drivers/leds/trigger/ledtrig-activity.c
@@ -188,7 +188,7 @@ static int activity_activate(struct led_classdev *led_cdev)
{
struct activity_data *activity_data;
- activity_data = kzalloc_obj(*activity_data, GFP_KERNEL);
+ activity_data = kzalloc_obj(*activity_data);
if (!activity_data)
return -ENOMEM;
diff --git a/drivers/leds/trigger/ledtrig-backlight.c b/drivers/leds/trigger/ledtrig-backlight.c
index 80b33f13beee..e67bc7c2aecb 100644
--- a/drivers/leds/trigger/ledtrig-backlight.c
+++ b/drivers/leds/trigger/ledtrig-backlight.c
@@ -102,7 +102,7 @@ static int bl_trig_activate(struct led_classdev *led)
{
struct bl_trig_notifier *n;
- n = kzalloc_obj(struct bl_trig_notifier, GFP_KERNEL);
+ n = kzalloc_obj(struct bl_trig_notifier);
if (!n)
return -ENOMEM;
led_set_trigger_data(led, n);
diff --git a/drivers/leds/trigger/ledtrig-gpio.c b/drivers/leds/trigger/ledtrig-gpio.c
index eec6de5ea3bc..fc911dfec0ef 100644
--- a/drivers/leds/trigger/ledtrig-gpio.c
+++ b/drivers/leds/trigger/ledtrig-gpio.c
@@ -78,7 +78,7 @@ static int gpio_trig_activate(struct led_classdev *led)
struct device *dev = led->dev;
int ret;
- gpio_data = kzalloc_obj(*gpio_data, GFP_KERNEL);
+ gpio_data = kzalloc_obj(*gpio_data);
if (!gpio_data)
return -ENOMEM;
diff --git a/drivers/leds/trigger/ledtrig-heartbeat.c b/drivers/leds/trigger/ledtrig-heartbeat.c
index 6ad8b486b058..efe0042b3157 100644
--- a/drivers/leds/trigger/ledtrig-heartbeat.c
+++ b/drivers/leds/trigger/ledtrig-heartbeat.c
@@ -129,7 +129,7 @@ static int heartbeat_trig_activate(struct led_classdev *led_cdev)
{
struct heartbeat_trig_data *heartbeat_data;
- heartbeat_data = kzalloc_obj(*heartbeat_data, GFP_KERNEL);
+ heartbeat_data = kzalloc_obj(*heartbeat_data);
if (!heartbeat_data)
return -ENOMEM;
diff --git a/drivers/leds/trigger/ledtrig-input-events.c b/drivers/leds/trigger/ledtrig-input-events.c
index dcdea964311d..d057b2a23967 100644
--- a/drivers/leds/trigger/ledtrig-input-events.c
+++ b/drivers/leds/trigger/ledtrig-input-events.c
@@ -75,7 +75,7 @@ static int input_events_connect(struct input_handler *handler, struct input_dev
struct input_handle *handle;
int ret;
- handle = kzalloc_obj(*handle, GFP_KERNEL);
+ handle = kzalloc_obj(*handle);
if (!handle)
return -ENOMEM;
diff --git a/drivers/leds/trigger/ledtrig-netdev.c b/drivers/leds/trigger/ledtrig-netdev.c
index e15e7dcdbcd9..12cb3311ea22 100644
--- a/drivers/leds/trigger/ledtrig-netdev.c
+++ b/drivers/leds/trigger/ledtrig-netdev.c
@@ -691,7 +691,7 @@ static int netdev_trig_activate(struct led_classdev *led_cdev)
struct device *dev;
int rc;
- trigger_data = kzalloc_obj(struct led_netdev_data, GFP_KERNEL);
+ trigger_data = kzalloc_obj(struct led_netdev_data);
if (!trigger_data)
return -ENOMEM;
diff --git a/drivers/leds/trigger/ledtrig-oneshot.c b/drivers/leds/trigger/ledtrig-oneshot.c
index b825e607bb9f..9068e3bb0bdb 100644
--- a/drivers/leds/trigger/ledtrig-oneshot.c
+++ b/drivers/leds/trigger/ledtrig-oneshot.c
@@ -159,7 +159,7 @@ static int oneshot_trig_activate(struct led_classdev *led_cdev)
{
struct oneshot_trig_data *oneshot_data;
- oneshot_data = kzalloc_obj(*oneshot_data, GFP_KERNEL);
+ oneshot_data = kzalloc_obj(*oneshot_data);
if (!oneshot_data)
return -ENOMEM;
diff --git a/drivers/leds/trigger/ledtrig-pattern.c b/drivers/leds/trigger/ledtrig-pattern.c
index 9eaae7757c8e..8f9cbe54e231 100644
--- a/drivers/leds/trigger/ledtrig-pattern.c
+++ b/drivers/leds/trigger/ledtrig-pattern.c
@@ -465,7 +465,7 @@ static int pattern_trig_activate(struct led_classdev *led_cdev)
{
struct pattern_trig_data *data;
- data = kzalloc_obj(*data, GFP_KERNEL);
+ data = kzalloc_obj(*data);
if (!data)
return -ENOMEM;
diff --git a/drivers/leds/trigger/ledtrig-transient.c b/drivers/leds/trigger/ledtrig-transient.c
index 258e5d8db5b2..8d928bb2a0c5 100644
--- a/drivers/leds/trigger/ledtrig-transient.c
+++ b/drivers/leds/trigger/ledtrig-transient.c
@@ -164,7 +164,7 @@ static int transient_trig_activate(struct led_classdev *led_cdev)
{
struct transient_trig_data *tdata;
- tdata = kzalloc_obj(struct transient_trig_data, GFP_KERNEL);
+ tdata = kzalloc_obj(struct transient_trig_data);
if (!tdata)
return -ENOMEM;
diff --git a/drivers/leds/trigger/ledtrig-tty.c b/drivers/leds/trigger/ledtrig-tty.c
index 4ce915e417f8..8eb6286b33ac 100644
--- a/drivers/leds/trigger/ledtrig-tty.c
+++ b/drivers/leds/trigger/ledtrig-tty.c
@@ -312,7 +312,7 @@ static int ledtrig_tty_activate(struct led_classdev *led_cdev)
{
struct ledtrig_tty_data *trigger_data;
- trigger_data = kzalloc_obj(*trigger_data, GFP_KERNEL);
+ trigger_data = kzalloc_obj(*trigger_data);
if (!trigger_data)
return -ENOMEM;
diff --git a/drivers/leds/uleds.c b/drivers/leds/uleds.c
index b70d203d0b16..ace71ffc0591 100644
--- a/drivers/leds/uleds.c
+++ b/drivers/leds/uleds.c
@@ -53,7 +53,7 @@ static int uleds_open(struct inode *inode, struct file *file)
{
struct uleds_device *udev;
- udev = kzalloc_obj(*udev, GFP_KERNEL);
+ udev = kzalloc_obj(*udev);
if (!udev)
return -ENOMEM;