From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932849AbcCMNaP (ORCPT ); Sun, 13 Mar 2016 09:30:15 -0400 Received: from hqemgate14.nvidia.com ([216.228.121.143]:15628 "EHLO hqemgate14.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751124AbcCMNaH (ORCPT ); Sun, 13 Mar 2016 09:30:07 -0400 X-PGP-Universal: processed; by hqnvupgp07.nvidia.com on Sun, 13 Mar 2016 06:28:41 -0700 From: Laxman Dewangan To: , CC: , Laxman Dewangan Subject: [PATCH V2] regulator: fixed: Remove workaround to handle of_get_named_gpio() return Date: Sun, 13 Mar 2016 18:46:57 +0530 Message-ID: <1457875017-17414-1-git-send-email-ldewangan@nvidia.com> X-Mailer: git-send-email 2.1.4 MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The GPIO interface of_get_named_gpio() has implemented the proper error returns even EPROBE_DEFER and hence caller need not to implement any workaround for translating the returned error. Remove the workaround implemented to handle the return of of_get_named_gpio(). Signed-off-by: Laxman Dewangan --- As per comment, it is said that patch is already posted. If the patch is active then please add my Tested-by: Laxman Dewangan Changes form V1: - Term WAR converted to waroaround. drivers/regulator/fixed.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/drivers/regulator/fixed.c b/drivers/regulator/fixed.c index ff62d69..988a747 100644 --- a/drivers/regulator/fixed.c +++ b/drivers/regulator/fixed.c @@ -79,18 +79,8 @@ of_get_fixed_voltage_config(struct device *dev, config->enabled_at_boot = true; config->gpio = of_get_named_gpio(np, "gpio", 0); - /* - * of_get_named_gpio() currently returns ENODEV rather than - * EPROBE_DEFER. This code attempts to be compatible with both - * for now; the ENODEV check can be removed once the API is fixed. - * of_get_named_gpio() doesn't differentiate between a missing - * property (which would be fine here, since the GPIO is optional) - * and some other error. Patches have been posted for both issues. - * Once they are check in, we should replace this with: - * if (config->gpio < 0 && config->gpio != -ENOENT) - */ - if ((config->gpio == -ENODEV) || (config->gpio == -EPROBE_DEFER)) - return ERR_PTR(-EPROBE_DEFER); + if ((config->gpio < 0) && (config->gpio != -ENOENT)) + return ERR_PTR(config->gpio); of_property_read_u32(np, "startup-delay-us", &config->startup_delay); -- 2.1.4