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

Configure Feed

Select the types of activity you want to include in your feed.

serial: xilinx_uartps: drop cdns_uart::cdns_uart_driver

Provided the uart driver is available globally, there is no need to
store a pointer to it in struct cdns_uart. Instead, use the global
cdns_uart_uart_driver in the code directly.

Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org>
Acked-by: Michal Simek <michal.simek@amd.com>
Link: https://patch.msgid.link/20251119092457.826789-3-jirislaby@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Jiri Slaby (SUSE) and committed by
Greg Kroah-Hartman
6d4b55bf 80a3471f

+5 -10
+5 -10
drivers/tty/serial/xilinx_uartps.c
··· 190 190 * @port: Pointer to the UART port 191 191 * @uartclk: Reference clock 192 192 * @pclk: APB clock 193 - * @cdns_uart_driver: Pointer to UART driver 194 193 * @baud: Current baud rate 195 194 * @clk_rate_change_nb: Notifier block for clock changes 196 195 * @quirks: Flags for RXBS support. ··· 203 204 struct uart_port *port; 204 205 struct clk *uartclk; 205 206 struct clk *pclk; 206 - struct uart_driver *cdns_uart_driver; 207 207 unsigned int baud; 208 208 struct notifier_block clk_rate_change_nb; 209 209 u32 quirks; ··· 1463 1465 static int cdns_uart_suspend(struct device *device) 1464 1466 { 1465 1467 struct uart_port *port = dev_get_drvdata(device); 1466 - struct cdns_uart *cdns_uart = port->private_data; 1467 1468 int may_wake; 1468 1469 1469 1470 may_wake = device_may_wakeup(device); ··· 1486 1489 * Call the API provided in serial_core.c file which handles 1487 1490 * the suspend. 1488 1491 */ 1489 - return uart_suspend_port(cdns_uart->cdns_uart_driver, port); 1492 + return uart_suspend_port(&cdns_uart_uart_driver, port); 1490 1493 } 1491 1494 1492 1495 /** ··· 1547 1550 uart_port_unlock_irqrestore(port, flags); 1548 1551 } 1549 1552 1550 - return uart_resume_port(cdns_uart->cdns_uart_driver, port); 1553 + return uart_resume_port(&cdns_uart_uart_driver, port); 1551 1554 } 1552 1555 #endif /* ! CONFIG_PM_SLEEP */ 1553 1556 static int __maybe_unused cdns_runtime_suspend(struct device *dev) ··· 1682 1685 return rc; 1683 1686 } 1684 1687 } 1685 - 1686 - cdns_uart_data->cdns_uart_driver = &cdns_uart_uart_driver; 1687 1688 1688 1689 match = of_match_node(cdns_uart_of_match, pdev->dev.of_node); 1689 1690 if (match && match->data) { ··· 1857 1862 clk_disable_unprepare(cdns_uart_data->pclk); 1858 1863 err_out_unregister_driver: 1859 1864 if (!instances) 1860 - uart_unregister_driver(cdns_uart_data->cdns_uart_driver); 1865 + uart_unregister_driver(&cdns_uart_uart_driver); 1861 1866 return rc; 1862 1867 } 1863 1868 ··· 1875 1880 clk_notifier_unregister(cdns_uart_data->uartclk, 1876 1881 &cdns_uart_data->clk_rate_change_nb); 1877 1882 #endif 1878 - uart_remove_one_port(cdns_uart_data->cdns_uart_driver, port); 1883 + uart_remove_one_port(&cdns_uart_uart_driver, port); 1879 1884 port->mapbase = 0; 1880 1885 clk_disable_unprepare(cdns_uart_data->uartclk); 1881 1886 clk_disable_unprepare(cdns_uart_data->pclk); ··· 1891 1896 reset_control_assert(cdns_uart_data->rstc); 1892 1897 1893 1898 if (!--instances) 1894 - uart_unregister_driver(cdns_uart_data->cdns_uart_driver); 1899 + uart_unregister_driver(&cdns_uart_uart_driver); 1895 1900 } 1896 1901 1897 1902 static struct platform_driver cdns_uart_platform_driver = {