.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* |
---|
2 | 3 | * Palmas USB transceiver driver |
---|
3 | 4 | * |
---|
4 | | - * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com |
---|
5 | | - * This program is free software; you can redistribute it and/or modify |
---|
6 | | - * it under the terms of the GNU General Public License as published by |
---|
7 | | - * the Free Software Foundation; either version 2 of the License, or |
---|
8 | | - * (at your option) any later version. |
---|
9 | | - * |
---|
| 5 | + * Copyright (C) 2013 Texas Instruments Incorporated - https://www.ti.com |
---|
10 | 6 | * Author: Graeme Gregory <gg@slimlogic.co.uk> |
---|
11 | 7 | * Author: Kishon Vijay Abraham I <kishon@ti.com> |
---|
12 | | - * |
---|
13 | 8 | * Based on twl6030_usb.c |
---|
14 | | - * |
---|
15 | 9 | * Author: Hema HK <hemahk@ti.com> |
---|
16 | | - * |
---|
17 | | - * This program is distributed in the hope that it will be useful, |
---|
18 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
19 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
20 | | - * GNU General Public License for more details. |
---|
21 | 10 | */ |
---|
22 | 11 | |
---|
23 | 12 | #include <linux/module.h> |
---|
.. | .. |
---|
216 | 205 | |
---|
217 | 206 | palmas_usb->id_gpiod = devm_gpiod_get_optional(&pdev->dev, "id", |
---|
218 | 207 | GPIOD_IN); |
---|
219 | | - if (IS_ERR(palmas_usb->id_gpiod)) { |
---|
220 | | - dev_err(&pdev->dev, "failed to get id gpio\n"); |
---|
221 | | - return PTR_ERR(palmas_usb->id_gpiod); |
---|
222 | | - } |
---|
| 208 | + if (IS_ERR(palmas_usb->id_gpiod)) |
---|
| 209 | + return dev_err_probe(&pdev->dev, PTR_ERR(palmas_usb->id_gpiod), |
---|
| 210 | + "failed to get id gpio\n"); |
---|
223 | 211 | |
---|
224 | 212 | palmas_usb->vbus_gpiod = devm_gpiod_get_optional(&pdev->dev, "vbus", |
---|
225 | 213 | GPIOD_IN); |
---|
226 | | - if (IS_ERR(palmas_usb->vbus_gpiod)) { |
---|
227 | | - dev_err(&pdev->dev, "failed to get vbus gpio\n"); |
---|
228 | | - return PTR_ERR(palmas_usb->vbus_gpiod); |
---|
229 | | - } |
---|
| 214 | + if (IS_ERR(palmas_usb->vbus_gpiod)) |
---|
| 215 | + return dev_err_probe(&pdev->dev, PTR_ERR(palmas_usb->vbus_gpiod), |
---|
| 216 | + "failed to get id gpio\n"); |
---|
230 | 217 | |
---|
231 | 218 | if (palmas_usb->enable_id_detection && palmas_usb->id_gpiod) { |
---|
232 | 219 | palmas_usb->enable_id_detection = false; |
---|