diff options
Diffstat (limited to 'drivers/led/led-pwm.c')
-rw-r--r-- | drivers/led/led-pwm.c | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/drivers/led/led-pwm.c b/drivers/led/led-pwm.c index 90c2ca929a..2ffb72e692 100644 --- a/drivers/led/led-pwm.c +++ b/drivers/led/led-pwm.c @@ -1,18 +1,8 @@ +// SPDX-License-Identifier: GPL-2.0-or-later /* * pwm LED support for barebox * * (C) Copyright 2010 Sascha Hauer, Pengutronix - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * */ #include <common.h> #include <malloc.h> @@ -49,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; @@ -90,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), |