From 9d77db3c730780c8ef5ccd4b66403ff5675cfe4e Mon Sep 17 00:00:00 2001 From: hc <hc@nodka.com> Date: Mon, 13 May 2024 10:30:14 +0000 Subject: [PATCH] modify sin led gpio --- kernel/drivers/power/reset/gpio-restart.c | 18 ++++++------------ 1 files changed, 6 insertions(+), 12 deletions(-) diff --git a/kernel/drivers/power/reset/gpio-restart.c b/kernel/drivers/power/reset/gpio-restart.c index 829b45f..5466eee 100644 --- a/kernel/drivers/power/reset/gpio-restart.c +++ b/kernel/drivers/power/reset/gpio-restart.c @@ -1,16 +1,8 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * Toggles a GPIO pin to restart a device * * Copyright (C) 2014 Google, Inc. - * - * This software is licensed under the terms of the GNU General Public - * License version 2, as published by the Free Software Foundation, and - * may be copied, distributed, and modified under those terms. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. * * Based on the gpio-poweroff driver. */ @@ -72,9 +64,11 @@ gpio_restart->reset_gpio = devm_gpiod_get(&pdev->dev, NULL, open_source ? GPIOD_IN : GPIOD_OUT_LOW); - if (IS_ERR(gpio_restart->reset_gpio)) { - dev_err(&pdev->dev, "Could net get reset GPIO\n"); - return PTR_ERR(gpio_restart->reset_gpio); + ret = PTR_ERR_OR_ZERO(gpio_restart->reset_gpio); + if (ret) { + if (ret != -EPROBE_DEFER) + dev_err(&pdev->dev, "Could not get reset GPIO\n"); + return ret; } gpio_restart->restart_handler.notifier_call = gpio_restart_notify; -- Gitblit v1.6.2