serial: xilinx_uartps: kill CONFIG_OF conditional
authorJosh Cartwright <josh.cartwright@ni.com>
Mon, 5 Nov 2012 21:24:26 +0000 (15:24 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 16 Nov 2012 00:58:19 +0000 (16:58 -0800)
The Zynq platform requires the use of CONFIG_OF.  Remove the #ifdef
conditionals in the uartps driver.  Make dependency explicit in Kconfig.

Signed-off-by: Josh Cartwright <josh.cartwright@ni.com>
Tested-by: Michal Simek <monstr@monstr.eu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/Kconfig
drivers/tty/serial/xilinx_uartps.c

index b1768012ed219b9c1f31d78d8352de452268f0bf..6a69c88c50208c8106fc5a50c34dc7ebc2c446d0 100644 (file)
@@ -1376,6 +1376,7 @@ config SERIAL_MXS_AUART_CONSOLE
 
 config SERIAL_XILINX_PS_UART
        tristate "Xilinx PS UART support"
+       depends on OF
        select SERIAL_CORE
        help
          This driver supports the Xilinx PS UART port.
index b627363352e5c3fe8e32fff003830f7834bff7ee..23efe17be44bb7a66668ea2dd734ba3f3719f056 100644 (file)
@@ -946,15 +946,11 @@ static int __devinit xuartps_probe(struct platform_device *pdev)
        struct resource *res, *res2;
        int clk = 0;
 
-#ifdef CONFIG_OF
        const unsigned int *prop;
 
        prop = of_get_property(pdev->dev.of_node, "clock", NULL);
        if (prop)
                clk = be32_to_cpup(prop);
-#else
-       clk = *((unsigned int *)(pdev->dev.platform_data));
-#endif
        if (!clk) {
                dev_err(&pdev->dev, "no clock specified\n");
                return -ENODEV;
@@ -1044,16 +1040,11 @@ static int xuartps_resume(struct platform_device *pdev)
 }
 
 /* Match table for of_platform binding */
-
-#ifdef CONFIG_OF
 static struct of_device_id xuartps_of_match[] __devinitdata = {
        { .compatible = "xlnx,xuartps", },
        {}
 };
 MODULE_DEVICE_TABLE(of, xuartps_of_match);
-#else
-#define xuartps_of_match NULL
-#endif
 
 static struct platform_driver xuartps_platform_driver = {
        .probe   = xuartps_probe,               /* Probe method */