Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp548163pxx; Wed, 28 Oct 2020 10:49:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwk/SUxMPHIkxePEL8V5nOyn5pnqPQbe5bRm+jJl378ZBwjJUiYmxqIOAw4I6ZjIrJBEquz X-Received: by 2002:aa7:ce18:: with SMTP id d24mr21368edv.9.1603907365847; Wed, 28 Oct 2020 10:49:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603907365; cv=none; d=google.com; s=arc-20160816; b=DBWqX9NFfx+DnAkzl2/Huf8SXvdKGvachUnVywzsoCc4jliOdfvSMLvPCnX8FlVlQn pD0p6mR96DygkhzoJy8dh5xgXk3bYPgLF0T9hi2q5LKME7XQdle46efV1X9Vw2jFJBrW A7+52LYFxpCDaiq26/k1GQ962nzn094oIrSyK3A/aiRF3ls6lykJbwsEsWPIN/JYXbw1 B/qL4bcVSo2k0HyMPZsJfCz5oJOLF+0/W4AomTN9saZmzLa0iX9l0TVSM33fS2avMJSI f0G4/Ewq9AXEL3vAem8qbYhOMZ2On39f8nbXLIql6//LVXH8HMLtUyLTv6jUwsHrTZJv pPaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=eac2eJkbULJAn6wCUm/Bl8+weiuvIgiBhtMaMSxo0p4=; b=f1CKVPwXfJKMszT4do2NgeoYdVEBIk9zW8hKPQuAXcmT5Z/Y0qLiS/Z3U27Vv5zSXs 5g5dg95nCs3a8EsBN3g3j53Q1rOndS0AIMj6Z75vIg/Rw/KWFg1x0bliDnDp87FWoO9R GFo3rng2cr0S7NzgkcEVd3pMHUKG4Wom/yryBuawY4eU97cbCDUoJmZHJvKvr0ZXkTxe HZx7XX7lHcy3VH2QaeEuLpbWoCQ5n81peR9FEFb8u/uY+Y/l2ElDzt2a2RQGd2ymAF5c 5hMi1VweeQs1fROe5A4Q4yxWINBq06NNeLSo93ZmJCZ7KH2zsAZAc+w1Pi2/lZFCDv8W yNVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=k7SmtA60; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id y6si18713edm.295.2020.10.28.10.49.03; Wed, 28 Oct 2020 10:49:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=k7SmtA60; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1822813AbgJ0Rws (ORCPT + 99 others); Tue, 27 Oct 2020 13:52:48 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:36175 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1822784AbgJ0Rw3 (ORCPT ); Tue, 27 Oct 2020 13:52:29 -0400 Received: by mail-pg1-f194.google.com with SMTP id z24so1227979pgk.3 for ; Tue, 27 Oct 2020 10:52:29 -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 :mime-version:content-transfer-encoding; bh=eac2eJkbULJAn6wCUm/Bl8+weiuvIgiBhtMaMSxo0p4=; b=k7SmtA60wvpc0U2kvqBONBwbf0f3C7O1ycXiRo7OlegsSuHwoaCKYwvxObt9ceFc9a b29NTzGKQxjk9klylTq29KLhJ5BML/2W8fibrLXDGQ54MHrmnwF4xLepPWYDvwu8nC/R TV7yk/e+4HioImM/a93sKuBq3FgXjRovzqoL/k+edNatd/hUFVnv1SZWnZ5gaypOXln7 2MdQMQrqgX6PHJ6sn4P9tuBU5UopiO3yslsblMOjgMlm4uGrwdkBrsNJIxQcFO5xRyil 6fuUd42ZqHYL6ttXq50Y1X128gtrDUF6c0NZcPOhGE1JjKFc0DiEqRzA40sHWyQ+WQ2+ KZng== 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:mime-version:content-transfer-encoding; bh=eac2eJkbULJAn6wCUm/Bl8+weiuvIgiBhtMaMSxo0p4=; b=RYOvzqTfSUJXwVOwzylqRSf2iCFJj3x0qmQHqEZUqyKjxVSq6DnzHIWbdxsxLWmrkR M3TMsVL/Hj95hQ1m7R9jL8JaPONYQdbwiNDaDuuJSYcP9Q3eznJELjg0/bOFD3GduCyT xJYFzx/j5RAj5yo6MSnQRI7RAM6nAQJXh6YWxU0tG6GsnslKCuAeZkT7M08CpETyPeZi MO3YEsG6XVzWQxVb8gnKwLjQ2SMTU1Mt6kh3hx0M97EE5Vr7iqJLSNRHAA0Xc5zTZKmw Wri9rsjsnd2UIAD4W806mm+a+lCaBuxSUmvGY9AurtTgMJ4h1WiLMPVZh6iveRWoQCbf Pltg== X-Gm-Message-State: AOAM5306C84o+4O+KMKHTBZMFAn8L65uxrCbFR684ldNypm7mxa2579n NyowfXckarGENSWcITdg7aULZmZ3Xlz9vg== X-Received: by 2002:a63:1e5a:: with SMTP id p26mr2948756pgm.85.1603821149032; Tue, 27 Oct 2020 10:52:29 -0700 (PDT) Received: from xps15.cg.shawcable.net (S0106002369de4dac.cg.shawcable.net. [68.147.8.254]) by smtp.gmail.com with ESMTPSA id r8sm2761225pgl.57.2020.10.27.10.52.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Oct 2020 10:52:28 -0700 (PDT) From: Mathieu Poirier To: ohad@wizery.com, bjorn.andersson@linaro.org Cc: guennadi.liakhovetski@linux.intel.com, arnaud.pouliquen@st.com, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v4 7/8] rpmsg: Make rpmsg_{register|unregister}_device() public Date: Tue, 27 Oct 2020 11:52:17 -0600 Message-Id: <20201027175218.1033609-8-mathieu.poirier@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201027175218.1033609-1-mathieu.poirier@linaro.org> References: <20201027175218.1033609-1-mathieu.poirier@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Make function rpmsg_register_device() and rpmsg_unregister_device() functions public so that they can be used by other clients. While doing so get rid of two obsolete function, i.e register_rpmsg_device() and unregister_rpmsg_device(), to prevent confusion. Signed-off-by: Mathieu Poirier Reviewed-by: Arnaud Pouliquen Reviewed-by: Guennadi Liakhovetski --- drivers/rpmsg/rpmsg_internal.h | 4 ---- include/linux/rpmsg.h | 12 ++++++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/rpmsg/rpmsg_internal.h b/drivers/rpmsg/rpmsg_internal.h index 810dd95cc9bd..0721294ed415 100644 --- a/drivers/rpmsg/rpmsg_internal.h +++ b/drivers/rpmsg/rpmsg_internal.h @@ -74,10 +74,6 @@ struct rpmsg_endpoint_ops { poll_table *wait); }; -int rpmsg_register_device(struct rpmsg_device *rpdev); -int rpmsg_unregister_device(struct device *parent, - struct rpmsg_channel_info *chinfo); - struct device *rpmsg_find_device(struct device *parent, struct rpmsg_channel_info *chinfo); diff --git a/include/linux/rpmsg.h b/include/linux/rpmsg.h index 97098a90c496..8ee1b1dab657 100644 --- a/include/linux/rpmsg.h +++ b/include/linux/rpmsg.h @@ -164,8 +164,9 @@ static inline __rpmsg64 cpu_to_rpmsg64(struct rpmsg_device *rpdev, u64 val) #if IS_ENABLED(CONFIG_RPMSG) -int register_rpmsg_device(struct rpmsg_device *dev); -void unregister_rpmsg_device(struct rpmsg_device *dev); +int rpmsg_register_device(struct rpmsg_device *rpdev); +int rpmsg_unregister_device(struct device *parent, + struct rpmsg_channel_info *chinfo); int __register_rpmsg_driver(struct rpmsg_driver *drv, struct module *owner); void unregister_rpmsg_driver(struct rpmsg_driver *drv); void rpmsg_destroy_ept(struct rpmsg_endpoint *); @@ -188,15 +189,18 @@ __poll_t rpmsg_poll(struct rpmsg_endpoint *ept, struct file *filp, #else -static inline int register_rpmsg_device(struct rpmsg_device *dev) +static inline int rpmsg_register_device(struct rpmsg_device *rpdev) { return -ENXIO; } -static inline void unregister_rpmsg_device(struct rpmsg_device *dev) +static inline int rpmsg_unregister_device(struct device *parent, + struct rpmsg_channel_info *chinfo) { /* This shouldn't be possible */ WARN_ON(1); + + return -ENXIO; } static inline int __register_rpmsg_driver(struct rpmsg_driver *drv, -- 2.25.1