From patchwork Tue Mar 27 21:06:42 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 132491 Delivered-To: patch@linaro.org Received: by 10.46.84.29 with SMTP id i29csp5560445ljb; Tue, 27 Mar 2018 14:06:57 -0700 (PDT) X-Google-Smtp-Source: AIpwx48Pk1LZswp4ES5PzARVu+LGhlMEuKMALMyBAtpKJMN+Bv6ZW/ktLTZSkXvk/bzDPXoWm6nj X-Received: by 10.99.64.3 with SMTP id n3mr65445pga.13.1522184817297; Tue, 27 Mar 2018 14:06:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522184817; cv=none; d=google.com; s=arc-20160816; b=tbF93NJu8icWHEMyECSqoTojv0GfDOrKNz4ygT3Yb7AtZNyk63UNRi9ZuWbN7xdkmI U3PaVkxUGaDwODn86R7frC+QQfqjyG8ZgZbsLDPV/Tp65Ox3Agy9UtKjxNWGCKYQiODB CvV10xYYvyfsiImuNmdCXQjgZ4JZhBe2PaUWD1iYwJf4G2Isaeimxp73Xjo2iNNzbSOI WAkcHkot/GB6XyeMUESliqa3dH6rxhloIotsaXtKgYsJF+fQG3vkT6Shjr4Ykvx4A1az 6mtVOwhO1aenquSYpfFkrR0HPWWrFk6sDG+g8zOfWeTxPnSvCMr6vOIsMsAgOucLtqpv 69Hg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=FxlxuSWFVaDCIxehf4PO8eesHXIj9TJ3+57eBkM1Obg=; b=m1HGWkaE+OEafpVYB+VrtMvMsAxHLZ7YZ0G6R8Ae74nngDZXXf3A0bKnEMqTIkLU2e DrXz51E75AjfpzQAr5mZVcaJHLuFaTwZVTx7XNcyv8+XAYxzb9c4o6+wPLLJti3zUjqX cC6V+slBXjCJSOLoBwjxMCBdjtGFYGrMI7DuFfYjaK1NW0IvHkMSfHj9+NRr+21mpr7p 4OKSxz6t+n87Je2c/v5VecTuUAQw+pokqJIb0L3GZLg96HuDhyOJ+9naHKzAK76T6Ift 0jIC4+1j/FD/lqiSrwB1iDgsgu+AFqg+V8OQWC2jxvV2Uk0/epqCgmM6AQMCxTbdOm50 4AhQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=P3S0KFHM; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t9si1576485pfh.101.2018.03.27.14.06.56; Tue, 27 Mar 2018 14:06:57 -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=@linaro.org header.s=google header.b=P3S0KFHM; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752490AbeC0VGx (ORCPT + 28 others); Tue, 27 Mar 2018 17:06:53 -0400 Received: from mail-pl0-f68.google.com ([209.85.160.68]:33874 "EHLO mail-pl0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752364AbeC0VGt (ORCPT ); Tue, 27 Mar 2018 17:06:49 -0400 Received: by mail-pl0-f68.google.com with SMTP id u11-v6so195009plq.1 for ; Tue, 27 Mar 2018 14:06:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=FxlxuSWFVaDCIxehf4PO8eesHXIj9TJ3+57eBkM1Obg=; b=P3S0KFHMcLLsx+uHNbG3jC7vgtyXXFOFUL+QLfFjspTnlchDSlOTANaLQC/2ivnZFw W9m9uUy7zPsQvxNqdMX6FrKTPDpPPZ9mfxsDhaRUp7p/sNEzhj+U7at2c9seGN6RuJoK oRlRDb2pXyoYlZV201zNc+OvNADE4lAXIDxGs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=FxlxuSWFVaDCIxehf4PO8eesHXIj9TJ3+57eBkM1Obg=; b=AvcuYPFP5YtWotLyfoG6PhuxO6SwUMve9erNsm8jLei6I9XKzPE8z+Dx49oYg0RxrA sLZUuec/JWp6QpmsGYXqdoddtkqqkLl2RBAc53GyFtrBTOHD754oXnQz5esB6zBdwhQk e1raCfdzjvf4jA4DlqPnV2jfyXQB9r7tzQe9jED+gG9Vha5h6mREgjapIrCdUrbsbuCW pM6BgTdXNhl2gxGzeq5YdMfX0xQrojmn++FnVxvs328Xe+6hrv7OMy7aqZGCBOYlkcPk iWyXK5uz9B4ZXi4g8tfcK/R8bXouczdk3aKpRIVulXR9jq6VBnAcQ6X15sgtBemKhb9Q 9Q9g== X-Gm-Message-State: AElRT7GUnTGa+OFP0duCYu3zaSHtk3VTwFFgVX8NJPZcmvipaKzk/hoy zgvH19ATK4dy0uj4aNHToZOPvg== X-Received: by 2002:a17:902:8697:: with SMTP id g23-v6mr860528plo.393.1522184809367; Tue, 27 Mar 2018 14:06:49 -0700 (PDT) Received: from localhost.localdomain (104-188-17-28.lightspeed.sndgca.sbcglobal.net. [104.188.17.28]) by smtp.gmail.com with ESMTPSA id b64sm4661907pfl.148.2018.03.27.14.06.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 27 Mar 2018 14:06:48 -0700 (PDT) From: Bjorn Andersson To: Ohad Ben-Cohen , Bjorn Andersson Cc: linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org Subject: [PATCH 2/3] rpmsg: Only invoke announce_create for rpdev with endpoints Date: Tue, 27 Mar 2018 14:06:42 -0700 Message-Id: <20180327210643.3436-3-bjorn.andersson@linaro.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180327210643.3436-1-bjorn.andersson@linaro.org> References: <20180327210643.3436-1-bjorn.andersson@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org For special rpmsg devices without a primary endpoint there is nothing to announce so don't call the backend announce create function if we didn't create an endpoint. Signed-off-by: Bjorn Andersson --- drivers/rpmsg/rpmsg_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.16.2 diff --git a/drivers/rpmsg/rpmsg_core.c b/drivers/rpmsg/rpmsg_core.c index dffa3aab7178..e85d2691d2cf 100644 --- a/drivers/rpmsg/rpmsg_core.c +++ b/drivers/rpmsg/rpmsg_core.c @@ -442,7 +442,7 @@ static int rpmsg_dev_probe(struct device *dev) goto out; } - if (rpdev->ops->announce_create) + if (ept && rpdev->ops->announce_create) err = rpdev->ops->announce_create(rpdev); out: return err;