diff options
author | Alexander Shiyan <shc_work@mail.ru> | 2014-02-22 07:01:35 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-02-28 19:36:45 -0500 |
commit | 45af780a0fcac8fbba0ac740a671b2af80bcf189 (patch) | |
tree | 41c6cc4b1c829085a164d9e4c10471a1ea9f5698 /drivers/tty/serial | |
parent | 436e4ab5fc85d3d198c292ff46ceb2fb142a39d1 (diff) |
serial: imx: Remove init() and exit() platform callbacks
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial')
-rw-r--r-- | drivers/tty/serial/imx.c | 27 |
1 files changed, 2 insertions, 25 deletions
diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c index 37c39390efb7..3b6c1a2e25de 100644 --- a/drivers/tty/serial/imx.c +++ b/drivers/tty/serial/imx.c | |||
@@ -1901,7 +1901,6 @@ static void serial_imx_probe_pdata(struct imx_port *sport, | |||
1901 | static int serial_imx_probe(struct platform_device *pdev) | 1901 | static int serial_imx_probe(struct platform_device *pdev) |
1902 | { | 1902 | { |
1903 | struct imx_port *sport; | 1903 | struct imx_port *sport; |
1904 | struct imxuart_platform_data *pdata; | ||
1905 | void __iomem *base; | 1904 | void __iomem *base; |
1906 | int ret = 0; | 1905 | int ret = 0; |
1907 | struct resource *res; | 1906 | struct resource *res; |
@@ -1955,38 +1954,16 @@ static int serial_imx_probe(struct platform_device *pdev) | |||
1955 | 1954 | ||
1956 | imx_ports[sport->port.line] = sport; | 1955 | imx_ports[sport->port.line] = sport; |
1957 | 1956 | ||
1958 | pdata = dev_get_platdata(&pdev->dev); | ||
1959 | if (pdata && pdata->init) { | ||
1960 | ret = pdata->init(pdev); | ||
1961 | if (ret) | ||
1962 | return ret; | ||
1963 | } | ||
1964 | |||
1965 | ret = uart_add_one_port(&imx_reg, &sport->port); | ||
1966 | if (ret) | ||
1967 | goto deinit; | ||
1968 | platform_set_drvdata(pdev, sport); | 1957 | platform_set_drvdata(pdev, sport); |
1969 | 1958 | ||
1970 | return 0; | 1959 | return uart_add_one_port(&imx_reg, &sport->port); |
1971 | deinit: | ||
1972 | if (pdata && pdata->exit) | ||
1973 | pdata->exit(pdev); | ||
1974 | return ret; | ||
1975 | } | 1960 | } |
1976 | 1961 | ||
1977 | static int serial_imx_remove(struct platform_device *pdev) | 1962 | static int serial_imx_remove(struct platform_device *pdev) |
1978 | { | 1963 | { |
1979 | struct imxuart_platform_data *pdata; | ||
1980 | struct imx_port *sport = platform_get_drvdata(pdev); | 1964 | struct imx_port *sport = platform_get_drvdata(pdev); |
1981 | 1965 | ||
1982 | pdata = dev_get_platdata(&pdev->dev); | 1966 | return uart_remove_one_port(&imx_reg, &sport->port); |
1983 | |||
1984 | uart_remove_one_port(&imx_reg, &sport->port); | ||
1985 | |||
1986 | if (pdata && pdata->exit) | ||
1987 | pdata->exit(pdev); | ||
1988 | |||
1989 | return 0; | ||
1990 | } | 1967 | } |
1991 | 1968 | ||
1992 | static struct platform_driver serial_imx_driver = { | 1969 | static struct platform_driver serial_imx_driver = { |