Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp656362ybi; Fri, 31 May 2019 07:05:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqyiii+n7QZdN9pBHIaDK5piymSzefMyKsogoBpyqP9VuqO5ajZISHBvLM7Eqid6YOOZki4i X-Received: by 2002:a17:90a:f48f:: with SMTP id bx15mr9605621pjb.85.1559311550764; Fri, 31 May 2019 07:05:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559311550; cv=none; d=google.com; s=arc-20160816; b=eodhombap3IA/XaTO3xLxUVjDMygGmzVi6ndUtEDXHDUi97cQMyfhAX4kH30sCntbd RdStFK0+H4p9oNcqcxTVc5s5g4CsBzdP8Q6oRl3oNhHZCAwbCltFchiXsem7MNZjbfUM 3ivBkhbiTOv4oiwvQ0hovWYIrItbdHJWf1EH1gur4ChTu4pRR/Giw/Q+TPkkJlNE2gFx fek7DW/fZdwpS3hJu/cxkNpAFyDGoyS9334goNJjjfco3yWfSP5zUoFz9JJ63rZpcUVv HUq7z/jq6FtQCwuVnr8xMuz9WdxEQJKc5XTu0fJkV/WJK+I2O/33774QtmUYTqubByiX f8fg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=X4G8CTwe6H4BU9Q2AlV5IeTINpOr1gEaiB74pbXls5I=; b=fn7fsm5pcyYcO8mE1nz0wKjXMB5ZwtUokleT5y6POI5n/umg+QXWbSf/7rUfSY3ef1 un4TgL7no+NUGUovxm/9OO0ReoEB7Vr5ZjHb7qTyQtqMPCEQz0raT+Yzkow5A/mnyUt4 hpphCrw2AO9KL6ajq+n14xcWQGcPAnl7+jyg5cZe5ie1REuHnIYMSF8hOHl2X4cJI2ua reG0GQJfjibgHWU5Igcsj6yV7yhd5VCUKlqIhf0h2hI0FNreAZjwmxy76ugsI8Pza0L3 Z7OnpmtrVEjyA82kJpYCeXF8p/7S4BYLdfGPYX7BALmV+al99ogNqvcS3W3Jz+wcOjhQ wXAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=Ny+J7PBH; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z9si6181156pgh.21.2019.05.31.07.05.19; Fri, 31 May 2019 07:05:50 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=Ny+J7PBH; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726708AbfEaOC1 (ORCPT + 99 others); Fri, 31 May 2019 10:02:27 -0400 Received: from lelv0142.ext.ti.com ([198.47.23.249]:47972 "EHLO lelv0142.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726037AbfEaOC1 (ORCPT ); Fri, 31 May 2019 10:02:27 -0400 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id x4VE2Nk6016233; Fri, 31 May 2019 09:02:23 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1559311343; bh=X4G8CTwe6H4BU9Q2AlV5IeTINpOr1gEaiB74pbXls5I=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=Ny+J7PBHlP59ZfM0ndebblQFBAe15C9shS8AyesYsL2YT7EiO7L3TkoCJpftkzW2q 0AGSBkO9PV0f0nSQGwMeGBJILYm5ES1pxlB6UNRps3uZyXG6VwsOggj2KmjuSAewkt bx6f78kXoglW7D7GrqwYH0EU2Gmuukzt/L2n17NA= Received: from DFLE115.ent.ti.com (dfle115.ent.ti.com [10.64.6.36]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x4VE2N4q072318 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 31 May 2019 09:02:23 -0500 Received: from DFLE102.ent.ti.com (10.64.6.23) by DFLE115.ent.ti.com (10.64.6.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Fri, 31 May 2019 09:02:23 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DFLE102.ent.ti.com (10.64.6.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Fri, 31 May 2019 09:02:23 -0500 Received: from [128.247.58.153] (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id x4VE2N25033657; Fri, 31 May 2019 09:02:23 -0500 Subject: Re: [PATCH v2] hwspinlock: ignore disabled device To: Fabien Dessenne , Ohad Ben-Cohen , Bjorn Andersson , , CC: Benjamin Gaignard References: <1552064026-11415-1-git-send-email-fabien.dessenne@st.com> From: Suman Anna Message-ID: Date: Fri, 31 May 2019 09:02:23 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <1552064026-11415-1-git-send-email-fabien.dessenne@st.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3/8/19 10:53 AM, Fabien Dessenne wrote: > Do not wait for hwspinlock device registration if it is not available > for use. > > Signed-off-by: Fabien Dessenne Acked-by: Suman Anna > --- > V2: use 'goto out' instead of 'return' > > drivers/hwspinlock/hwspinlock_core.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/drivers/hwspinlock/hwspinlock_core.c b/drivers/hwspinlock/hwspinlock_core.c > index 2bad40d..d806307 100644 > --- a/drivers/hwspinlock/hwspinlock_core.c > +++ b/drivers/hwspinlock/hwspinlock_core.c > @@ -333,6 +333,11 @@ int of_hwspin_lock_get_id(struct device_node *np, int index) > if (ret) > return ret; > > + if (!of_device_is_available(args.np)) { > + ret = -ENOENT; > + goto out; > + } > + > /* Find the hwspinlock device: we need its base_id */ > ret = -EPROBE_DEFER; > rcu_read_lock(); >