summaryrefslogtreecommitdiffstats
path: root/drivers/tty
diff options
context:
space:
mode:
authorNaveen Krishna Chatradhi <ch.naveen@samsung.com>2014-07-14 07:37:18 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-07-17 21:18:22 -0400
commit4622eb687374ff042c79211d46bbd107c02f27d8 (patch)
tree0f36c5de81eddba56f11de6eb003c89788f04816 /drivers/tty
parent3bcce591aa1f5d9248666e41d99e76c27de6900f (diff)
serial: samsung: improve code clarity by defining a variable
The of_node is derived from pdev for every usage, define a device_node variable instead. Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com> Reviewed-by: Tomasz Figa <t.figa@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/serial/samsung.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/tty/serial/samsung.c b/drivers/tty/serial/samsung.c
index d98f93db85f9..4aff02d6712e 100644
--- a/drivers/tty/serial/samsung.c
+++ b/drivers/tty/serial/samsung.c
@@ -1269,12 +1269,13 @@ static inline struct s3c24xx_serial_drv_data *s3c24xx_get_driver_data(
1269 1269
1270static int s3c24xx_serial_probe(struct platform_device *pdev) 1270static int s3c24xx_serial_probe(struct platform_device *pdev)
1271{ 1271{
1272 struct device_node *np = pdev->dev.of_node;
1272 struct s3c24xx_uart_port *ourport; 1273 struct s3c24xx_uart_port *ourport;
1273 int index = probe_index; 1274 int index = probe_index;
1274 int ret; 1275 int ret;
1275 1276
1276 if (pdev->dev.of_node) { 1277 if (np) {
1277 ret = of_alias_get_id(pdev->dev.of_node, "serial"); 1278 ret = of_alias_get_id(np, "serial");
1278 if (ret >= 0) 1279 if (ret >= 0)
1279 index = ret; 1280 index = ret;
1280 } 1281 }
@@ -1295,8 +1296,8 @@ static int s3c24xx_serial_probe(struct platform_device *pdev)
1295 dev_get_platdata(&pdev->dev) : 1296 dev_get_platdata(&pdev->dev) :
1296 ourport->drv_data->def_cfg; 1297 ourport->drv_data->def_cfg;
1297 1298
1298 if (pdev->dev.of_node) 1299 if (np)
1299 of_property_read_u32(pdev->dev.of_node, 1300 of_property_read_u32(np,
1300 "samsung,uart-fifosize", &ourport->port.fifosize); 1301 "samsung,uart-fifosize", &ourport->port.fifosize);
1301 1302
1302 if (!ourport->port.fifosize) { 1303 if (!ourport->port.fifosize) {