diff options
Diffstat (limited to 'drivers/nfc/pn533/uart.c')
-rw-r--r-- | drivers/nfc/pn533/uart.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/nfc/pn533/uart.c b/drivers/nfc/pn533/uart.c index 46e5ff16f699..a0665d8ea85b 100644 --- a/drivers/nfc/pn533/uart.c +++ b/drivers/nfc/pn533/uart.c @@ -100,20 +100,27 @@ static void pn532_uart_abort_cmd(struct pn533 *dev, gfp_t flags) pn533_recv_frame(dev, NULL, -ENOENT); } -static void pn532_dev_up(struct pn533 *dev) +static int pn532_dev_up(struct pn533 *dev) { struct pn532_uart_phy *pn532 = dev->phy; + int ret = 0; + + ret = serdev_device_open(pn532->serdev); + if (ret) + return ret; - serdev_device_open(pn532->serdev); pn532->send_wakeup = PN532_SEND_LAST_WAKEUP; + return ret; } -static void pn532_dev_down(struct pn533 *dev) +static int pn532_dev_down(struct pn533 *dev) { struct pn532_uart_phy *pn532 = dev->phy; serdev_device_close(pn532->serdev); pn532->send_wakeup = PN532_SEND_WAKEUP; + + return 0; } static struct pn533_phy_ops uart_phy_ops = { |