diff options
Diffstat (limited to 'drivers/video/simple-panel.c')
-rw-r--r-- | drivers/video/simple-panel.c | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/drivers/video/simple-panel.c b/drivers/video/simple-panel.c index 2f904a7b2b..7048e2f51b 100644 --- a/drivers/video/simple-panel.c +++ b/drivers/video/simple-panel.c @@ -1,18 +1,8 @@ +// SPDX-License-Identifier: GPL-2.0-or-later /* * simple panel support for barebox * * (C) Copyright 2014 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> @@ -27,7 +17,7 @@ #include <i2c/i2c.h> struct simple_panel { - struct device_d *dev; + struct device *dev; struct vpl vpl; int enable_gpio; int enable_active_high; @@ -109,7 +99,7 @@ static int simple_panel_get_modes(struct simple_panel *panel, struct display_tim } } - modes = of_get_display_timings(panel->dev->device_node); + modes = of_get_display_timings(panel->dev->of_node); if (modes) { timings->modes = modes->modes; timings->num_modes = modes->num_modes; @@ -139,10 +129,10 @@ static int simple_panel_ioctl(struct vpl *vpl, unsigned int port, } } -static int simple_panel_probe(struct device_d *dev) +static int simple_panel_probe(struct device *dev) { struct simple_panel *panel; - struct device_node *node = dev->device_node; + struct device_node *node = dev->of_node; enum of_gpio_flags flags; int ret; @@ -175,8 +165,9 @@ static struct of_device_id simple_panel_of_ids[] = { { .compatible = "simple-panel", }, { } }; +MODULE_DEVICE_TABLE(of, simple_panel_of_ids); -static struct driver_d simple_panel_driver = { +static struct driver simple_panel_driver = { .name = "simple-panel", .probe = simple_panel_probe, .of_compatible = DRV_OF_COMPAT(simple_panel_of_ids), |