mirror of
https://xff.cz/git/u-boot/
synced 2025-09-01 16:52:14 +02:00
dm: led: Rename struct led_uclass_plat
These structures are normally named with 'uc' instead of 'uclass'. Change this one for consistency. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Ziping Chen <techping.chan@gmail.com>
This commit is contained in:
@@ -22,7 +22,7 @@ int led_get_by_label(const char *label, struct udevice **devp)
|
|||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
uclass_foreach_dev(dev, uc) {
|
uclass_foreach_dev(dev, uc) {
|
||||||
struct led_uclass_plat *uc_plat = dev_get_uclass_platdata(dev);
|
struct led_uc_plat *uc_plat = dev_get_uclass_platdata(dev);
|
||||||
|
|
||||||
/* Ignore the top-level LED node */
|
/* Ignore the top-level LED node */
|
||||||
if (uc_plat->label && !strcmp(label, uc_plat->label))
|
if (uc_plat->label && !strcmp(label, uc_plat->label))
|
||||||
@@ -45,5 +45,5 @@ int led_set_on(struct udevice *dev, int on)
|
|||||||
UCLASS_DRIVER(led) = {
|
UCLASS_DRIVER(led) = {
|
||||||
.id = UCLASS_LED,
|
.id = UCLASS_LED,
|
||||||
.name = "led",
|
.name = "led",
|
||||||
.per_device_platdata_auto_alloc_size = sizeof(struct led_uclass_plat),
|
.per_device_platdata_auto_alloc_size = sizeof(struct led_uc_plat),
|
||||||
};
|
};
|
||||||
|
@@ -30,7 +30,7 @@ static int gpio_led_set_on(struct udevice *dev, int on)
|
|||||||
|
|
||||||
static int led_gpio_probe(struct udevice *dev)
|
static int led_gpio_probe(struct udevice *dev)
|
||||||
{
|
{
|
||||||
struct led_uclass_plat *uc_plat = dev_get_uclass_platdata(dev);
|
struct led_uc_plat *uc_plat = dev_get_uclass_platdata(dev);
|
||||||
struct led_gpio_priv *priv = dev_get_priv(dev);
|
struct led_gpio_priv *priv = dev_get_priv(dev);
|
||||||
|
|
||||||
/* Ignore the top-level LED node */
|
/* Ignore the top-level LED node */
|
||||||
@@ -65,7 +65,7 @@ static int led_gpio_bind(struct udevice *parent)
|
|||||||
for (node = fdt_first_subnode(blob, dev_of_offset(parent));
|
for (node = fdt_first_subnode(blob, dev_of_offset(parent));
|
||||||
node > 0;
|
node > 0;
|
||||||
node = fdt_next_subnode(blob, node)) {
|
node = fdt_next_subnode(blob, node)) {
|
||||||
struct led_uclass_plat *uc_plat;
|
struct led_uc_plat *uc_plat;
|
||||||
const char *label;
|
const char *label;
|
||||||
|
|
||||||
label = fdt_getprop(blob, node, "label", NULL);
|
label = fdt_getprop(blob, node, "label", NULL);
|
||||||
|
@@ -9,11 +9,11 @@
|
|||||||
#define __LED_H
|
#define __LED_H
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* struct led_uclass_plat - Platform data the uclass stores about each device
|
* struct led_uc_plat - Platform data the uclass stores about each device
|
||||||
*
|
*
|
||||||
* @label: LED label
|
* @label: LED label
|
||||||
*/
|
*/
|
||||||
struct led_uclass_plat {
|
struct led_uc_plat {
|
||||||
const char *label;
|
const char *label;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user