Skip to content

Commit 39237e3

Browse files
mnenciaij-intel
authored andcommitted
platform/x86: int3472: Rename pled to led in LED registration code
Rename the privacy LED type, struct member, and functions from "pled" to "led" in preparation for supporting additional LED types beyond just the privacy LED. No functional change. Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Hans de Goede <johannes.goede@oss.qualcomm.com> Signed-off-by: Marco Nenciarini <mnencia@kcore.it> Link: https://patch.msgid.link/20260401203638.1601661-3-mnencia@kcore.it Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
1 parent d6116d8 commit 39237e3

3 files changed

Lines changed: 13 additions & 13 deletions

File tree

drivers/platform/x86/intel/int3472/discrete.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ static int skl_int3472_handle_gpio_resources(struct acpi_resource *ares,
354354

355355
break;
356356
case INT3472_GPIO_TYPE_PRIVACY_LED:
357-
ret = skl_int3472_register_pled(int3472, gpio);
357+
ret = skl_int3472_register_led(int3472, gpio);
358358
if (ret)
359359
err_msg = "Failed to register LED\n";
360360

@@ -429,7 +429,7 @@ void int3472_discrete_cleanup(struct int3472_discrete_device *int3472)
429429
gpiod_remove_lookup_table(&int3472->gpios);
430430

431431
skl_int3472_unregister_clock(int3472);
432-
skl_int3472_unregister_pled(int3472);
432+
skl_int3472_unregister_led(int3472);
433433
skl_int3472_unregister_regulator(int3472);
434434
}
435435
EXPORT_SYMBOL_NS_GPL(int3472_discrete_cleanup, "INTEL_INT3472_DISCRETE");

drivers/platform/x86/intel/int3472/led.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@
66
#include <linux/leds.h>
77
#include <linux/platform_data/x86/int3472.h>
88

9-
static int int3472_pled_set(struct led_classdev *led_cdev, enum led_brightness brightness)
9+
static int int3472_led_set(struct led_classdev *led_cdev, enum led_brightness brightness)
1010
{
11-
struct int3472_pled *led = container_of(led_cdev, struct int3472_pled, classdev);
11+
struct int3472_led *led = container_of(led_cdev, struct int3472_led, classdev);
1212

1313
gpiod_set_value_cansleep(led->gpio, brightness);
1414
return 0;
1515
}
1616

17-
int skl_int3472_register_pled(struct int3472_discrete_device *int3472, struct gpio_desc *gpio)
17+
int skl_int3472_register_led(struct int3472_discrete_device *int3472, struct gpio_desc *gpio)
1818
{
19-
struct int3472_pled *led = &int3472->pled;
19+
struct int3472_led *led = &int3472->led;
2020
char *p;
2121
int ret;
2222

@@ -34,7 +34,7 @@ int skl_int3472_register_pled(struct int3472_discrete_device *int3472, struct gp
3434

3535
led->classdev.name = led->name;
3636
led->classdev.max_brightness = 1;
37-
led->classdev.brightness_set_blocking = int3472_pled_set;
37+
led->classdev.brightness_set_blocking = int3472_led_set;
3838

3939
ret = led_classdev_register(int3472->dev, &led->classdev);
4040
if (ret)
@@ -48,9 +48,9 @@ int skl_int3472_register_pled(struct int3472_discrete_device *int3472, struct gp
4848
return 0;
4949
}
5050

51-
void skl_int3472_unregister_pled(struct int3472_discrete_device *int3472)
51+
void skl_int3472_unregister_led(struct int3472_discrete_device *int3472)
5252
{
53-
struct int3472_pled *led = &int3472->pled;
53+
struct int3472_led *led = &int3472->led;
5454

5555
if (IS_ERR_OR_NULL(led->classdev.dev))
5656
return;

include/linux/platform_data/x86/int3472.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,12 +122,12 @@ struct int3472_discrete_device {
122122
u8 imgclk_index;
123123
} clock;
124124

125-
struct int3472_pled {
125+
struct int3472_led {
126126
struct led_classdev classdev;
127127
struct led_lookup_data lookup;
128128
char name[INT3472_LED_MAX_NAME_LEN];
129129
struct gpio_desc *gpio;
130-
} pled;
130+
} led;
131131

132132
struct int3472_discrete_quirks quirks;
133133

@@ -161,7 +161,7 @@ int skl_int3472_register_regulator(struct int3472_discrete_device *int3472,
161161
const char *second_sensor);
162162
void skl_int3472_unregister_regulator(struct int3472_discrete_device *int3472);
163163

164-
int skl_int3472_register_pled(struct int3472_discrete_device *int3472, struct gpio_desc *gpio);
165-
void skl_int3472_unregister_pled(struct int3472_discrete_device *int3472);
164+
int skl_int3472_register_led(struct int3472_discrete_device *int3472, struct gpio_desc *gpio);
165+
void skl_int3472_unregister_led(struct int3472_discrete_device *int3472);
166166

167167
#endif

0 commit comments

Comments
 (0)