diff options
Diffstat (limited to 'drivers/led')
-rw-r--r-- | drivers/led/led-gpio.c | 14 | ||||
-rw-r--r-- | drivers/led/led-pca955x.c | 7 | ||||
-rw-r--r-- | drivers/led/led-pwm.c | 7 |
3 files changed, 14 insertions, 14 deletions
diff --git a/drivers/led/led-gpio.c b/drivers/led/led-gpio.c index 1a5eda0371..c0d14256d3 100644 --- a/drivers/led/led-gpio.c +++ b/drivers/led/led-gpio.c @@ -192,20 +192,20 @@ void led_gpio_rgb_unregister(struct gpio_rgb_led *led) #endif /* CONFIG_LED_GPIO_RGB */ #ifdef CONFIG_LED_GPIO_OF -static int led_gpio_of_probe(struct device_d *dev) +static int led_gpio_of_probe(struct device *dev) { struct device_node *child; struct gpio_led *leds; int num_leds; int ret = 0, n = 0; - num_leds = of_get_child_count(dev->device_node); + num_leds = of_get_child_count(dev->of_node); if (num_leds <= 0) return num_leds; leds = xzalloc(num_leds * sizeof(struct gpio_led)); - for_each_child_of_node(dev->device_node, child) { + for_each_child_of_node(dev->of_node, child) { struct gpio_led *gled = &leds[n]; const char *default_state; enum of_gpio_flags flags; @@ -214,10 +214,7 @@ static int led_gpio_of_probe(struct device_d *dev) gpio = of_get_named_gpio_flags(child, "gpios", 0, &flags); if (gpio < 0) { - if (gpio != -EPROBE_DEFER) - dev_err(dev, "failed to get gpio for %s: %d\n", - child->full_name, gpio); - ret = gpio; + ret = dev_err_probe(dev, gpio, "getting gpio for %pOF\n", child); goto err; } @@ -257,8 +254,9 @@ static struct of_device_id led_gpio_of_ids[] = { { .compatible = "gpio-leds", }, { } }; +MODULE_DEVICE_TABLE(of, led_gpio_of_ids); -static struct driver_d led_gpio_of_driver = { +static struct driver led_gpio_of_driver = { .name = "gpio-leds", .probe = led_gpio_of_probe, .of_compatible = DRV_OF_COMPAT(led_gpio_of_ids), diff --git a/drivers/led/led-pca955x.c b/drivers/led/led-pca955x.c index aa518fe738..cad4db3799 100644 --- a/drivers/led/led-pca955x.c +++ b/drivers/led/led-pca955x.c @@ -325,8 +325,9 @@ static const struct of_device_id of_pca955x_match[] = { { .compatible = "nxp,pca9553", .data = &pca9553_chipdef }, {}, }; +MODULE_DEVICE_TABLE(of, of_pca955x_match); -static int led_pca955x_probe(struct device_d *dev) +static int led_pca955x_probe(struct device *dev) { struct pca955x *pca955x; struct pca955x_led *pca955x_led; @@ -365,7 +366,7 @@ static int led_pca955x_probe(struct device_d *dev) pca955x->client = client; pca955x->chipdef = chip; - pdata = led_pca955x_pdata_of_init(dev->device_node, pca955x); + pdata = led_pca955x_pdata_of_init(dev->of_node, pca955x); if (IS_ERR(pdata)) return PTR_ERR(pdata); @@ -393,7 +394,7 @@ static int led_pca955x_probe(struct device_d *dev) return err; } -static struct driver_d led_pca955x_driver = { +static struct driver led_pca955x_driver = { .name = "led-pca955x", .probe = led_pca955x_probe, .id_table = led_pca955x_id, diff --git a/drivers/led/led-pwm.c b/drivers/led/led-pwm.c index 071e219d73..2ffb72e692 100644 --- a/drivers/led/led-pwm.c +++ b/drivers/led/led-pwm.c @@ -39,12 +39,12 @@ static void led_pwm_set(struct led *led, unsigned int brightness) pwm_apply_state(pwmled->pwm, &state); } -static int led_pwm_of_probe(struct device_d *dev) +static int led_pwm_of_probe(struct device *dev) { struct device_node *child; int ret; - for_each_child_of_node(dev->device_node, child) { + for_each_child_of_node(dev->of_node, child) { struct pwmled *pwmled; struct pwm_device *pwm; @@ -80,8 +80,9 @@ static struct of_device_id led_pwm_of_ids[] = { { .compatible = "pwm-leds", }, { } }; +MODULE_DEVICE_TABLE(of, led_pwm_of_ids); -static struct driver_d led_pwm_of_driver = { +static struct driver led_pwm_of_driver = { .name = "pwm-leds", .probe = led_pwm_of_probe, .of_compatible = DRV_OF_COMPAT(led_pwm_of_ids), |