]> rtime.felk.cvut.cz Git - zynq/linux.git/commitdiff
serial: uartlite: Fix compilation issue on !OF platforms
authorMichal Simek <michal.simek@xilinx.com>
Wed, 17 Oct 2018 07:20:09 +0000 (09:20 +0200)
committerMichal Simek <michal.simek@xilinx.com>
Wed, 7 Nov 2018 10:06:05 +0000 (11:06 +0100)
There is missing ulite_of_match on !OF platforms.
Use of_match_ptr() to fix it.

Warning log:
drivers/tty/serial/uartlite.c: In function ‘ulite_get_id’:
drivers/tty/serial/uartlite.c:774:33: error: ‘ulite_of_match’ undeclared
(first use in this function)
   ret = of_alias_get_alias_list(ulite_of_match, "serial",
                                 ^
drivers/tty/serial/uartlite.c:774:33: note: each undeclared identifier
is reported only once for each function it appears in

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
drivers/tty/serial/uartlite.c

index 522845340cd3d26162bd446f5919c5375539a2aa..fc567659e5eb03465680bbfd7b7c65ac85ec62cb 100644 (file)
@@ -771,7 +771,7 @@ static int ulite_get_id(struct platform_device *pdev)
 
        /* Alias list is stable that's why get alias bitmap only once */
        if (!alias_bitmap_initialized) {
-               ret = of_alias_get_alias_list(ulite_of_match, "serial",
+               ret = of_alias_get_alias_list(of_match_ptr(ulite_of_match), "serial",
                                              alias_bitmap, MAX_UART_INSTANCES);
                if (ret) {
                        mutex_unlock(&bitmap_lock);