[PATCHv4 4/4] serial: uartlite: Fix compilation issue on !OF platforms

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Michal Simek <michal.simek@xxxxxxxxxx>

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@xxxxxxxxxx>
Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xxxxxxxxxx>
---
v5:
new patch addition

 drivers/tty/serial/uartlite.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/tty/serial/uartlite.c b/drivers/tty/serial/uartlite.c
index 1bc3e59..19f68f3 100644
--- a/drivers/tty/serial/uartlite.c
+++ b/drivers/tty/serial/uartlite.c
@@ -773,8 +773,9 @@ 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",
-					      alias_bitmap, MAX_UART_INSTANCES);
+		ret = of_alias_get_alias_list(of_match_ptr(ulite_of_match),
+					      "serial", alias_bitmap,
+					      MAX_UART_INSTANCES);
 		if (ret) {
 			mutex_unlock(&bitmap_lock);
 			return ret;
-- 
2.1.1




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux