Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

serial: imx: Remove unused platform data support

Since 5.10-rc1 i.MX is a devicetree-only platform and the existing
platform data support in this driver was only useful for old non-devicetree
platforms.

Get rid of the platform data support since it is no longer used.

Reviewed-by: Fugang Duan <fugang.duan@nxp.com>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Fabio Estevam <festevam@gmail.com>
Link: https://lore.kernel.org/r/20201110214840.16768-1-festevam@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Fabio Estevam and committed by
Greg Kroah-Hartman
1f78ae99 cb215da8

+3 -44
+3 -29
drivers/tty/serial/imx.c
··· 30 30 #include <linux/dma-mapping.h> 31 31 32 32 #include <asm/irq.h> 33 - #include <linux/platform_data/serial-imx.h> 34 33 #include <linux/platform_data/dma-imx.h> 35 34 36 35 #include "serial_mctrl_gpio.h" ··· 2190 2191 .cons = IMX_CONSOLE, 2191 2192 }; 2192 2193 2193 - #ifdef CONFIG_OF 2194 2194 /* 2195 - * This function returns 1 iff pdev isn't a device instatiated by dt, 0 iff it 2196 - * could successfully get all information from dt or a negative errno. 2195 + * This function returns 0 iff it could successfully get all information 2196 + * from dt or a negative errno. 2197 2197 */ 2198 2198 static int imx_uart_probe_dt(struct imx_port *sport, 2199 2199 struct platform_device *pdev) ··· 2229 2231 sport->inverted_rx = 1; 2230 2232 2231 2233 return 0; 2232 - } 2233 - #else 2234 - static inline int imx_uart_probe_dt(struct imx_port *sport, 2235 - struct platform_device *pdev) 2236 - { 2237 - return 1; 2238 - } 2239 - #endif 2240 - 2241 - static void imx_uart_probe_pdata(struct imx_port *sport, 2242 - struct platform_device *pdev) 2243 - { 2244 - struct imxuart_platform_data *pdata = dev_get_platdata(&pdev->dev); 2245 - 2246 - sport->port.line = pdev->id; 2247 - sport->devdata = (struct imx_uart_data *) pdev->id_entry->driver_data; 2248 - 2249 - if (!pdata) 2250 - return; 2251 - 2252 - if (pdata->flags & IMXUART_HAVE_RTSCTS) 2253 - sport->have_rtscts = 1; 2254 2234 } 2255 2235 2256 2236 static enum hrtimer_restart imx_trigger_start_tx(struct hrtimer *t) ··· 2271 2295 return -ENOMEM; 2272 2296 2273 2297 ret = imx_uart_probe_dt(sport, pdev); 2274 - if (ret > 0) 2275 - imx_uart_probe_pdata(sport, pdev); 2276 - else if (ret < 0) 2298 + if (ret < 0) 2277 2299 return ret; 2278 2300 2279 2301 if (sport->port.line >= ARRAY_SIZE(imx_uart_ports)) {
-15
include/linux/platform_data/serial-imx.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0-or-later */ 2 - /* 3 - * Copyright (C) 2008 by Sascha Hauer <kernel@pengutronix.de> 4 - */ 5 - 6 - #ifndef ASMARM_ARCH_UART_H 7 - #define ASMARM_ARCH_UART_H 8 - 9 - #define IMXUART_HAVE_RTSCTS (1<<0) 10 - 11 - struct imxuart_platform_data { 12 - unsigned int flags; 13 - }; 14 - 15 - #endif