diff options
Diffstat (limited to 'drivers/nfc/nfcmrvl/uart.c')
| -rw-r--r-- | drivers/nfc/nfcmrvl/uart.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/drivers/nfc/nfcmrvl/uart.c b/drivers/nfc/nfcmrvl/uart.c index 9c92cbdc42f0..2037cd6d4f4f 100644 --- a/drivers/nfc/nfcmrvl/uart.c +++ b/drivers/nfc/nfcmrvl/uart.c @@ -5,11 +5,16 @@ * Copyright (C) 2015, Marvell International Ltd. */ -#include <linux/module.h> #include <linux/delay.h> -#include <linux/of_gpio.h> +#include <linux/device.h> +#include <linux/err.h> +#include <linux/module.h> +#include <linux/of.h> +#include <linux/printk.h> + #include <net/nfc/nci.h> #include <net/nfc/nci_core.h> + #include "nfcmrvl.h" static unsigned int hci_muxed; @@ -76,15 +81,8 @@ static int nfcmrvl_uart_parse_dt(struct device_node *node, return ret; } - if (of_find_property(matched_node, "flow-control", NULL)) - pdata->flow_control = 1; - else - pdata->flow_control = 0; - - if (of_find_property(matched_node, "break-control", NULL)) - pdata->break_control = 1; - else - pdata->break_control = 0; + pdata->flow_control = of_property_read_bool(matched_node, "flow-control"); + pdata->break_control = of_property_read_bool(matched_node, "break-control"); of_node_put(matched_node); |
