Skip to content

Commit

Permalink
serial: samsung: prefer to use fifosize from driver data
Browse files Browse the repository at this point in the history
If we have fifosize set in driver data we prefer to use it instead of default
fifosize value (which is always 16). If there is defined fifosize for particular
serial we prefer to use it, otherwise we use value from info, which is
common for all serials on given platform.

Signed-off-by: Robert Baldyga <r.baldyga@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Robert Baldyga authored and Greg Kroah-Hartman committed Nov 26, 2014
1 parent ef4aca7 commit 2f1ba72
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions drivers/tty/serial/samsung.c
Original file line number Diff line number Diff line change
Expand Up @@ -1292,11 +1292,10 @@ static int s3c24xx_serial_probe(struct platform_device *pdev)
of_property_read_u32(np,
"samsung,uart-fifosize", &ourport->port.fifosize);

if (!ourport->port.fifosize) {
ourport->port.fifosize = (ourport->info->fifosize) ?
ourport->info->fifosize :
ourport->drv_data->fifosize[index];
}
if (ourport->drv_data->fifosize[index])
ourport->port.fifosize = ourport->drv_data->fifosize[index];
else if (ourport->info->fifosize)
ourport->port.fifosize = ourport->info->fifosize;

probe_index++;

Expand Down

0 comments on commit 2f1ba72

Please sign in to comment.