diff options
Diffstat (limited to 'drivers/video/atmel_lcdfb_core.c')
-rw-r--r-- | drivers/video/atmel_lcdfb_core.c | 31 |
1 files changed, 11 insertions, 20 deletions
diff --git a/drivers/video/atmel_lcdfb_core.c b/drivers/video/atmel_lcdfb_core.c index e7e420d38f..9d3e6682b6 100644 --- a/drivers/video/atmel_lcdfb_core.c +++ b/drivers/video/atmel_lcdfb_core.c @@ -1,18 +1,8 @@ +// SPDX-License-Identifier: GPL-2.0-or-later /* * Driver for AT91/AT32 LCD Controller * * Copyright (C) 2007 Atmel Corporation - * - * 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> @@ -24,7 +14,7 @@ #include <linux/clk.h> #include <malloc.h> -#include <mach/cpu.h> +#include <mach/at91/cpu.h> #include "atmel_lcdfb.h" @@ -72,7 +62,7 @@ static void atmel_lcdc_disable_controller(struct fb_info *fb_info) static int atmel_lcdfb_check_var(struct fb_info *info) { - struct device_d *dev = &info->dev; + struct device *dev = &info->dev; struct atmel_lcdfb_info *sinfo = info->priv; struct fb_videomode *mode = info->mode; unsigned long clk_value_khz; @@ -247,7 +237,7 @@ static struct fb_ops atmel_lcdc_ops = { .fb_disable = atmel_lcdc_disable_controller, }; -static int power_control_init(struct device_d *dev, +static int power_control_init(struct device *dev, struct atmel_lcdfb_info *sinfo, int gpio, bool active_low) @@ -304,7 +294,7 @@ static int of_get_wiring_mode(struct device_node *np, return 0; } -static int of_get_power_control(struct device_d *dev, +static int of_get_power_control(struct device *dev, struct device_node *np, struct atmel_lcdfb_info *sinfo) { @@ -321,7 +311,7 @@ static int of_get_power_control(struct device_d *dev, return power_control_init(dev, sinfo, gpio, active_low); } -static int lcdfb_of_init(struct device_d *dev, struct atmel_lcdfb_info *sinfo) +static int lcdfb_of_init(struct device *dev, struct atmel_lcdfb_info *sinfo) { struct fb_info *info = &sinfo->info; struct display_timings *modes; @@ -338,7 +328,7 @@ static int lcdfb_of_init(struct device_d *dev, struct atmel_lcdfb_info *sinfo) } /* Required properties */ - display = of_parse_phandle(dev->device_node, "display", 0); + display = of_parse_phandle(dev->of_node, "display", 0); if (!display) { dev_err(dev, "no display phandle\n"); return -ENOENT; @@ -388,7 +378,8 @@ err: return ret; } -static int lcdfb_pdata_init(struct device_d *dev, struct atmel_lcdfb_info *sinfo) +static int lcdfb_pdata_init(struct device *dev, + struct atmel_lcdfb_info *sinfo) { struct atmel_lcdfb_platform_data *pdata; struct fb_info *info; @@ -432,7 +423,7 @@ err: return ret; } -int atmel_lcdc_register(struct device_d *dev, struct atmel_lcdfb_devdata *data) +int atmel_lcdc_register(struct device *dev, struct atmel_lcdfb_devdata *data) { struct atmel_lcdfb_info *sinfo; const char *bus_clk_name; @@ -460,7 +451,7 @@ int atmel_lcdc_register(struct device_d *dev, struct atmel_lcdfb_devdata *data) } bus_clk_name = "hck1"; } else { - if (!IS_ENABLED(CONFIG_OFDEVICE) || !dev->device_node) + if (!IS_ENABLED(CONFIG_OFDEVICE) || !dev->of_node) return -EINVAL; ret = lcdfb_of_init(dev, sinfo); |